18.6.1 Principle of Operation
The Watchdog Timer (WDT) is a system for monitoring correct program operation, making it possible to recover from error situations such as runaway code, by issuing a Reset. When enabled, the WDT is a constantly running timer that is configured to a predefined time-out period. Before the end of the time-out period, the WDT should be set back, or else, a system Reset is issued.
The WDT has two modes of operation, Normal mode and Window mode. Both modes offer the option of Early Warning interrupt generation. The description for each of the basic modes is given below. The settings in the Control register (CTRL) and the Interrupt Enable register (handled by INTENCLR/SET) determine the mode of operation:
CTRL.ENABLE | CTRL.WEN | INTENSET.EW | Mode |
---|---|---|---|
0 | x | x | Stopped |
1 | 0 | 0 | Normal |
1 | 0 | 1 | Normal with Early Warning interrupt |
1 | 1 | 0 | Window |
1 | 1 | 1 | Window with Early Warning interrupt |