GD32F10x User Manual
255
Figure 13-2. Window watchdog timer block diagram
Reset
Write WWDGT_CTL
CNT>WIN
CNT[6]=0
Reset
PCLK1/4096
Prescaler
/1/2/4/8
7-Bit Down Counter
CNT
Window WIN
WDGTEN
The window watchdog timer is always disabled after power on reset. The software starts the
watchdog by setting the WDGTEN bit in the WWDGT_CTL register. Whenever window
watchdog timer is enabled, the counter counts down all the time, the configured value of the
counter should be greater than 0x3F (it implies that the CNT[6] bit should be set). The CNT[5:0]
determine the maximum time interval of two reloading. The countdown speed depends on the
APB1 clock and the prescaler (PSC[1:0] bits in the WWDGT_CFG register).
The WIN[6:0] bits in the configuration register (WWDGT_CFG) specifies the window value.
The software can prevent the reset event by reloading the downcounter when counter value
is less than the window value and greater than 0x3F, otherwise the watchdog causes a reset.
The early wakeup interrupt (EWI) is enabled by setting the EWIE bit in the WWDGT_CFG
register, and the interrupt is generated when the counter reaches 0x40. The software can do
something such as communication or data logging in the interrupt service routine (ISR) in
order to analyse the reason of software malfunctions or save the important data before
resetting the device. Moreover the software can reload the counter in ISR to manage a
software system check and so on. In this case, the WWDGT will never generate a WWDGT
reset but can be used for other things.
The EWI interrupt is cleared by writing '0' to the EWIF bit in the WWDGT_STAT register.
Содержание GD32F10 Series
Страница 1: ...GigaDevice Semiconductor Inc GD32F10x Arm Cortex M3 32 bit MCU User Manual Revision 2 6 Jun 2022 ...
Страница 63: ...GD32F10x User Manual 63 programmed during the chip production ...
Страница 117: ...GD32F10x User Manual 117 010 1 0 011 0 9 ...
Страница 416: ...GD32F10x User Manual 416 shadow register updates every update event ...
Страница 427: ...GD32F10x User Manual 427 value ...
Страница 518: ...GD32F10x User Manual 518 These bits are not used in SPI mode ...