MITSUBISHI MICROCOMPUTERS
M37754M8C-XXXGP, M37754M8C-XXXHP
M37754S4CGP, M37754S4CHP
SINGLE-CHIP 16-BIT CMOS MICROCOMPUTER
WATCHDOG TIMER
The watchdog timer is used to detect unexpected execution se-
quence caused by software runaway and others. Figure 74 shows
the block diagram of the watchdog timer.
Clock source for peripheral
devices Pf2
Hold request
Pf512
The watchdog timer consists of a 12-bit binary counter.
1/8
1/2
1/2
1/8
Pf32
The watchdog timer counts clock Wf32/Pf32, which is obtained by di-
viding the peripheral devices’ clock Pf2 by 16; or clock Wf512/Pf512,
which is obtained by doing it by 256. The watchdog timer frequency
select register shown in Figure 75 selects which clock is counted.
Wf512/Pf512 is selected when its contents are “0”, and Wf32/Pf32 is
selected when they are “1”. They are cleared to “0” after reset.
The watchdog timer clock select bit (bit 3 of particular function select
register 1; Figure 62) selects use of clock Wf512/Wf32 or Pf512/Pf32
as the clock source of watchdog timer. When selecting Wf512/Wf32,
the clock source of watchdog timer (Wf512/Wf32) is not active during
Hold state. When selecting Pf512/Pf32, the clock source of watchdog
timer (Pf512/Pf32) is active during Hold state, however, current con-
sumption can be reduced. It is because the Wf512/Wf32 division cir-
cuit stops.
Pf16
Watchdog timer frequency select register
Wf32
Address 6016
Wachdog timer
1/16
Hold request
1/16
Set FFF16
Wf512
Watchdog timer clock select bit
Write to watchdog timer
RESET
2Vcc
detection
FFF16 is set in the watchdog timer when “L” or 2Vcc is applied to the
______
STP instruction
S
R
Q
RESET pin, STP instruction is executed, data is written to the watch-
dog timer, or the most significant bit of the watchdog timer becomes
“0”.
After FFF16 is set in the watchdog timer, when the watchdog timer
counts the clock source by 2048 counts, the most significant bit of
watchdog timer becomes “0”, the watchdog timer interrupt request
bit is set to “1”, and FFF16 is set again in the watchdog timer.
Normally, a program is written so that data is written in the watchdog
timer before the most significant bit of the watchdog timer becomes
“0”. If this routine is not executed owing to unexpected program ex-
ecution and others, the most significant bit of the watchdog timer
becomes “0” and an interrupt is generated.
Pf16
STP return select bit
Fig. 74 Watchdog timer block diagram
Address
6116
7
6
5
4
3
2
1
0
0
The microcomputer can be reset by writing “1” to bit 3 (software re-
set bit) of processor mode register 0 in the interrupt routine, de-
scribed in Figure 16 in the interrupt section, and generating a reset
Watchdog timer frequency
select register
pulse.
0 : Wf512 or Pf512 selected
1 : Wf32 or Pf32 selected
______
The watchdog timer stops its function when the RESET pin voltage
is raised to double the Vcc voltage.
This bit must be fixed to “0.”
The watchdog timer can also be used to return from when the clock
is stopped by the STP instruction. Refer to the section on the clock
generating circuit for more details.
Fig. 75 Watchdog timer frequency select register bit configuration
The watchdog timer also becomes Hold state during Hold state and
the clock input to it is stopped.
61