DocID025202 Rev 7
708/1080
RM0365
System window watchdog (WWDG)
712
Figure 280. Watchdog block diagram
25.3.1
Enabling the watchdog
The watchdog is always disabled after a reset. It is enabled by setting the WDGA bit in the
WWDG_CR register, then it cannot be disabled again except by a reset.
25.3.2 Controlling
the
downcounter
This downcounter is free-running, counting down even if the watchdog is disabled. When
the watchdog is enabled, the T6 bit must be set to prevent generating an immediate reset.
The T[5:0] bits contain the number of increments which represents the time delay before the
watchdog produces a reset. The timing varies between a minimum and a maximum value
due to the unknown status of the prescaler when writing to the WWDG_CR register (see
). The Configuration register (WWDG_CFR) contains the high limit of the window:
To prevent a reset, the downcounter must be reloaded when its value is lower than the
window register value and greater than 0x3F.
describes the window watchdog
process.
Note:
The T6 bit can be used to generate a software reset (the WDGA bit is set and the T6 bit is
cleared).
25.3.3 Advanced
watchdog interrupt feature
The Early Wakeup Interrupt (EWI) can be used if specific safety operations or data logging
must be performed before the actual reset is generated. The EWI interrupt is enabled by
setting the EWI bit in the WWDG_CFR register. When the downcounter reaches the value
0x40, an EWI interrupt is generated and the corresponding interrupt service routine (ISR)
can be used to trigger specific actions (such as communications or data logging), before
resetting the device.
In some applications, the EWI interrupt can be used to manage a software system check
and/or system recovery/graceful degradation, without generating a WWDG reset. In this
case, the corresponding interrupt service routine (ISR) should reload the WWDG counter to
avoid the WWDG reset, then trigger the required actions.
06Y9
5(6(7
ELWGRZQFRXQWHU&17
:DWFKGRJFRQILJXUDWLRQUHJLVWHU::'*B&)5
FRPSDUDWRU
7!:
ZKHQ
:ULWH::'*B&5
3&/.
IURP5&&FORFNFRQWUROOHU
:'*SUHVFDOHU
:'*7%
:
:
:
:
:
:
:
:'*$
7
:DWFKGRJFRQWUROUHJLVWHU::'*B&5
7
7
7
7
7
7