22.2 Overview
The Watchdog Timer (WDT) is a system function for monitoring correct program operation.
When enabled, the WDT is a constantly running counter with a configurable time-out
interval. If the WDT is not reset within the time-out interval, it will issue a system
reset allowing the system to recover from situations such as runaway or deadlocked code.
Executing the WDR
(Watchdog Reset) instruction from the software resets
the WDT.
In addition to the Normal mode, the WDT has a Window mode as described above. The Window
mode defines a time slot or “window” inside the time-out interval during which the WDT must
be reset. If the WDT is reset outside this window, either too early or too late, a system
reset will be issued. Compared to the Normal mode, the Window mode can catch situations
where a code error causes frequent repeated execution of the WDR
instruction.
When enabled, the WDT will run in Active mode and all sleep modes. Since it is asynchronous (running from a CPU-independent clock source), it will continue to operate and be able to issue a system reset, even if the main clock fails.
The WDT has a Configuration Change Protection (CCP) mechanism and a lock functionality, ensuring the WDT settings cannot accidentally be changed.