IWDG is not turnoff in shutdown mode of controller(STM32L4R5)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-22 12:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-22 4:02 AM
Exactly.
The watchdogs cannot be turned off once enabled. See the reference manual/datasheets.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-23 2:55 AM
Actually when entering the shutdown/standby mode of controller, as per reference manual/datasheet. IWDG has to be disable, as LSI clock is also getting disabled, but here in my case it is still active and after IWDG configuration time it is resetting the controller. I suspect that bits in the flash optr register need to take care to avoid this issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-24 7:40 AM
Hi,
this is quite tricky. It is true, that IWDG cannot be turned off once enabled. But it is also true, that IWDG and LSI are not running in SHUTDOWN mode (but it can run in STANDBY mode (RefManual)). It is possible, that You are not entering SHUTDOWN mode, but another LP mode.
Please check out also this thread with possibly same issue:
https://community.st.com/s/question/0D50X0000BeaMHpSQM/stm32l4-iwdg-wake-up-device-in-shutdown-mode-
Have a nice day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-04-27 3:19 AM
Hi Tomas, Thanks for link, But i feel that problem is with FLASH_OPTR register. Actually this register holding two bit(s) , which can freeze the IWDG in standby and stop mode, but this bit unable to reset. following code i have used.
HAL_FLASH_Unlock();
__HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_OPTVERR);
HAL_FLASH_OB_Unlock();
HAL_FLASHEx_OBGetConfig(&pOBInit);
pOBInit.OptionType=OPTIONBYTE_USER;
pOBInit.USERType=OB_USER_IWDG_SW|OB_USER_IWDG_STOP|OB_USER_IWDG_STDBY;
pOBInit.USERConfig=OB_IWDG_STOP_FREEZE|OB_IWDG_STDBY_FREEZE;
HAL_FLASHEx_OBProgram(&pOBInit);
HAL_FLASH_OB_Launch();
HAL_FLASH_OB_Lock();
HAL_FLASH_Lock();
Thanks!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-12 3:05 AM
The real solution is there:
https://community.st.com/s/question/0D53W00000947bASAQ/stm32l433-iwdg-wakes-up-from-shutdown-mode
