![Infineon Technologies TC1796 Скачать руководство пользователя страница 939](http://html1.mh-extra.com/html/infineon-technologies/tc1796/tc1796_user-manual_2055437939.webp)
TC1796
System Units (Vol. 1 of 2)
Watchdog Timer
User’s Manual
16-1
V2.0, 2007-07
WDT, V2.0
16
Watchdog Timer
This chapter describes the TC1796 Watchdog Timer (WDT). Topics include an overview
of the WDT function and descriptions of the registers, the password-protection scheme,
accessing registers, modes, and initialization.
16.1
Watchdog Timer Overview
The WDT provides a highly reliable and secure way to detect and recover from software
or hardware failure. The WDT helps to abort an accidental malfunction of the TC1796 in
a user-specified time period. When enabled, the WDT will cause the TC1796 system to
be reset if the WDT is not serviced within a user-programmable time period. The CPU
must service the WDT within this time interval to prevent the WDT from causing a
TC1796 system reset. Hence, routine service of the WDT confirms that the system is
functioning properly.
In addition to this standard “Watchdog” function, the WDT incorporates the End-of-
Initialization (Endinit) feature and monitors its modifications. A system-wide line is
connected to the WDT_CON0.ENDINIT bit, serving as an additional write-protection for
critical registers (besides Supervisor Mode protection). Registers protected via this line
can only be modified when Supervisor Mode is active and bit ENDINIT = 0.
Because servicing the Watchdog and modifications of the ENDINIT bit are critical
functions that must not be allowed in case of a system malfunction, a sophisticated
scheme is implemented that requires a password and guard bits during accesses to the
WDT control register. Any write access that does not deliver the correct password or the
correct value for the guard bits is regarded as a malfunction of the system, and a
Watchdog reset s triggered. In addition, even after a valid access has been performed
and the ENDINIT bit has been cleared to provide access to the critical registers, the
Watchdog imposes a time limit for this access window. If ENDINIT has not been properly
set again before this limit expires, the system is assumed have malfunctioned, and a
Watchdog reset is triggered. These stringent requirements, although not a guarantee,
nonetheless provide a high degree of assurance of the robustness of system operation.
A further enhancement in the TC1796’s WDT is its reset prewarning operation. Instead
of immediately resetting the device on the detection of an error (the way that standard
Watchdogs do), the WDT first issues an Non-Maskable Interrupt (NMI) to the CPU
before finally resetting the device at a specified time period later. This gives the CPU a
chance to save system state to memory for later examination of the cause of the
malfunction, an important aid in debugging.