GD32W51x User Manual
393
15.2.
Window watchdog timer (WWDGT)
15.2.1.
Overview
The window watchdog timer (WWDGT) is used to detect system failures due to software
malfunctions. After the window watchdog timer starts, the value of down counter reduces
progressively. The watchdog timer causes a reset when the counter reached 0x3F (the CNT[6]
bit has been cleared). The watchdog timer also causes a reset when the counter is refreshed
before the counter reached the window register value. So the software should refresh the
counter in a limited window. The window watchdog timer generates an early wakeup status
flag when the counter reaches 0x40 or refreshes before the counter reaches the window value.
Interrupt occurs if it is enabled.
The window watchdog timer clock is prescaled from the APB1 clock. The window watchdog
timer is suitable for the situation that requires an accurate timing.
15.2.2.
Characteristics
Programmable free-running 7-bit down counter.
Generate reset in two conditions when WWDGT is enabled:
–
Reset when the counter reached 0x3F.
–
The counter is refreshed when the value of the counter is greater than the window
register value.
Early wakeup interrupt (EWI): if the watchdog is started and the interrupt is enabled, the
interrupt occurs when the counter reaches 0x40 or refreshes before it reaches the
window value.
WWDGT debug mode, the WWDGT can stop or continue to work in debug mode.
15.2.3.
Function overview
If the window watchdog timer is enabled (set the WDGTEN bit in the WWDGT_CTL), the
watchdog timer cause a reset when the counter reaches 0x3F (the CNT[6] bit has been
cleared), or the counter is refreshed before the counter reaches the window register value.