Skip to content
Snippets Groups Projects
Commit abb01b9c authored by Jeff Gough's avatar Jeff Gough
Browse files

Enable WDT reset, approx 1s reset time

parent 8e8d8614
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,7 @@
#include "rtc.h"
#include "spi.h"
#include "trng.h"
#include "wdt.h"
/*
* Early init is called at the very beginning and is meant for modules which
......@@ -28,6 +29,15 @@
*/
int hardware_early_init(void)
{
/*
* Watchdog timer
*/
sys_cfg_wdt_t wdt_cfg = NULL;
WDT_Init(MXC_WDT0, wdt_cfg);
WDT_Enable(MXC_WDT0, 1);
WDT_SetResetPeriod(MXC_WDT0, WDT_PERIOD_2_18);
WDT_EnableReset(MXC_WDT0, 1);
/*
* I2C bus for onboard peripherals (ie. PMIC, BMA400, BHI160, BME680,
* ...)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment