Fail Safe Mechanisms
C513AO
User’s Manual
8-3
05.99
Immediately after start, the Watchdog Timer is initialized to the reload value programmed to
WDTREL.0-WDTREL.6. Register WDTREL is cleared to 00H after an external hardware reset, an
Oscillator Watchdog power on reset, or a Watchdog Timer reset. The lower seven bits of WDTREL
can be loaded by software at any time.
Examples (given for 12- and 16-MHz external oscillator frequency):
Starting the Watchdog Timer
The Watchdog Timer can be started by software (bit SWDT in SFR WDCON); but, it cannot be
stopped during active mode of the device. If the software fails to clear the Watchdog Timer, an
internal reset will be initiated. The reset cause (either external reset or reset caused by the
watchdog) can be examined by software (status flag WDTS in WDCON is set). A refresh of the
Watchdog Timer is done by setting bits WDT (SFR WDCON) and SWDT consecutively. This double
instruction sequence has been implemented to increase system security.
It must be noted, however, that the Watchdog Timer is halted during Idle Mode and Power-down
Mode of the processor (see Chapter “Power Saving Modes”). Therefore, even the Watchdog Timer
cannot reset the device when one of the power-saving modes has been entered accidentally.
Table 8-1
Watchdog Timer Time-Out Periods
WDTREL
Time-Out Period
Comments
f
OSC
= 12 MHz
f
OSC
= 16 MHz
00H
65.535 ms
49.152 ms
This is the default value
80H
1.1 s
0.79 s
Maximum time period
7FH
512
µ
s
384
µ
s
Minimum time period