English
Language : 

SH7764 Datasheet, PDF (1490/1752 Pages) Renesas Technology Corp – Renesas 32-Bit RISC Microcomputer SuperHTM RISC Engine Family SH-4A Series
Section 29 Watchdog Timer and Reset
29.4.2 Using watchdog timer mode
1. Set the WDTCNT overflow interval value in WDTST.
2. Set the WT/IT bit in WDTCSR to 1.
3. When the TME bit in WTCSR is set to 1, the WDT count starts.
4. During operation in watchdog timer mode, clear to the WDTCNT or WDTBCNT periodically
so that WDTCNT does not overflow. See section 29.4.5, Clearing WDT Counter for WDT
counter clear method.
5. When the WDTCNT overflows, the WDT sets the WOVF flag in WDTCSR to 1, and
generates a power-on reset.
29.4.3 Using Interval timer mode
When the WDT is operating in interval timer mode, an interval timer interrupt is generated each
time the counter overflows. This enables interrupts to be generated at fixed intervals.
1. Set the WDTCNT overflow time in WDTST.
2. Clear the WT/IT bit in WDTCSR to 0.
3. When the TME bit in WDTCSR is set to 1, the WDT count starts.
4. When the WDTCNT overflows, the WDT sets the IOVF flag in WDTCSR to 1, and sends an
interval timer interrupt (ITI) request to INTC. The counter continues counting.
29.4.4 Time for WDT Overflow
The relationship between WDTCNT and WDTBCNT is shown in figure 29.2. The example shown
in the figure is the operation in interval timer mode, where WDTCNT restarts counting after it has
overflowed. In watchdog timer mode, WDTCNT and WDTBCNT are cleared to 0 after the reset
state is exited and start counting up again.
Rev. 1.00 Nov. 22, 2007 Page 1434 of 1692
REJ09B0360-0100