English
Language : 

M38203M4 Datasheet, PDF (54/344 Pages) Mitsubishi Electric Semiconductor – 8-BIT SINGLE-CHIP MICROCOMPUTER
MITSUBISHI MICROCOMPUTERS
3820 Group
SINGLE-CHIP 8-BIT CMOS MICROCOMPUTER
WATCHDOG TIMER
The watchdog timer gives a mean of returning to the reset status
when a program cannot run on a normal loop (for example, be-
cause of a software run-away).
The watchdog timer consists of an 8-bit watchdog timer L and a 6-
bit watchdog timer H.
Initial Value of Watchdog Timer
At reset or when writing data into the watchdog timer control reg-
ister, the watchdog timer H is set to “3F16” and the watchdog timer
L is set to “FF16”. As a write instruction, it is possible to use any in-
struction that can cause a write signal such as STA, LDM and
CLB. Write data except bit 7 has no significance and the above
value is set independently.
Watchdog Timer Operation
The watchdog timer stops at reset and starts a countdown by writ-
ing to the watchdog timer control register. When the watchdog
timer H underflows, an internal reset occurs, and the reset status
is released after waiting the reset release time.
Then the program executes from the reset vector address.
Usually, a program is designed so that data can be written into the
watchdog timer control register before the watchdog timer H
underflows. If data is not written once into the watchdog timer con-
trol register, the watchdog timer does not function.
At execution of the STP instruction, both clock and watchdog timer
stops. At the same time that the stop mode is released, the watch-
dog timer restarts a count (Note). On the other hand, at execution
of the WIT instruction, the watchdog timer does not stop.
The time from execution of writing to the watchdog timer control
register until an underflow of the watchdog timer register H is as
follows: (When bit 7 of the watchdog timer control register is “0”)
• Middle / High-speed mode (f(XIN)=8 MHz) .................. 32.768 ms
•Low-speed mode (f(XCIN)=32 kHz) ..................................... 8.19 s
Note: During the stop release wait time [XIN (or XCIN) : about 8200
clock cycles], the watchdog timer counts.
Accordingly, does not underflow the watchdog timer H.
XCIN
Internal system “1”
clock selection bit
(Note)
“0”
XIN
When writing to
watchdog timer
control register
set “FF16”
1/16
Watchdog timer L (8)
“0”
“1”
Watchdog timer H (6)
Watchdog timer H
count source selection bit
Data bus
When writing to
watchdog timer control
register
set “3F16”
RESET
Undefined instruction
Reset
Reset circuit
Internal reset
Reset release wait time (about 8200 XIN clock cycles)
Note: This bit is bit 7 of CPU mode register. It selects the mode (middle/high-speed or low-speed)
Fig. 36 Watchdog timer block diagram
7
0
Fig. 37 Structure of watchdog timer control register
Watchdog timer control register
(WDTCON : address 003716)
Watchdog timer H bits (read only)
Not used (returns “1” when read)
Watchdog timer H count source selection bit
0 : Underflow from watchdog timer L
1 : f(XIN)/16 or f(XCIN)/16
1-38
3820 GROUP USER’S MANUAL