English
Language : 

TMP86PS44UG Datasheet, PDF (70/180 Pages) Toshiba Semiconductor – 8 Bit Microcontroller
7. Watchdog Timer (WDT)
7.2 Watchdog Timer Control
TMP86PS44UG
7.2.3 Watchdog Timer Disable
To disable the watchdog timer, set the register in accordance with the following procedures. Setting the reg-
ister in other procedures causes a malfunction of the microcontroller.
1. Set the interrupt master flag (IMF) to “0”.
2. Set WDTCR2 to the clear code (4EH).
3. Set WDTCR1<WDTEN> to “0”.
4. Set WDTCR2 to the disable code (B1H).
Note:While the watchdog timer is disabled, the binary counters of the watchdog timer are cleared.
Example :Disabling the watchdog timer
DI
LD
(WDTCR2), 04EH
LDW
(WDTCR1), 0B101H
: IMF ← 0
: Clears the binary counter
: WDTEN ← 0, WDTCR2 ← Disable code
Table 7-1 Watchdog Timer Detection Time (Example: fc = 16.0 MHz, fs = 32.768 kHz)
WDTT
00
01
10
11
Watchdog Timer Detection Time[s]
NORMAL1/2 mode
DV7CK = 0
DV7CK = 1
2.097
4
524.288 m
1
131.072 m
250 m
32.768 m
62.5 m
SLOW
mode
4
1
250 m
62.5 m
7.2.4 Watchdog Timer Interrupt (INTWDT)
When WDTCR1<WDTOUT> is cleared to “0”, a watchdog timer interrupt request (INTWDT) is generated
by the binary-counter overflow.
A watchdog timer interrupt is the non-maskable interrupt which can be accepted regardless of the interrupt
master flag (IMF).
When a watchdog timer interrupt is generated while the other interrupt including a watchdog timer interrupt
is already accepted, the new watchdog timer interrupt is processed immediately and the previous interrupt is
held pending. Therefore, if watchdog timer interrupts are generated continuously without execution of the
RETN instruction, too many levels of nesting may cause a malfunction of the microcontroller.
To generate a watchdog timer interrupt, set the stack pointer before setting WDTCR1<WDTOUT>.
Example :Setting watchdog timer interrupt
LD
SP, 043FH
LD
(WDTCR1), 00001000B
: Sets the stack pointer
: WDTOUT ← 0
Page 60