
192
CHAPTER 9
WATCHDOG TIMER
User’s Manual U12790EJ2V0UD
9.4 Watchdog Timer Operations
9.4.1 Operation as watchdog timer
When bit 4 (WDTM4) of the watchdog timer mode register (WDTM) is set to 1, the watchdog timer operates to
detect an inadvertent program loop.
The watchdog timer count clock (inadvertent program loop detection time interval) can be selected using bits 0
to 2 (WDCS0 to WDCS2) of watchdog timer clock select register 2 (WDCS). The watchdog timer starts counting when
bit 7 (RUN) of WDTM is set to 1. After the watchdog timer starts counting, set RUN to 1 again within the set inadvertent
program loop time interval to clear the watchdog timer and start counting again. If RUN is not set to 1 and the
inadvertent program loop detection time elapses, a system reset or non-maskable interrupt request is generated
according to the value of WDTM bit 3 (WDTM3).
The watchdog timer continues operating in the HALT mode but it stops in the STOP mode. Thus, set RUN to 1
before the STOP mode is set, clear the watchdog timer, and then execute the STOP instruction.
Caution
The actual inadvertent program loop detection time may be shorter than the set time by up to
0.5%.
Table 9-4. Watchdog Timer Inadvertent Program Loop Detection Time
Inadvertent Program Loop Detection Time
212
× 1/fX (650
s)
213
× 1/fX (1.30 ms)
214
× 1/fX (2.60 ms)
215
× 1/fX (5.20 ms)
216
× 1/fX (10.4 ms)
217
× 1/fX (20.8 ms)
218
× 1/fX (41.6 ms)
220
× 1/fX (166 ms)
Remarks 1. fX: System clock oscillation frequency
2. ( ): fX = 6.3 MHz.