21.2 Overview
The Watchdog Timer (WDT) is a system function for monitoring the correct program operation.
When enabled, the WDT is a constantly running timer with a configurable time-out period. If
the WDT is not reset within the time-out period, it will issue a system Reset, which allows
the system to recover from situations such as runaway or deadlocked code. The WDT is reset
by executing the WDR
(Watchdog Timer Reset) instruction from software.
In addition to the Normal mode as described above, the WDT has a Window mode.
The Window mode defines a time slot or “window” inside the time-out period 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 constant WDR
execution.
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 be changed by accident.