Fail Safe Mechanisms
C513AO
User’s Manual
8-1
05.99
8
Fail Safe Mechanisms
The C513AO offers enhanced fail-safe mechanisms which allow automatic recovery from a
software upset or a hardware failure:
• A programmable Watchdog Timer (WDT) has variable time-out period from 512
µ
s up to approx.
1.1 s at 12 MHz
• An Oscillator Watchdog (OWD) monitors the on-chip oscillator and forces the microcontroller into
reset state if the on-chip oscillator fails. It also provides the clock for a fast internal reset after
power-on.
8.1
Programmable Watchdog Timer
To protect the system against software failure, the user’s program must clear the watchdog within
a previously programmed time period. If the software fails to do this periodic refresh of the
Watchdog Timer, an internal hardware reset will be initiated. The software can be designed such
that the watchdog times out if the program does not work properly. It also times out if a software
error is based on a hardware-related problem.
The Watchdog Timer in the C513AO is a 15-bit timer which is incremented by a count rate of either
f
CYCLE
/2 or
f
CYCLE
/32 (
f
CYCLE
=
f
OSC
/12). That is, the machine clock is divided by a fixed divide-by-two
prescaler and an optional divide-by-16 prescaler arranged in series. The divide-by-16 prescaler is
enabled by setting bit WDTPSEL (bit 7 of SFR WDTREL). From the 15-bit Watchdog Timer count
value, only the upper seven bits can be programmed.
Figure 8-1 shows the block diagram of the programmable Watchdog Timer.
Figure 8-1
Block Diagram of the Programmable Watchdog Timer