
Rev. 1.00
412 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
19 W
atchdog T
imer (WDT)
When the system enters the Sleep mode or Deep-Sleep1 mode, the Watchdog Timer counter will
either continue to count or stop depending on the WDTSHLT field setup in the WDTMR0 register.
However, the Watchdog Timer will always stop when the system is in the Deep-Sleep2 mode.
When the Watchdog stops counting, the count value is retained so that it continues counting after
the system is woken up from these three sleep modes. A Watchdog reset will occur any time when
the Watchdog Timer is running and when it has an operating clock source. When the system enters
the debug mode, the Watchdog Timer counter will either continue to count or stop depending on
the DBWDT bit of the MCUDBGCR register in the Clock Control Unit.
The Watchdog timer should be used in the following manners:
▆
Set the Watchdog Timer reload value (WDTV) and reset in the WDTMR0 register.
▆
Set the Watchdog Timer delta value (WDTD) and prescaler in the WDTMR1 register.
▆
Start the Watchdog Timer by writing to the WDTCR register with WDTRS = 1 and RSKEY =
0x5FA0.
▆
Write to the WDTPR register to lock all the Watchdog Timer registers except for WDTCR and
WDTPR.
▆
The Watchdog Timer counter should be reloaded again within the delta value (WDTD).
0
WDTD
WDTV
0xFFF
Time
Reload counter when
counter
≤
WDTD
Normal behavior
Watchdog Timer underflow
Reload counter when counter > WDTD
. . .
Start counter
Reset occurred
(If WDTRSTEN = 1)
Watchdog Timer error
Reset not occurred
(If WDTRSTEN = 0)
Reload is allowed
Reload is not allowed
Counter value
Figure 139. Watchdog Timer Behavior