Watchdog Timer Operation
10-5
Watchdog Timer
10.2.4 Watchdog Timer Interrupts
The WDT uses two bits in the SFRs for interrupt control.
- The WDT interrupt flag, WDTIFG, located in IFG1.0
- The WDT interrupt enable, WDTIE, located in IE1.0
When using the WDT in the watchdog mode, the WDTIFG flag sources a reset
vector interrupt. The WDTIFG can be used by the reset interrupt service
routine to determine if the watchdog caused the device to reset. If the flag is
set, then the watchdog timer initiated the reset condition either by timing out
or by a security key violation. If WDTIFG is cleared, the reset was caused by
a different source.
When using the WDT in interval timer mode, the WDTIFG flag is set after the
selected time interval and requests a WDT interval timer interrupt if the WDTIE
and the GIE bits are set. The interval timer interrupt vector is different from the
reset vector used in watchdog mode. In interval timer mode, the WDTIFG flag
is reset automatically when the interrupt is serviced, or can be reset with
software.