TC1796
System Units (Vol. 1 of 2)
Reset and Boot Operation
User’s Manual
4-9
V2.0, 2007-07
Reset, V2.0
NMI invokes the trap service routine and can save critical states of the microcontroller
for later examination to determine the cause of the Watchdog Timer failure. However, it
is not possible to stop or terminate the Watchdog Timer’s time-out mode or prevent the
pending watchdog reset.
However, software can prevent the Watchdog Timer by issuing a software reset on its
own. Since the cause of the system failure is presumably unknown at that time, and it is
presumably uncertain which functions of the TC1796 are operating properly, it is
recommended that the software reset is configured to reset all system functions
including the System Timer and external reset output HDRST, and to use the hardware
boot configuration bit field as boot configuration source indicator.
If the NMI trap handler does not perform a software reset, or if the system is so
compromised that the trap handler cannot be executed, the Watchdog Timer will cause
a Watchdog Timer reset to occur at the end of its time-out mode period. The actions
performed on a Watchdog Timer reset sequence are the same as are performed for an
external hardware reset. At the end of the Watchdog Timer reset sequence, bits
WDTRST, RSSTM, and RSEXT are set in register RST_SR. All other reset flags are
cleared.
Watchdog Timer Reset Lock
When the system emerges from any reset condition, the Watchdog Timer becomes
active, and, unless prevented by initialization software, will eventually time out.
Ordinarily, initialization software will configure the Watchdog Timer and commence
servicing it on a regular basis to indicate that it is functioning properly. Should the system
be malfunctioning such that initialization and service are not performed in a timely
fashion, the Watchdog Timer will time out, causing a Watchdog Timer reset.
If the TC1796 system is so corrupted that it is chronically unable to service the Watchdog
Timer, the danger could arise that the system would be continuously reset every time the
Watchdog Timer times out. This could lead to serious system instability, and to the loss
of information about the original cause of the failure.
However, the reset circuitry of the TC1796 is designed to detect this condition. If a
Watchdog Timer error occurs while one or both of the Watchdog Timer error flags
(WDT_SR.WDTAE and WDT_SR.WDTOE) are already set to 1, the reset circuitry locks
the TC1796 permanently in reset (Reset Lock, HDRST permanently active) until the next
power-on reset occurs by activation of the PORST pin.
This situation could arise, for example, if the connection to external code memory is lost
or memory becomes corrupt, such that no valid code can be executed, including the
initialization code. In this case, the initial time-out period of the Watchdog Timer cannot
be properly terminated by software. The Watchdog Timer error flag WDTOE will be set
when the Watchdog Timer overflows, and a Watchdog Timer reset will be triggered (after
the watchdog reset pre-warning phase). The error flag WDTOE is not cleared by the
Watchdog Timer reset that subsequently occurs. After finishing the Watchdog Timer