Contiki-NG
Files | Functions

Files

file  watchdog.c
 Contiki compatible watchdog driver implementation.
 

Functions

static void wdt_event_handler (void)
 WDT events handler.
 
void watchdog_init (void)
 Initialisation function for the WDT. More...
 
void watchdog_start (void)
 Starts the WDT in watchdog mode if enabled by user configuration, maximum interval. More...
 
void watchdog_periodic (void)
 Writes the WDT clear sequence. More...
 
void watchdog_reboot (void)
 Keeps control until the WDT throws a reset signal. More...
 

Detailed Description

Function Documentation

◆ watchdog_init()

void watchdog_init ( void  )

Initialisation function for the WDT.

Currently simply explicitly sets the WDT interval to max interval

Initialisation function for the WDT.

Simply sets the reload counter to a default value. The WDT is not started yet. To start it, watchdog_start() must be called.

Definition at line 59 of file watchdog.c.

◆ watchdog_periodic()

void watchdog_periodic ( void  )

Writes the WDT clear sequence.

Due to how the SMWDTHROSC_WDCTL works, it is OK to simply write these bits rather than use RMW operations.

Writes the WDT clear sequence.

Definition at line 78 of file watchdog.c.

◆ watchdog_reboot()

void watchdog_reboot ( void  )

Keeps control until the WDT throws a reset signal.

Starts the WDT if not already started.

Keeps control until the WDT throws a reset signal.

Definition at line 86 of file watchdog.c.

References NVIC_SystemReset().

◆ watchdog_start()

void watchdog_start ( void  )

Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.

Starts the WDT in watchdog mode if enabled by user configuration, maximum interval.

Definition at line 70 of file watchdog.c.