2015-10-27 05:33 AM
I have implemented IWDG and when entering sleep mode IWDG wakes up STM and resets the device.
Can i disable IWDG and how?2015-10-27 06:03 AM
By not enabling IWDG ?
Watchdog units are purposely designed to be unstoppable once started. Otherwise, erratic code - the problem watchdogs are supposed to catch - could stop them, too. Or, if you need either WDG or sleep mode (but not both at the same time), set a marker in RAM or some unaffected register, let the IWDG reset happen, and skip the watchdog setup during initialization, before going into sleep mode.2015-10-27 06:16 AM
I enable watchdog at start, but when i enter sleep mode IWDG wake up the STM32 and i can't use it in sleep mode.
I wonder if there is possibility to turn off IWDG before sleep.So you telling that there is no way to use IWDG and sleep at the same time?I'm thinking of replacing IWDG with virtual WDG with systick. What is your opinion about that?2015-10-27 08:20 AM
I wonder if there is possibility to turn off IWDG before sleep.
Unfortunately, the reference manual doesn't say it explicitely, but if you check the respective chapter, there is no mention of ''disabling''. For the reasons mentioned, stopping a running watchdog is not ''designed in''.So you telling that there is no way to use IWDG and sleep at the same time?
Thinking about it, wanting sleep mode AND a watchdog running are somehow contradicting requirements. If you need both (in an alternating fashion), you will need to let the IWDG reset happen one time, to be able to reconfigure your application without IWDG, and then go to sleep again. After waking up from sleep, you can choose to (re-)enable the IWDG at any time - with the afore-mentioned consequences.
2015-10-27 11:01 AM
I know that implementation of sleep and IWDG is contradicting, but my application request both of them.
Thank you very much for your help and time.2017-08-28 11:06 PM
Depending on the STM32 you are using you may have options to disable the watchdogs in STOP and STANDBY mode from the option bytes configuration.
There is no such option for SLEEP mode.
Can you use STOP mode instead of SLEEP?
If you must use sleep, you will need to wake-up regularly to kick the dog...