
225
CHAPTER 12
WATCHDOG TIMER
User’s Manual U12697EJ4V1UD
12.4 Cautions
12.4.1 General cautions when using the watchdog timer
(1) The watchdog timer is one way to detect an inadvertent program loop, but not all the program loops can be
detected. Therefore, in a device that demands particularly high reliability, the inadvertent program loop 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 inadvertent program loops in the following cases.
<1> When the watchdog timer is cleared in a timer interrupt servicing program
<2> When there are successive temporary stores of interrupt requests and macro services (see 22.9 When
Interrupt Requests and Macro Service Are Temporarily Held Pending)
<3> When an inadvertent program loop 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
<4> When the watchdog timer is periodically cleared by an instruction group that is executed during an
inadvertent program loop
<5> When the STOP mode and HALT mode or IDLE mode is the result of an inadvertent program loop
<6> When the watchdog timer also inadvertently loops when the CPU hangs up because of introduced noise
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 inadvertent program loop 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 inadvertent program loop are
believed to very rarely enter state <2>.
12.4.2 Cautions about the
PD784225 Subseries watchdog timer
(1) The watchdog timer mode register (WDM) can only be written by a special instruction (MOV WDM, #byte).
(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) Once the RUN bit is set to 1, it cannot be reset to 0 by the software.