Rev. 2.0, 11/00, page 399 of 1037
18.3
Operation
18.3.1
Watchdog Timer Operation
To use the WDT as a watchdog timer, set the WT/
,7 and TME bits in WTCSR to 1. Software
must prevent WTCNT overflows by rewriting the WTCNT value (normally by writing H'00)
before overflow occurs. This ensures that WTCNT does not overflow while the system is
operating normally. If WTCNT overflows without being rewritten because of a system crash or
other error, the chip is reset, or an NMI interrupt is generated, for 518 system clock periods (518
φ
). This is illustrated in figure 18.3.
An internal reset request from the watchdog timer and reset input from the
5(6 pin are handled
via the same vector. The reset source can be identified from the value of the XRST bit in
SYSCR.
If a reset caused by an input signal from the
5(6 pin and a reset caused by WDT overflow occur
simultaneously, the
5(6 pin reset has priority, and the XRST bit in SYSCR is set to 1.
An NMI interrupt request from the watchdog timer and an interrupt request from the NMI pin
are handled via the same vector. Simultaneous handling of a watchdog timer NMI interrupt
request and an NMI pin interrupt request must therefore be avoided.
WTCNT value
H'00
Time
H'FF
WT/IT=1
TME=1
H'00 written
to WTCNT
WT/IT=1
TME=1
H'00 written
to WTCNT
518 system clock period
Internal reset
signal
WT/IT
TME
Overflow
Internal reset
generated
WOVF=1
*
: Timer mode select bit
: Timer enable bit
Note:
*
Cleared to 0 by an internal reset when WOVF is set to 1. XRST is cleared to 0.
Figure 18.3 Operation in Watchdog Timer Mode
Summary of Contents for Hitachi H8S/2191
Page 123: ...Rev 2 0 11 00 page 96 of 1037...
Page 149: ...Rev 2 0 11 00 page 122 of 1037...
Page 197: ...Rev 2 0 11 00 page 170 of 1037...
Page 247: ...Rev 2 0 11 00 page 220 of 1037...
Page 249: ...Rev 2 0 11 00 page 222 of 1037...
Page 347: ...Rev 2 0 11 00 page 320 of 1037...
Page 357: ...Rev 2 0 11 00 page 330 of 1037...
Page 417: ...Rev 2 0 11 00 page 390 of 1037...
Page 431: ...Rev 2 0 11 00 page 404 of 1037...
Page 439: ...Rev 2 0 11 00 page 412 of 1037...
Page 457: ...Rev 2 0 11 00 page 430 of 1037...
Page 525: ...Rev 2 0 11 00 page 498 of 1037...
Page 543: ...Rev 2 0 11 00 page 516 of 1037...
Page 845: ...Rev 2 0 11 00 page 818 of 1037...