Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
346
/
631
Function description
Figure 15-1 Functional block diagram of the independent watchdog module
Note: Watchdog function is in V
DD
power supply area, and it can still work normally in RUN, SLEEP, LOW POWER
RUN, LOW POWER SLEEP and STANDBY modes.
To enable IWDG, we need to write 0xCCCC to IWDG_KEY.KEYV[15:0] bits. Counter starts counting down from
reset value (0xFFF). When counter count to 0x000, it generates a reset signal (IWDG_RESET) to MCU. Other than
that, as long as 0xAAAA (reload request) is write to IWDG_KEY.KEYV[15:0] bits before reset, the counter value is
set to the reload value in the IWDG_RELV.REL[11:0] bits and prevents the watchdog from resetting the entire device.
If the "hardware watchdog timer" function is enabled through the selection byte, the watchdog will automatically
start running after the system is powered on and will generate a system reset, unless the software reloads the counter
before it reaches ‘0’.
Register access protection
IWDG_PREDIV and IWDG_RELV register are write protected. To modify the value of those two register, user needs
to write 0x5555 to IWDG_KEY.KEYV[15:0] bits. Writing other value enables write protections again.
IWDG_STS.PVU indicates whether the pre-scaler value update is on going. IWDG_STS.CRVU indicates whether
the IWDG is updating the reload value. The hardware sets the IWDG_STS.PVU bit and/or IWDG_STS.CRVU bit
when the pre-scaler value and/or reload value is updating. After the pre-scaler value and/or reload value update is
complete, the hardware clears the IWDG_STS.PVU bit and/or IWDG_STS.CRVU bit.
The reload operation (IWDG_KEY.KEYV[15:0] configured with value of 0xAAAA) will also cause the registers to
IWDG_PREDIV.PD
4/8/16/32/64/128/256
LSI
40KHz
12 Bit
Down Counter
IWDG_STS.PVU
IWDG_RELV.REL
12-bit reload value
IWDG_STS.CRVU
IWDG Reset
Enable
IWDG_KEY.KEYV
User Program
Counter == 0
Reload
IWDG_KEY.KEYV == 0x5555