HAL support for 8s watchdog
This commit is contained in:
@ -28,6 +28,8 @@
|
||||
#include <lpc17xx_wdt.h>
|
||||
#include "watchdog.h"
|
||||
|
||||
#define WDT_TIMEOUT_US TERN(WATCHDOG_DURATION_8S, 8000000, 4000000) // 4 or 8 second timeout
|
||||
|
||||
void watchdog_init() {
|
||||
#if ENABLED(WATCHDOG_RESET_MANUAL)
|
||||
// We enable the watchdog timer, but only for the interrupt.
|
||||
@ -52,7 +54,7 @@ void watchdog_init() {
|
||||
#else
|
||||
WDT_Init(WDT_CLKSRC_IRC, WDT_MODE_RESET);
|
||||
#endif
|
||||
WDT_Start(WDT_TIMEOUT);
|
||||
WDT_Start(WDT_TIMEOUT_US);
|
||||
}
|
||||
|
||||
void HAL_watchdog_refresh() {
|
||||
|
Reference in New Issue
Block a user