253
CHAPTER 11 WATCHDOG TIMER
11.4 Watchdog Timer Operations
11.4.1 Watchdog timer operation
When bit 4 (WDTM4) of the watchdog timer mode register (WDTM) is set to 1, the watchdog timer is operated
to detect any runaway.
The watchdog timer count clock (runaway detection time interval) can be selected with bits 0 to 2 (TCL20 to TCL22)
of the timer clock select register 2 (TCL2).
Watchdog timer starts by setting bit 7 (RUN) of WDTM to 1. After the watchdog timer is started, set RUN to 1
within the set runaway detection time interval. The watchdog timer can be cleared and counting is started by setting
RUN to 1. If RUN is not set to 1 and the runaway detection time is past, system reset or a non-maskable interrupt
request is generated according to the WDTM bit 3 (WDTM3) value.
By setting RUN to 1, the watchdog timer can be cleared.
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.
Cautions 1. The actual runaway detection time may be shorter than the set time by a maximum of
0.5 %.
2. When the subsystem clock is selected for CPU clock, watchdog timer count operation is
stopped.
Table 11-4. Watchdog Timer Runaway Detection Times
TCL22 TCL21 TCL20 Runaway Detection Time MCS = 1 MCS = 0
000 2
11 × 1/fXX 211 × 1/fX (410
µ
s) 212 × 1/fX (819
µ
s)
001 2
12 × 1/fXX 212 × 1/fX (819
µ
s) 213 × 1/fX (1.64 ms)
010 2
13 × 1/fXX 213 × 1/fX (1.64 ms) 214 × 1/fX (3.28 ms)
011 2
14 × 1/fXX 214 × 1/fX (3.28 ms) 215 × 1/fX (6.55 ms)
100 2
15 × 1/fXX 215 × 1/fX (6.55 ms) 216 × 1/fX (13.1 ms)
101 2
16 × 1/fXX 216 × 1/fX (13.1 ms) 217 × 1/fX (26.2 ms)
110 2
17 × 1/fXX 217 × 1/fX (26.2 ms) 218 × 1/fX (52.4 ms)
111 2
19 × 1/fXX 219 × 1/fX (104.9 ms) 220 × 1/fX (209.7 ms)
Remarks 1. fXX : Main system clock frequency (fX or fX/2)
2. fX: Main system clock oscillation frequency
3. MCS : Bit 0 of oscillation mode selection register (OSMS)
4. TCL20 to TCL22 : Bits 0 to 2 of timer clock select register 2 (TCL2)
5. Figures in parentheses apply to operation with fX = 5.0 MHz.