364
Watchdog Timer
M
i
t
s
u
M
S
b
i
s
3
M
h
0
I
C
i
m
2
R
i
1
O
c
r
8
C
o
c
o
G
M
m
p
r
P
u
t
u
T
e
r
p
R
s
o
U
S
I
N
G
L
E
-
C
H
I
P
1
6
-
B
I
T
C
M
O
O
E
2.12.1 Overview
The watchdog timer can detect a runaway program using its 15-bit timer prescaler. The following is an
overview of the watchdog timer.
(1) Watchdog timer start procedure
When reset, the watchdog timer is in stopped state. Writing to the watchdog timer start register
initializes the watchdog timer to 7FFF
16
and causes it to start performing a down count. The watchdog
timer, once started operating, cannot be stopped by any means other than stopping conditions.
(2) Watchdog timer stop conditions
The watchdog timer stops in any one of the following states:
(a) Period in which the CPU is in stopped state
(b) Period in which the CPU is in waiting state
(c) Period in which the microcomputer is in hold state
(3) Watchdog timer initialization
The watchdog timer is initialized to 7FFF
16
in the cases given below, and begins a down count.
(a) When the watchdog timer writes to the watchdog timer start register while a count is in progress
(b) When the watchdog timer underflows
(4) Runaway detection
When the watchdog timer underflows, a watchdog timer interrupt occurs. In writing a program, write to
the watchdog timer start register before the watchdog timer underflows. The watchdog timer interrupt
occurs regardless of the status of the interrupt enable flag (I flag). In processing a watchdog timer
interrupt, set the software reset bit to “1” to reset software.
(5) Watchdog timer cycle
The watchdog timer cycle varies depending on the BCLK and the frequency division ratio of the
prescaler selected.
2.12 Watchdog Timer
Table 2.12.1. The watchdog timer cycle
CM07
CM06
CM17
CM16
BCLK
WDC7
Period
0
0
0
0
0
1
0
0
0
10MHz
0
0
1
5MHz
0
1
0
2.5MHz
0
1
1
0.625MHz
1
Invalid
Invalid
1.25MHz
Invalid
Invalid
Invalid
32kHz
0
1
0
1
0
1
0
1
0
1
Invalid
Approx. 52.4ms (Note)
Approx. 419.4ms (Note)
Approx. 104.9ms (Note)
Approx. 838.9ms (Note)
Approx. 209.7ms (Note)
Approx. 1.68s (Note)
Approx. 838.9ms (Note)
Approx. 6.71s (Note)
Approx. 419.4ms (Note)
Approx. 3.36s (Note)
Approx. 2s (Note)
Note: An error due to the prescaler occurs.