
M0A21/M0A23 Series
May 06, 2022
Page
318
of 746
Rev 1.02
M0
A21
/M
0
A
2
3
SE
RIES
TEC
H
NICAL
RE
FEREN
C
E
M
ANUAL
–
WDT clock source can be changed only if CWDTEN[2:0] is 111.
The WDT clock control is shown in Figure 6.8-2.
10
01
HCLK/2048
WDTSEL (CLK_CLKSEL1[1:0])
WDT_CLK
11
38.4kHz (LIRC)
32.768 kHz (LXT)
WDTCKEN (CLK_APBCLK0[0])
Figure 6.8-2 Watchdog Timer Clock Control
6.8.5
Functional Description
The WDT includes an 20-bit free running up counter with programmable time-out intervals. Table 6.8-1
shows the WDT time-out interval period selection and Figure 6.8-3 shows the WDT time-out interval
and reset period timing.
6.8.5.1
WDT Time-out Interrupt
Setting WDTEN (WDT_CTL[7]) to 1 will enable the WDT function and the WDT counter to start counting
up. The SYNC (WDT_CTL[30]) can be indicated whether enable/disable WDTEN function is completed
or not. There are eight time-out interval period can be selected by setting TOUTSEL (WDT_CTL[11:8]).
When the WDT up counter reaches the TOUTSEL (WDT_CTL[11:8]) settings, WDT time-out interrupt
will occur then WDT time-out interrupt flag IF (WDT_CTL[3]) will be set to 1 immediately. If INTEN
(WDT_CTL[6]) is enabled, WDT time-out interrupt will inform CPU.
6.8.5.2
WDT Reset Delay Period and Reset System
There is a specified T
RSTD
reset delay period follows the IF (WDT_CTL[3]) is setting to 1. User should
set WDT_RSTCNT to reset the 20-bit WDT up counter value to avoid generate WDT time-out reset
signal before the T
RSTD
reset delay period expires. Moreover, user should set RSTDSEL (WDT_ALTCTL
[1:0]) to select reset delay period to clear WDT counter. If the WDT up counter value has not been
cleared after the specific T
RSTD
delay period expires, the WDT control will set RSTF (WDT_CTL[2]) to 1
if RSTEN (WDT_CTL[1]) bit is enabled, then chip enters reset state immediately. Refer to Figure 6.8-3.
T
RST
reset period will keep last 63 WDT clocks then chip restart executing program from reset vector
(0x0000_0000). The RSTF (WDT_CTL[2]) will keep 1 after WDT time-out resets the chip, user can
check RSTF (WDT_CTL[2]) by software to recognize the system has been reset by WDT time-out reset
or not.