Hi All
as you may know running IWDG and SLEEP mode together is not compatible i.e. you can never have IWDG when in SLEEP mode, if you do it will just reset you.
So IWDG can only protect against software issues whilst code is executing, as you have to reset it from the code.
You also cannot stop the IWDG prior to entering SLEEP mode, Once IWDG is started the only thing that will reset it is when it expires and resets the device.
So if you want to use IWDG and SLEEP, you have to work like this:-
Device starts up
Device checks a non-volatile setting to see what the state is
If the state is "normal", then the application starts as normal and enables the IWDG.
If the state is "sleep", then the application enters sleep mode, and no IWDG is started.
When running in "normal" if the application needs to enter "sleep" it writes to the non-volatile setting to set it to "sleep" and then lets the IWDG expire. This then resets the device and we start the loop again.
Now is it possible to do the checking of non-volatile setting and entering sleep in __early_init ?
Or does anyone else have any suggestion on this subject ?
IWDG and SLEEP mode(s)
Moderators: RoccoMarco, barthess
Re: IWDG and SLEEP mode(s)
decided to drop the IWDG and use the WWDG.
WWDG because it is run from APB bus when entering SLEEP one can disable the clock and thus pause it whist asleep.
Worth noting the new L4's and L1's have this ability with the IWDG, so ST must have thought it was a good idea to have.
WWDG because it is run from APB bus when entering SLEEP one can disable the clock and thus pause it whist asleep.
Worth noting the new L4's and L1's have this ability with the IWDG, so ST must have thought it was a good idea to have.
Who is online
Users browsing this forum: No registered users and 18 guests