English
Language : 

C508_01 Datasheet, PDF (231/267 Pages) Infineon Technologies AG – 8-Bit CMOS Microcontroller
C508
Fail Save Mechanisms
8.1.3 Starting the Watchdog Timer
The Watchdog Timer can be started by software (bit SWDT in SFR IEN1), but it cannot
be stopped while the device is in active mode. An internal reset will be initiated if the
software fails to clear the Watchdog Timer. The cause of the reset (either an external
reset or a reset caused by the Watchdog) can be examined by software (status flag
WDTS in IP0 is set). A refresh of the Watchdog Timer is done by setting bits WDT (SFR
IEN0) 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 the idle mode and
power-down mode of the processor (see Chapter 9). It is not possible to use the idle
mode in combination with the Watchdog Timer function. Therefore, even the Watchdog
Timer cannot reset the device if one of the power saving modes has been entered
accidentally.
8.1.4 Refreshing the Watchdog Timer
At the same time the Watchdog Timer is started, the 7-bit register WDTH is preset by the
contents of WDTREL.0 to WDTREL.6. After the Watchdog has started, it cannot be
stopped by software; but, can only be refreshed to the reload value by first setting bit
WDT (IEN0.6) and by the next instruction setting SWDT (IEN1.6). Bit WDT will
automatically be cleared during the second machine cycle after having been set. For this
reason, setting SWDT bit must be a one cycle instruction (for example, SETB SWDT).
This double-instruction refresh of the Watchdog Timer is implemented to minimize the
chance of an unintentional reset of the Watchdog.
The reload register WDTREL can be written to at any time, as mentioned previously.
Therefore, a periodic refresh of WDTREL can be added to the above mentioned starting
procedure of the Watchdog Timer. Thus, a wrong reload value, caused by a possible
distortion during the write operation to the WDTREL, can be corrected by software.
User’s Manual
8-5
2001-05