
2. When the watchdog timer reset request signal is selected (when WDCTR<WDTOUT> is "1")
Setting WDCTR<WDTOUT> to "1" causes a watchdog timer reset request signal to occur when the
8-bit up counter overflows.
This watchdog timer reset request signal resets the TMP89FH42 and starts the warm-up operation.
5.3.5
Writing the watchdog timer control codes
The watchdog timer control codes are written into WDCDR.
By writing 0x4E (clear code) into WDCDR, the 8-bit up counter is cleared to "0" and continues counting the
source clock.
When WDCTR<WDTEN> is "0", writing 0xB1 (disable code) into WDCDR disables the watchdog timer
operation.
To prevent the 8-bit up counter from overflowing, clear the 8-bit up counter in a period shorter than the overflow
time of the 8-bit up counter and within the clear time.
By designing the program so that no overflow will occur, the program malfunctions and deadlock can be
detected through interrupts generated by watchdog timer interrupt request signals.
By applying a reset to the microcomputer using watchdog timer reset request signals, the CPU can be restored
from malfunctions and deadlock.
Example: When WDCTR<WDTEN> is "0", set the watchdog timer detection time to 220/fcgck [s], set the counter clear time
to half of the overflow time, and allow a watchdog timer reset request signal to occur if a malfunction is detected.
LD
(WDCTR), 0y00110011
;WDTW←10, WDTT←01, WDTOUT←1
Clear the 8-bit up counter at a point after
half of its overflow time and within a period
of the overflow time minus 1 source clock
cycle.
LD
(WDCDR), 0x4E
;Clear the 8-bit up counter
Clear the 8-bit up counter at a point after
half of its overflow time and within a period
of the overflow time minus 1 source clock
cycle.
LD
(WDCDR), 0x4E
;Clear the 8-bit up counter
Note:If the overflow of the 8-bit up counter and writing of 0x4E (clear code) into WDCDR occur simultaneously,
the 8-bit up counter is cleared preferentially and the overflow detection is not executed.
5.3.6
Reading the 8-bit up counter
The counter value of the 8-bit up counter can be read by reading WDCNT.
The stoppage of the 8-bit up counter can be detected by reading WDCNT at random times and comparing the
value to the last read value.
5.3.7
Reading the watchdog timer status
The watchdog timer status can be read at WDST.
WDST<WDTST> is set to "1" when the watchdog timer operation is enabled, and it is cleared to "0" when
the watchdog timer operation is disabled.
WDST<WINTST2> is set to "1" when a watchdog timer interrupt request signal occurs due to the overflow
of the 8-bit up counter.
TMP89FH42
5. Watchdog Timer (WDT)
5.3 Functions
Page 78
RA000