English
Language : 

HD6475348R Datasheet, PDF (263/487 Pages) Hitachi Semiconductor – Single-Chip Microcomputer
Reading TCNT, TCSR, and RSTCSR: The read addresses are H'FEEC for TCSR, H'FEED for
TCNT, and H'FF15 for RSTCSR as indicated in table 13-2.
These three registers are read like other registers. Byte access instructions can be used.
Table 13-2 Read Addresses of TCNT and TCSR
Read Address
H'FFEC
H'FFED
H'FF15
Register
TCSR
TCNT
RSTCSR
13.3 Operation
13.3.1 Watchdog Timer Mode
The watchdog timer function begins operating when software sets the WT/IT and TME bits to 1 in
the TCSR.
Thereafter, software should periodically rewrite the contents of the timer counter (normally by
writing H'00) to prevent the count from overflowing. If a program crash allows the timer count to
overflow, the watchdog timer generates a reset as shown in figure 13-4.
The reset signal from the watchdog timer can also be output from the RES pin to reset external
devices. This reset output signal is a Low pulse with a duration of 132 ø clock periods. The reset
signal is output only if the RSTOE bit in the RSTCSR is set to 1.
The reset generated by the watchdog timer has the same vector as a reset generated by Low input at the
RES pin. Software should check the WRST bit in the RSTCSR to determine the source of the reset.
If a watchdog timer overflow occurs at the same time as a Low input at the RES pin, priority is
given to one type of reset or the other depending on the value of the RSTOE bit in the RSTCSR.
If the RSTOE bit is set to 1 when both types of reset occur simultaneously, the watchdog timer’s
reset signal takes precedence. The internal state of the H8/534 or H8/536 chip is reset and the RES
pin is held Low for 132 ø clock periods. If at the end of 520 ø clock periods there is still an
external Low input to the RES pin, the external reset takes effect, clearing the WRST and RSTOE
bits to 0. Note that if the external reset occurs before the watchdog timer overflows, it takes effect
immediately and clears the RSTOE bit.
If the RSTOE bit is cleared to 0 when both types of reset occur simultaneously, the reset signal
input from the RES pin takes precedence and the WRST bit is cleared to 0.
248