1 #include "dev/watchdog.h"
2 #include "derivative.h"
3 #include "contiki-conf.h"
7 static volatile uint8_t watchdog_status;
12 #if (DISABLE_WDOG == 0)
15 SIM_COPC = SIM_COPC_COPT(0x03);
22 #if (DISABLE_WDOG == 0)
23 CPU_Watchdog_Enable();
30 #if (DISABLE_WDOG == 0)
38 #if (DISABLE_WDOG == 0)
39 CPU_Watchdog_Disable();
47 uint16_t endian =
SCB->AIRCR & 0x8000;
49 SCB->AIRCR = 0x05FA0004 | endian;
53 #if (DISABLE_WDOG == 0)
54 uint8_t CPU_Watchdog_Disabled(
void) {
55 return watchdog_status;
58 void CPU_Watchdog_Disable(
void) {
61 void CPU_Watchdog_Enable(
void) {
void watchdog_stop(void)
Stops the WDT such that it won't timeout and cause MCU reset.
void watchdog_reboot(void)
Keeps control until the WDT throws a reset signal.
void watchdog_periodic(void)
Writes the WDT clear sequence.
void watchdog_init(void)
Initialisation function for the WDT.
void watchdog_start(void)
Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.