HAL support for 8s watchdog
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user