English
Language : 

GMS81C2112 Datasheet, PDF (46/107 Pages) Hynix Semiconductor – HYNIX SEMICONDUCTOR 8-BIT SINGLE-CHIP MICROCONTROLLERS
GMS81C2112/GMS81C2120
Watchdog Timer Control
Figure 11-2 shows the watchdog timer control register.
The watchdog timer is automatically disabled after reset.
The CPU malfunction is detected during setting of the de-
tection time, selecting of output, and clearing of the binary
counter. Clearing the binary counter is repeated within the
detection time.
If the malfunction occurs for any cause, the watchdog tim-
er output will become active at the rising overflow from
the binary counters unless the binary counter is cleared. At
this time, when WDTON=1, a reset is generated, which
drives the RESET pin to low to reset the internal hardware.
When WDTON=0, a watchdog timer interrupt (WDTIF) is
generated.
The watchdog timer temporarily stops counting in the
STOP mode, and when the STOP mode is released, it au-
tomatically restarts (continues counting).
WDTR
WW
76
WDTCL
W WW W
5
4
3
2
WW
1
0
ADDRESS: 0EDH
INITIAL VALUE: 0111_1111B
7-bit compare data
Clear count flag
0: Free-run count
1: When the WDTCL is set to "1", binary counter
is cleared to “0”. And the WDTCL becomes “0” automatically
after one machine cycle. Counter count up again.
NOTE:
The WDTON bit is in register CKCTLR.
Figure 11-2 WDTR: Watchdog Timer Data Register
Example: Sets the watchdog timer detection time to 0.5 sec at 4.19MHz
LDM
LDM
LDM
:
Within WDT
:
detection time :
:
LDM
:
Within WDT
detection time
:
:
:
LDM
CKCTLR,#3FH
WDTR,#04FH
WDTR,#04FH
WDTR,#04FH
WDTR,#04FH
;Select 1/2048 clock source, WDTON ← 1, Clear Counter
;Clear counter
;Clear counter
;Clear counter
40
JUNE. 2001 Ver 1.00