RM0091
21
Independent watchdog (IWDG)
21.1
Introduction
The devices feature an embedded watchdog peripheral which offers a combination of high
safety level, timing accuracy and flexibility of use. The Independent watchdog peripheral
serves to detect and resolve malfunctions due to software failure, and to trigger system
reset when the counter reaches a given timeout value.
The independent watchdog (IWDG) is clocked by its own dedicated low-speed clock (LSI)
and thus stays active even if the main clock fails.
The IWDG is best suited to applications which require the watchdog to run as a totally
independent process outside the main application, but have lower timing accuracy
constraints. For further information on the window watchdog, refer to
461.
21.2
IWDG main features
●
Free-running downcounter
●
Clocked from an independent RC oscillator (can operate in Standby and Stop modes)
●
Conditional Reset
–
–
21.3
IWDG functional description
Figure 192
When the independent watchdog is started by writing the value 0x0000 CCCC in the Key
register (IWDG_KR), the counter starts counting down from the reset value of 0xFFF. When
it reaches the end of count value (0x000) a reset signal is generated (IWDG reset).
Whenever the key value 0x0000 AAAA is written in the IWDG_KR register, the IWDG_RLR
value is reloaded in the counter and the watchdog reset is prevented.
21.3.1
Window option
The IWDG can also work as a window watchdog by setting the appropriate window in the
IWDG_WINR register.
If the reload operation is performed while the counter is greater than the value stored in the
window register (IWDG_WINR), then a reset is provided.
The default value of the IWDG_WINR is 0x0000 0FFF, so if it is not updated, the window
option is disabled.
As soon as the window value is changed, a reload operation is performed in order to reset
the downcounter to the IWDG_RLR value and ease the cycle number calculation to
generate the next reload.
Reset (if watchdog activated) when the downcounter value becomes less than
000h
Reset (if watchdog activated) if the downcounter is reloaded outside the window
shows the functional blocks of the independent watchdog module.
Doc ID 018940 Rev 1
Independent watchdog (IWDG)
Section 22 on page
453/742
Need help?
Do you have a question about the STM32F05 series and is the answer not in the manual?
Questions and answers