diff --git a/epicardium/modules/hardware.c b/epicardium/modules/hardware.c index 5cb95dc286d3262504886d210580bdc9f9b12263..a8ae2ed924c97e03209323e76b73bf98c97f3caa 100644 --- a/epicardium/modules/hardware.c +++ b/epicardium/modules/hardware.c @@ -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, * ...)