GD32W51x User Manual
388
Figure 15-1. Free watchdog timer block diagram
IRC32K
Reset
Prescaler
/4/8
…256
12-Bit
DownCounter
Reload
register
Control
register
Reload
Status: PUD
Status: PUD
The free watchdog timer is enabled by writing the value 0xCCCC to the control register
(FWDGT_CTL), then the counter starts counting down. When the counter reaches the value
0x000, there will be a reset.
The counter can be reloaded by writing the value (0xAAAA) to the FWDGT_CTL register at
anytime. The reload value comes from the FWDGT_RLD register. The software can prevent
the watchdog reset by reloading the counter before the counter reaches the value 0x000.
The free watchdog timer can automatically start when power on if the hardware free watchdog
timer bit in the device option bits is set. To avoid reset, the software should reload the counter
before the counter reaches 0x000.
The FWDGT_PSC register and the FWDGT_RLD register are write protected. Before writing
these registers, the software should write the value (0x5555) to the FWDGT_CTL register.
These registers will be protected again by writing any other value to the FWDGT_CTL register.
When an update operation of the prescaler register (FWDGT_PSC) or the reload value
register (FWDGT_RLD) is ongoing, the status bits in the FWDGT_STAT register are set.
If the FWDGT_HOLD bit in DBG module is cleared, the FWDGT continues to work even the
Cortex™-M33 core halted (Debug mode). The FWDGT stops in Debug mode if the
FWDGT_HOLD bit is set.
Table 15-1. Min/max FWDGT timeout period at 32 kHz (IRC32K)
Prescaler divider PSC[2:0] bits
Min tim eout (m s)
RLD[11:0]=0x000
Max tim eout (m s)
RLD[11:0]=0xFFF
1/4
000
0.03125
511.90625
1/8
001
0.03125
1023.78125
1/16
010
0.03125
2047.53125
1/32
011
0.03125
4095.03125
1/64
100
0.03125
8190.03125
1/128
101
0.03125
16380.03125
1/256
110 or 111
0.03125
32760.03125