425
12.3Operation
12.3.1
Watchdog Timer Operation
To use the WDT as a watchdog timer, set the WT/
IT
bit in TCSR and the TME bit to 1. Software
must prevent TCNT overflows by rewriting the TCNT value (normally by writing H'00) before
overflow occurs. This ensures that TCNT does not overflow while the system is operating
normally. If TCNT overflows without being rewritten because of a system malfunction or other
error, an internal reset is issued, in the case of WDT0, if the RSTE bit in RSTCSR is set to 1.
The internal reset signal is output for 518 states.
If a reset caused by a signal input to the
RES
pin occurs at the same time as a reset caused by a
WDT overflow, the
RES
pin reset has priority and the WOVF bit in RSTCSR is cleared to 0.
In the case of WDT1, the chip is reset, or an NMI interrupt request is generated, for 516 system
clock periods (516ø) (515 or 516 clock periods when the clock source is øSUB (PSS = 1)). This is
illustrated in figure 12-4 (b).
An NMI request from the watchdog timer and an interrupt request from the NMI pin are both
treated as having the same vector. So, avoid handling an NMI request from the watchdog timer
and an interrupt request from the NMI pin at the same time.
TCNT value
H'00
Time
H'FF
WT/
IT
=1
TME=1
Write H'00'
to TCNT
WT/
IT
=1
TME=1
Write H'00'
to TCNT
518 states
Internal reset signal
*
WT/
IT
TME
Note:
*
The internal reset signal is generated only if the RSTE bit is set to 1.
Overflow
internal reset is
generated
WOVF=1
: Timer mode select bit
: Timer enable bit
Legend
Figure 12-4 (a) WDT0 Watchdog Timer Operation
Содержание H8S/2645
Страница 4: ......
Страница 16: ......
Страница 58: ...26 ...
Страница 110: ...78 ...
Страница 120: ...88 ...
Страница 132: ...100 ...
Страница 160: ...128 ...
Страница 172: ...140 ...
Страница 235: ...203 Transfer SAR or DAR DAR or SAR Block area First block Nth block Figure 8 8 Memory Mapping in Block Transfer Mode ...
Страница 418: ...386 ...
Страница 444: ...412 ...
Страница 530: ...498 ...
Страница 562: ...530 ...
Страница 642: ...610 ...
Страница 662: ...630 ...
Страница 688: ...656 ...
Страница 756: ...724 ...
Страница 784: ...752 ...
Страница 812: ...780 ...
Страница 837: ...805 A 2 Instruction Codes Table A 2 shows the instruction codes ...
Страница 1152: ...1120 ...