
M0A21/M0A23 Series
May 06, 2022
Page
317
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
6.8 Watchdog Timer (WDT)
6.8.1
Overview
The Watchdog Timer (WDT) is used 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
the function to wake up system from Idle/Power-down mode.
6.8.2
Features
20-bit free running up counter for WDT time-out interval
Selectable time-out interval (2
4
~ 2
20
) and the time-out interval is 416us ~ 27.3 s if
WDT_CLK =
38.4 kHz (LIRC).
System kept in reset state for a period of (1 / WDT_CLK) * 63
Supports selectable WDT reset delay period, including 1026, 130, 18 or 3 WDT_CLK
reset delay period
Supports to force WDT enabled after chip powered on or reset by setting CWDTEN[2:0]
in Config0 register
Supports WDT time-out wake-up function only if WDT clock source is selected as
LIRC or
LXT.
6.8.3
Block Diagram
20- bit WDT Counter
0
… ... 17
..
4
18 19
0000
0001
0111
1000
:
:
WDT_CLK [Note 2]
Time-
Out
Interval
Period
select
Reset
Delay
Period
Select
[Note 3]
Watchdog
Interrupt
Watchdog
Reset [Note 1]
RSTCNT(WDT_RSTCTL[31:0])
Reset WDT
Counter
WDTEN
(WDT_CTL[7])
Wakeup CPU from
Power - down mode
TOUTSEL
(WDT_CTL[11:8])
IF
(WDT_CTL[3])
INTEN
(WDT_CTL[6])
RSTEN
(WDT_CTL[1])
RSTF
(WDT_CTL[2])
WKEN
(WDT_CTL[4])
WKF
(WDT_CTL[5])
Figure 6.8-1 Watchdog Timer Block Diagram
Note1:
WDT resets CPU and lasts 63 WDT_CLK.
Note2:
Chip can be woken up by WDT time-out interrupt signal generated only if WDT clock source is
selected to LIRC or LXT.
Note3:
The WDT reset delay period can be selected as 3/18/130/1026 WDT_CLK.
6.8.4
Basic Configuration
Clock Source Configuration
–
Select the source of WDT peripheral clock on WDTSEL (CLK_CLKSEL1[1:0])
–
Enable WDT peripheral clock in WDTCKEN (CLK_APBCLK0[0]).
–
Force enable WDT controller after chip powered on or reset in CWDTEN[2:0]
(CWDTEN[2] is Config0[31], CWDTEN[1:0] is Config0[4:3])