English
Language : 

M054ZBN Datasheet, PDF (43/68 Pages) List of Unclassifed Manufacturers – 32-BIT MICROCONTROLLER
NuMicro™ M052/M054BN Data Sheet
6.9 Watchdog Timer (WDT)
6.9.1 Overview
The purpose of Watchdog Timer is to perform a system reset when system runs into an unknown
state. This prevents system from hanging for an infinite period of time. Besides, this Watchdog
Timer supports another function to wakeup chip from power down mode. The watchdog timer
includes an 18-bit free running counter with programmable time-out intervals. Table 6-2 show the
watchdog timeout interval selection and Figure 6.9-1 shows the timing of watchdog interrupt
signal and reset signal.
Setting WTE (WDTCR [7]) enables the watchdog timer and the WDT counter starts counting up.
When the counter reaches the selected time-out interval, Watchdog timer interrupt flag WTIF will
be set immediately to request a WDT interrupt if the watchdog timer interrupt enable bit WTIE is
set, in the meanwhile, a specified delay time (1024 * TWDT) follows the time-out event. User must
set WTR (WDTCR [0]) (Watchdog timer reset) high to reset the 18-bit WDT counter to avoid chip
from Watchdog timer reset before the delay time expires. WTR bit is cleared automatically by
hardware after WDT counter is reset. There are eight time-out intervals with specific delay time
which are selected by Watchdog timer interval select bits WTIS (WDTCR [10:8]). If the WDT
counter has not been cleared after the specific delay time expires, the watchdog timer will set
Watchdog Timer Reset Flag (WTRF) high and reset chip. This reset will last 63 WDT clocks (TRST)
then chip restarts executing program from reset vector (0x0000 0000). WTRF will not be cleared
by Watchdog reset. User may poll WTFR by software to recognize the reset source. WDT also
provides wakeup function. When chip is powered down and the Watchdog Timer Wake-up
Function Enable bit (WDTR[4]) is set, if the WDT counter reaches the specific time interval
defined by WTIS (WDTCR [10:8]) , the chip is waken up from power down state. First example, if
WTIS is set as 000, the specific time interval for chip to wake up from power down state is 24 *
TWDT. When power down command is set by software, then, chip enters power down state. After
24 * TWDT time is elapsed, chip is waken up from power down state. Second example, if WTIS
(WDTCR [10:8]) is set as 111, the specific time interval for chip to wake up from power down
state is 218 * TWDT. If power down command is set by software, then, chip enters power down
state. After 218 * TWDT time is elapsed, chip is waken up from power down state. Notice if WTRE
(WDTCR [1]) is set to 1, after chip is waken up, software should chip the Watchdog Timer counter
by setting WTR(WDTCR [0]) to 1 as soon as possible. Otherwise, if the Watchdog Timer counter
is not cleared by setting WTR (WDTCR [0]) to 1 before time starting from waking up to software
clearing Watchdog Timer counter is over 1024 * TWDT , the chip is reset by Watchdog Timer.
WTIS
000
001
010
011
100
101
110
111
Timeout Interval Selection
TTIS
24 * TWDT
26 * TWDT
28 * TWDT
210 * TWDT
212 * TWDT
214 * TWDT
216 * TWDT
218 * TWDT
Interrupt Period
TINT
1024 * TWDT
1024 * TWDT
1024 * TWDT
1024 * TWDT
1024 * TWDT
1024 * TWDT
1024 * TWDT
1024 * TWDT
WTR Timeout Interval (WDT_CLK=10 kHz)
MIN. TWTR ~ MAX. TWTR
1.6 ms ~ 104 ms
6.4 ms ~ 108.8 ms
25.6 ms ~ 128 ms
102.4 ms ~ 204.8 ms
409.6 ms ~ 512 ms
1.6384 s ~ 1.7408 s
6.5536 s ~ 6.656 s
26.2144 s ~ 26.3168 s
Table 6-2 Watchdog Timeout Interval Selection
- 43 -
Publication Release Date: Mar. 19, 2012
Revision V1.01