![Infineon Technologies TC1796 Скачать руководство пользователя страница 947](http://html1.mh-extra.com/html/infineon-technologies/tc1796/tc1796_user-manual_2055437947.webp)
TC1796
System Units (Vol. 1 of 2)
Watchdog Timer
User’s Manual
16-9
V2.0, 2007-07
WDT, V2.0
16.4.2.4 Prewarning Mode
Prewarning Mode is entered always when a Watchdog error is detected. This can be due
to an overflow of the timer in Normal or Time-Out Mode, or an invalid access to register
WDT_CON0. Instead of immediately generating a reset of the device, as other WDTs
do, the TC1796 WDT provides the system with a chance to save important state
information before the reset occurs. This is done through first activating an NMI trap
request to the CPU, warning it about the coming reset (reset prewarning). If the CPU is
still able to do so (depending on the type and severity of the detected malfunction), it can
react to the Watchdog NMI request and can save important system state to memory.
This saved system state can then be examined during debugging to determine the cause
of the malfunction. If the part would be immediately reset on the detection of a Watchdog
error, this debugging information would never be available, and investigating the cause
of the malfunction would be a very difficult task.
In Prewarning Mode, after having generated the NMI request, the WDT counts for a
specified period of time, and then generates a Watchdog reset for the device. This reset
generation cannot be avoided in this mode; the WDT does not react anymore to
accesses to its registers, nor will it change its state. This is to prevent a malfunction from
falsely terminating this mode, disabling the reset, and letting the device to continue to
function improperly.
Note: In Prewarning Mode, it is not required for the part to wait for the end of this mode
and the reset. After having saved required state in the NMI routine, software can
execute a software reset to shorten the time. However, the state of the Watchdog
Status Register should also be saved in this case, because the error flags
contained in it will be cleared due to the software reset (this is not the case if the
Watchdog reset is awaited).