|
4524_M Datasheet, PDF (205/310 Pages) Renesas Technology Corp – 4-BIT CISC SINGLE-CHIP MICROCOMPUTER 720 FAMILY / 4500 SERIES | |||
|
◁ |
4524 Group
APPLICATION
2.3 Timers
(7) Watchdog timer
Watchdog timer provides a method to reset the system when a program run-away occurs.
Accordingly, when the watchdog timer function is set to be valid, execute the WRST instruction at
a certain period which consists of 16-bit timersâ 65534 counts or less (execute WRST instruction at
less than 65534 machine cycles).
Outline: Execute the WRST instruction in 16-bit timerâs 65534 counts at the normal operation. If a
program runs incorrectly, the WRST instruction is not executed and system reset occurs.
Specifications: System clock frequency f(XIN) = 4.0 MHz is used, and program run-away is detected
by executing the WRST instruction in 49 ms.
Figure 2.3.3 shows the watchdog timer function, and Figure 2.3.10 shows the example of watchdog
timer.
FFFF16
Value of 16-bit timer (WDT)
000016
WDF1 flag
WDF2 flag
â
â
65534 count
(Note)
â
RESET pin output
â Reset
released
â WRST instruction
executed
(skip executed)
â System reset
â After system is released from reset (= after program is started), timer WDT starts count down.
â When timer WDT underflow occurs, WDF1 flag is set to â1.â
â When the WRST instruction is executed, WDF1 flag is cleared to â0,â the next instruction is skipped.
â When timer WDT underflow occurs while WDF1 flag is â1,â WDF2 flag is set to â1â and the
watchdog reset signal is output.
â The output transistor of RESET pin is turned âONâ by the watchdog reset signal and system reset is
executed.
Note: The number of count is equal to the number of cycle because the count source of watchdog timer
is the instruction clock.
Fig. 2.3.3 Watchdog timer function
Rev.2.00 Aug, 06 2004
REJ09B0107-0200Z
2-41
|
▷ |