Contiki-NG
Loading...
Searching...
No Matches
cc2538 watchdog timer driver

Files

file  watchdog.c
 Implementation of the cc2538 watchdog driver.
 

Functions

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.
 
void watchdog_periodic (void)
 Writes the WDT clear sequence.
 
void watchdog_reboot (void)
 Keeps control until the WDT throws a reset signal.
 

Detailed Description

Driver for the cc2538 Watchdog Timer

Function Documentation

◆ watchdog_init()

void watchdog_init ( void )

Initialisation function for the WDT.

Currently simply explicitly sets the WDT interval to max interval

Definition at line 63 of file watchdog.c.

References SMWDTHROSC_WDCTL.

◆ 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.

Definition at line 85 of file watchdog.c.

References SMWDTHROSC_WDCTL, SMWDTHROSC_WDCTL_CLR_0, SMWDTHROSC_WDCTL_CLR_1, SMWDTHROSC_WDCTL_CLR_2, and SMWDTHROSC_WDCTL_CLR_3.

Referenced by cfs_coffee_arch_erase(), cfs_coffee_arch_read(), cfs_coffee_arch_write(), lpm_shutdown(), lpm_sleep(), platform_idle(), platform_main_loop(), send_packet(), stack_check_get_usage(), tsch_get_lock(), tz_api_poll(), usb_serial_flush(), and xmem_erase().

◆ watchdog_reboot()

void watchdog_reboot ( void )

Keeps control until the WDT throws a reset signal.

Starts the WDT if not already started.

Definition at line 94 of file watchdog.c.

References INTERRUPTS_DISABLE, SMWDTHROSC_WDCTL, SMWDTHROSC_WDCTL_EN, and SMWDTHROSC_WDCTL_INT.