
CHAPTER 12 WATCHDOG TIMER FUNCTIONS
User
’
s Manual U15862EJ3V0UD
414
(2) Operation as watchdog timer 1
Watchdog timer 1 operation to detect a program loop is selected by setting bit 4 (WDTM14) of watchdog timer
mode register 1 (WDTM1) to 1.
The count clock (program loop detection time interval) of watchdog timer 1 can be selected using bits WDCS0
to WDCS2 of the watchdog timer clock selection register (WDCS). The count operation is started by setting bit
7 (RUN1) of the WDTM1 register to 1. When, after the count operation is started, the RUN1 bit is again set to
1 within the set program loop detection time interval, watchdog timer 1 is cleared and the count operation
starts again.
If the program loop detection time is exceeded without RUN1 bit being set to 1, reset (WDTRES1) through the
value of bit WDTM13 of the WDTM1 register or a non-maskable interrupt request signal (INTWDT1) is
generated.
The count operation of watchdog timer 1 stops in the STOP mode and IDLE mode. Therefore, set the RUN1
bit to 1 before the STOP mode or IDLE mode is entered in order to clear watchdog timer 1.
Because watchdog timer 1 operates in the HALT mode, do not use watchdog timer 1 when using the HALT
mode.
Cautions 1. When the subclock is selected for the CPU clock, the count operation of watchdog timer
1 is stopped (the value of watchdog timer 1 is maintained).
2. Restoring using the RETI instruction following a non-maskable interrupt servicing due to
INTWDT1 is not possible. Therefore, following completion of interrupt servicing, perform
system reset.
Table 12-2. Program Loop Detection Time of Watchdog Timer 1
Program Loop Detection Time
Clock
f
XW
= 4 MHz
f
XW
= 5 MHz
f
XW
= 10 MHz
2
13
/f
XW
2.048 ms
1.638 ms
0.819 ms
2
15
/f
XW
8.192 ms
6.554 ms
3.277 ms
2
16
/f
XW
16.38 ms
13.11 ms
6.554 ms
2
17
/f
XW
32.77 ms
26.21 ms
13.11 ms
2
18
/f
XW
65.54 ms
52.43 ms
26.21 ms
2
19
/f
XW
131.1 ms
104.9 ms
52.43 ms
2
20
/f
XW
262.1 ms
209.7 ms
104.9 ms
2
21
/f
XW
524.3 ms
419.4 ms
209.7 ms
Remark
f
XW
= f
X
: Watchdog timer 1 clock frequency