
168
CHAPTER 9 WATCHDOG TIMER
User
’
s Manual U15017EJ2V0UD
9.3 Operations
The watchdog timer is cleared by setting the RUN bit of the watchdog timer mode register (WDM) to 1 to start
counting. After the RUN bit is set to 1, when the overflow time set by bits WDT2 and the WDT1 in WDM has elapsed,
a non-maskable interrupt (INTWDT) is generated.
If the RUN bit is reset to 1 before the overflow time elapses, the watchdog timer is cleared, and counting restarts.
9.4 Cautions
9.4.1 General cautions when using the watchdog timer
(1) The watchdog timer is one way to detect runaway operation, but all runaway operations cannot be detected.
Therefore, in a device that particularly demands reliability, the runaway operation must be detected early not only
by the on-chip watchdog timer but by an externally attached circuit; and when returning to the normal state or
while in the stable state, processing like stopping the operation must be possible.
(2) The watchdog timer cannot detect runaway operation in the following cases.
<1>
<2>
When the watchdog timer is cleared in a timer interrupt servicing program
When there are successive temporary stores of interrupt requests and macro services (refer to
16.9 When
Interrupt Requests and Macro Service Are Temporarily Held Pending
)
When runaway operation is caused by logical errors in the program (when each module in the program
operates normally, but the entire system does not operate properly), and when the watchdog timer is
periodically cleared
When the watchdog timer is periodically cleared by an instruction group that is executed during runaway
operation
When the STOP mode and HALT mode or IDLE mode is the result of runaway operation
When the watchdog timer also runs wild when the CPU runs wild because of introduced noise
<3>
<4>
<5>
<6>
In cases <1>, <2>, and <3>, detection becomes possible by correcting the program.
In case <4>, the watchdog timer can be cleared only by the 4-byte special instruction. Similarly in <5>, if there
is no 4-byte special instruction, the STOP mode and HALT mode or IDLE mode cannot be set. Since the result
of the runaway operation is to enter state <2>, three or more bytes of consecutive data must be a specific pattern
(example, BT PSWL.bit, $$). Therefore, the results of <4>, <5>, and the runaway operation are believed to very
rarely enter state <2>.
9.4.2 Cautions about the
μ
PD784976A Subseries watchdog timer
(1) Only the special instruction (MOV WDM, #byte) can write to the watchdog timer mode register (WDM).
(2) If the RUN bit is set to 1 by writing to the watchdog timer mode register (WDM), write the same value every time.
Even when different values are written, the contents written the first time cannot be changed.
(3) If the RUN bit is set to 1, it cannot be reset to 0 by the software.