-
Hi, Have been playing with the IWatchdog and the basics are working fine. I have tried the code below to freeze the counter, however it continues to reset while in deepsleep
I verified the register (DBG_IWDG_STOP at 0x4001 5808 and bit 12 is set to 1. So imho the IWDG should be frozen when in STOP mode. Chrs |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
Hi, As stated by the ref man: The only way I can see is to wakeup the mcu before the iwdg expiration to reset it. |
Beta Was this translation helpful? Give feedback.
-
@fpistm - I checked the ST ref docs over the weekend and freezing the IWDG downcounter indeed seems not possible for the STM32L082. I quickly tested: 1> Go to lowpower deepsleep for 20 seconds Testing the above results in an increase of approx. 1.5uA compared to not waking up to reload the IWDG |
Beta Was this translation helpful? Give feedback.
-
Note: The IWDG is also useful in this case to make sure you won't get stuck in sleep mode forever. |
Beta Was this translation helpful? Give feedback.
Hi,
I don't think you can stop it.
The
__HAL_DBGMCU_FREEZE_IWDG()
is used when the device enters Debug Mode (core halted) not in a low power mode.As stated by the ref man:
Once running, the IWDG cannot be stopped.
The only way I can see is to wakeup the mcu before the iwdg expiration to reset it.