HAL support for 8s watchdog

This commit is contained in:
Scott Lahteine authored and Scott Lahteine committed 2021-04-29 08:45:05 -05:00
1 parent bbfac75f19
commit 67d58ccb98
14 files changed
+82 -73

No files matched your search

+3 -1
View File
@@ -27,9 +27,11 @@
#include "watchdog.h"
#define WDT_TIMEOUT_MS TERN(WATCHDOG_DURATION_8S, 8000, 4000) // 4 or 8 second timeout
void watchdog_init() {
WDOG_TOVALH = 0;
WDOG_TOVALL = 4000;
WDOG_TOVALL = WDT_TIMEOUT_MS;
WDOG_STCTRLH = WDOG_STCTRLH_WDOGEN;
}