AT32F421
Series Reference Manual
2022.11.11
Page 290
Rev 2.02
16
Watchdog timer (WDT)
16.1 WDT introduction
The WDT is driven by a dedicated low-speed clock (LICK). Due to the lower clock accuracy of LICK, the
WDT is best suited to the applications that have lower timing accuracy and can run independently
outside the main application.
16.2 WDT main features
12-bit downcounter
The counter is clocked by LICK (can work in Stop and Standby modes)
A system reset is generated when the counter value is decremented to 0
16.3 WDT functional overview
WDT enable:
Both software and hardware operations can be used to enable WDT. In other words, the WDT can be
enabled by writing 0xCCCC to the WDT_CMD register; or when the user enables the hardware watchdog
through user system data area, the WDT will be automatically enabled after power-on reset.
WDT reset:
W
hen the counter value of the WDT counts down to 0, a WDT reset be generated. Thus the WDT_CMD
register must be written with the value 0xAAAA at regular intervals to reload the counter value to avoid
the WDT reset.
WDT write-protected:
The WDT_DIV and WDT_RLD registers are write-protected. Writing the value 0x5555 to the WDT_CMD
register will unlock write protection. The update status of these two registers are indicated by the DIVF
and RLDF bits in the WDT_STS register. If a different value is written to the WDT_CMD register, these
two registers will be re-protected. Writing the value 0xAAAA to the WDT_CMD register also enables
write protection.
WDT clock:
The WDT counter is clocked by the LICK. The LICK is an internal RC clock with a typical value of
40kHz, with its range falling between 30kHz and 60kHz. The timeout period is also within a certain
range, so a margin should be taken into account when configuring timeout period. The LICK can be
calibrated to obtain the WDT timeout with a relatively accuracy. Refer to
Section 4.1.1
Figure 16-1 WDT block diagram
Prescaler register
WDT_DIV
Status register
WDT_STS
Reload register
WDT_RLD
8-bit
prescaler
12-bit reload
value
12-bit
downcounter
CMD register
WDT_CMD
LICK 40KHz
SYNC
1.2 V power domain
V
DD
power domain
SYNC
PCLK
CNT=0
reset