GD32F20x User Manual
306
Figure 16-1. Free watchdog block diagram
IRC40K
Reset
Prescaler
/4/8
…256
12-Bit
DownCounter
Reload
register
Control
register
Reload
Status: PUD
Status: RUD
The free watchdog is enabled by writing the value 0xCCCC in the control register
(FWDGT_CTL), and the counter starts counting down. When the counter reaches the value
0x000, a reset is generated.
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 can automatically start at power on when the hardware free watchdog 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 written 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 on going, 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™-M3 core halted (Debug mode). While the FWDGT stops in Debug mode if the
FWDGT_HOLD bit is set.
Table 16-1. Min/max FWDGT timeout period at 40 kHz (IRC40K)
Prescaler divider PSC[2:0] bits
Min timeout (ms)
RLD[11:0]=0x000
Max timeout (ms)
RLD[11:0]=0xFFF
1/4
000
0.1
409.6
1/8
001
0.2
819.2
1/16
010
0.4
1638.4
1/32
011
0.8
3276.8
1/64
100
1.6
6553.6
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...