125
CHAPTER 8 WATCHDOG TIMER
User’s Manual U15104EJ2V0UD
8.4 Operations of Watchdog Timer
8.4.1 Watchdog timer operation
When bit 4 (WDTM4) of the watchdog timer mode register (WDTM) is set to 1, the watchdog timer operates to
detect any inadvertent program loop.
The watchdog timer count clock (inadvertent program loop detection time interval) can be selected with bits 0 to
2 (WDCS0 to WDCS2) of timer clock select register 2 (WDCS). A watchdog timer count operation is started by setting
bit 7 (RUN) of WDTM to 1. After the watchdog timer count operation starts, set RUN to 1 within the set inadvertent
program loop time interval.
The watchdog timer can be cleared and counting started by setting RUN to 1. If RUN is not set to 1 and the
inadvertent program loop detection time has elapsed, a system reset or a 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 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 a
maximum of 0.5%.
Table 8-4. Watchdog Timer Inadvertent Program Loop Detection Time
Inadvertent Program Loop Detection Time
2
12
/f
X
(910
µ
s)
2
13
/f
X
(1.82 ms)
2
14
/f
X
(3.64 ms)
2
15
/f
X
(7.28 ms)
2
16
/f
X
(14.6 ms)
2
17
/f
X
(29.1 ms)
2
18
/f
X
(58.3 ms)
2
20
/f
X
(233 ms)
Remarks 1. f
X
: System clock oscillation frequency
2. ( ): f
X
= 4.5 MHz