TC1796
System Units (Vol. 1 of 2)
Watchdog Timer
User’s Manual
16-17
V2.0, 2007-07
WDT, V2.0
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, since 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).
16.4.6.5 WDT Operation During Power-Saving Modes
If the CPU is in Idle Mode or Sleep Mode, it cannot service the WDT because no software
is running. Excluding the case where the system is running normally, a strategy for
managing the WDT is needed while the CPU is in Idle Mode or Sleep Mode. There are
two ways to manage the WDT in these cases. First, the Watchdog can be disabled
before idling the CPU. This has the disadvantage that the system will no longer be
monitored during the idle period.
A better approach to this problem relies upon a wake-up feature of the WDT. Whenever
the CPU is put in Idle or Sleep Mode and the WDT is not disabled, it causes the CPU to
be awakened at regular intervals. When the WDT changes its count value
(WDT_SR.WDTTIM) from 7FFF
H
to 8000
H
(when the most significant bit of the WDT
counter changes its state from 0 to 1), the CPU is awakened and continues to execute
the instruction that follows the instruction that was last executed before entering the Idle
or Sleep Mode.
Note: Before switching into a non-running power-management mode, software should
perform a Watchdog service sequence. At the Modify Access, the Watchdog
reload value, WDT_CON0.WDTREL, should be programmed such that the wake-
up occurs after a period which best meets application requirements. The
maximum period between two CPU wake-ups is one-half of the maximum WDT
period.
16.4.6.6 WDT Operation in OCDS Suspend Mode
When the On-Chip Debugging System (OCDS) is enabled after reset, the WDT will
automatically stop when OCDS Suspend Mode is activated. It will resume operation after
the Suspend Mode is deactivated.
It is possible that severe system malfunctions may not be corrected even by a system
reset. If application code cannot be executed properly because of a system fault, then
the WDT initialization code itself might not be able to execute to service the WDT, with
the result that two WDT-initiated resets might occur back-to-back. A feature of the WDT
detects such Double Watchdog Errors and suspends all system operations after the
second reset occurs. This feature prevents the TC1796 from executing random wrong
code for longer than the Time-out Period, and prevents the TC1796 from being
repeatedly reset by the WDT.