Bit7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
WDIF | WDIE | WDP[3] | WDCE | WDE | WDP[2:0] | ||
AccessR/W | R/W | R/W | R/W | R/W | R/W | R/W | R/W |
Reset0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Watchdog Interrupt Flag
Watchdog Interrupt Enable
When this bit is written to '1' and the I-bit in the Status Register is set, the Watchdog Interrupt is enabled. If WDE is cleared in combination with this setting, the Watchdog Timer is in Interrupt Mode, and the corresponding interrupt is executed if timeout in the Watchdog Timer occurs. If WDE is set, the Watchdog Timer is in Interrupt and System Reset Mode. The first timeout in the Watchdog Timer will set WDIF. Executing the corresponding interrupt vector will clear WDIE and WDIF automatically by hardware (the Watchdog goes to System Reset Mode).
This is useful for keeping the Watchdog Timer security while using the interrupt. To stay in Interrupt and System Reset Mode, WDIE must be set after each interrupt. This should however not be done within the interrupt service routine itself, as this might compromise the safety function of the Watchdog System Reset mode. If the interrupt is not executed before the next timeout, a System Reset will be applied.
WDTON(1) | WDE | WDIE | Mode | Action on Time-out |
---|---|---|---|---|
1 | 0 | 0 | Stopped | None |
1 | 0 | 1 | Interrupt Mode | Interrupt |
1 | 1 | 0 | System Reset Mode | Reset |
1 | 1 | 1 | Interrupt and System Reset Mode | Interrupt, then go to System Reset Mode |
0 | x | x | System Reset Mode | Reset |
Watchdog Timer Prescaler 3
Watchdog Change Enable
Watchdog System Reset Enable
Watchdog Timer Prescaler 2, 1, and 0
The WDP[3:0] bits determine the Watchdog Timer prescaling when the Watchdog Timer is running. The different prescaling values and their corresponding timeout periods are shown in the following table.
WDP[3] | WDP[2] | WDP[1] | WDP[0] | Number of WDT Oscillator (Cycles) | Oscillator | |
---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 2K (2048) | 16ms | |
0 | 0 | 0 | 1 | 4K (4096) | 32ms | |
0 | 0 | 1 | 0 | 8K (8192) | 64ms | |
0 | 0 | 1 | 1 | 16K (16384) | 0.125s | |
0 | 1 | 0 | 0 | 32K (32768) | 0.25s | |
0 | 1 | 0 | 1 | 64K (65536) | 0.5s | |
0 | 1 | 1 | 0 | 128K (131072) | 1.0s | |
0 | 1 | 1 | 1 | 256K (262144) | 2.0s | |
1 | 0 | 0 | 0 | 512K (524288) | 4.0s | |
1 | 0 | 0 | 1 | 1024K (1048576) | 8.0s | |
1 | 0 | 1 | 0 | Reserved | ||
1 | 0 | 1 | 1 | |||
1 | 1 | 0 | 0 | |||
1 | 1 | 0 | 1 | |||
1 | 1 | 1 | 0 | |||
1 | 1 | 1 | 1 |