XC886/888CLM
Watchdog Timer
User’s Manual
9-2
V1.3, 2010-02
Watchdog Timer, V1.0
9.1
Functional Description
The Watchdog Timer is a 16-bit timer, which is incremented by a count rate of
f
PCLK
/2 or
f
PCLK
/128. This 16-bit timer is realized as two concatenated 8-bit timers. The upper 8 bits
of the Watchdog Timer can be preset to a user-programmable value via a watchdog
service access in order to vary the watchdog expire time. The lower 8 bits are reset on
each service access.
shows the block diagram of the watchdog timer unit.
Figure 9-1
WDT Block Diagram
If the WDT is enabled by setting WDTEN to 1, the timer is set to a user-defined start
value and begins counting up. It must be serviced before the counter overflows.
Servicing is performed through refresh operation (setting bit WDTRS to 1). This reloads
the timer with the start value, and normal operation continues.
If the WDT is not serviced before the timer overflows, a system malfunction is assumed
and normal mode is terminated. A WDT NMI request (FNMIWDT) is then asserted and
prewarning is entered. The prewarning lasts for 30
H
count. During the prewarning period,
refreshing of the WDT is ignored and the WDT cannot be disabled. A reset (WDTRST)
of the XC886/888 is imminent and can no longer be avoided. The occurrence of a WDT
reset is indicated by the bit WDTRST, which is set to 1 once hardware detects the
assertion of the signal WDTRST. If refresh happens at the same time an overflow
occurs, WDT will not go into prewarning period
The WDT must be serviced periodically so that its count value will not overflow. Servicing
the WDT clears the low byte and reloads the high byte with the preset value in bit field
WDTREL. Servicing the WDT also clears the bit WDTRS.
The WDT has a “programmable window boundary”, which disallows any refresh during
the WDT’s count-up. A refresh during this window-boundary constitutes an invalid
WDTREL
MUX
WDT Low Byte
1:2
Clear
WDT
Control
1:128
WDT High Byte
FNMIWDT
WDTIN
f
PCLK
Logic
ENWDT
ENWDT_P
WDTRST
Overflow/Time-out Control &
Window-boundary control
WDTWINB
.
*