Clock Source; Debug Functionality; Energy Mode Handling; Warning Interrupt - Silicon Laboratories EFR32xG21 Wireless Gecko Reference Manual

Hide thumbs Also See for EFR32xG21 Wireless Gecko:
Table of Contents

Advertisement

Reference Manual
WDOG - Watch Dog Timer

26.3.1 Clock Source

Four clock sources are available for use with the watchdog, through the CLKSEL field in CMU_WDOGn_CFG. The selected oscillator
source automatically starts when the watchdog is enabled. To prevent accidental change of the clock selection, CMU_WDOGLOCK
can be written anything other than UNLOCK code. Also, respective oscillator has locks to prevent accidental disabling of oscillators.
The PERSEL field in WDOGn_CFG is used to divide the selected watchdog clock, and the timeout for the watchdog timer can be calcu-
lated with the formula:
(PERSEL+3)
T
= [2
+ 1] / f
TIMEOUT
where f is the frequency of the selected clock.
Users must clear EM2RUN and EM3RUN when the selected clock source is HFCLKDIV1024.

26.3.2 Debug Functionality

The watchdog timer can either keep running or be frozen when the device is halted by a debugger. This configuration is done through
the DEBUGRUN bit in WDOGn_CFG. When code execution is resumed, the watchdog will continue counting where it left off.

26.3.3 Energy Mode Handling

The watchdog timer can be configured to either keep on running or freeze when entering EM2 DeepSleep or EM3 Stop. The configura-
tion is done individually for each energy mode in the EM2RUN and EM3RUN bits in WDOGn_CFG. When the watchdog has been fro-
zen and is re-entering an energy mode where it is running, the watchdog timer will continue counting where it left off. For the watchdog
there is no difference between EM0 Active and EM1 Sleep. The watchdog does not run in EM4. If EM4BLOCK in WDOGn_CFG is set,
the CPU will be prevented from entering EM4 by software request.

26.3.4 Warning Interrupt

The watchdog implements a warning interrupt which can be configured to occur at approximately 25%, 50%, or 75% of the timeout
period through the WARNSEL field of the WDOGn_CFG register. This interrupt can be used to wake up the cpu for clearing the watch-
dog. The warning point for the watchdog timer can be calculated with the formula:
(PERSEL+3)
T
= [2
+1 ]*WARNSEL / 4 / f
WARNING
where f is the frequency of the selected clock.
When the watchdog is enabled, it is recommended to clear the watchdog before changing WARNSEL.
silabs.com | Building a more connected world.
Rev. 0.4 | 850

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the EFR32xG21 Wireless Gecko and is the answer not in the manual?

Questions and answers

Table of Contents