STM32F469I-DISCO standby mode RTC wake up immediately issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-11 10:12 PM
I used STM32F469I-DISCO and STM32F429I-DISCO to testing Standby mode function by PWR example(Attach). Standby mode function is no problem on
STM32F429I-DISCO. But in STM32F469I-DISCO , used RTC wake up form standby mode , first time is normal , but second time to into standby mode will wake up immediately. How can I fix it , thanks.
ps, I already clear flag as below.
/*## Clear all related wakeup flags ########################################*/
/* Clear PWR wake up Flag */ __HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);/* Clear RTC Wake Up timer Flag */
__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&RTCHandle, RTC_FLAG_WUTF);- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-12 12:37 AM
Hi
hanklee107@yahoo.com.tw
‌,Have you try to start from standby example under the STM32CUBEF4 firmware package?
STM32Cube_FW_F4_V1.0\Projects\STM32469I-Discovery\Examples\PWR\PWR_STANDBY
-Nesrine-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-12 6:23 PM
Hi Nesrine M,
I had try to test standby example and result is normal. But this standby example wake up from user button. I already try user button wake up is normal , but RTC wake up have problem.
Thanks.
Hank Lee,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-21 12:34 AM
I found if RTC wake up timer flag (WUTF) set 1 once time , then next time run into standby mode will wake up immediately even clear WUTF first. But system reset (HAL_NVIC_SystemReset()) can fix it.
Anybody have suggestion?
Thanks,
Hank Lee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 12:57 AM
Hi Hank I have the same problem with STM32L476. After power on the first wake up is fine, but each subsequent fails. After programming the uC, even the first will fail. Maybe you have solved the problem? Probably one more flag has not been reset. Someone has an idea how to solve it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-01-15 1:00 AM
Even after RTC deinit which clears the registers and init RTC one more time the problem is the same.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2019-05-07 9:58 PM
I have the same problem.
I tried to deint RTC and init RTC one more time and the problem is the same.
Does anyone have slove this problem??? Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-03-28 12:12 PM
For reference if someone has the same problem:
Using an STM32L071 I had to reset 3 flags after wakeup from standby (as pawel.poplawski already suspected).
These are RTC Internal Wake up flag, PWR Standby flag and additionaly PWR wakeup flag.
So the code using LL looks like this:
if (LL_PWR_IsActiveFlag_SB() != 1)
{
/* ##### Run after normal reset ##### */
}
else
{
/* ##### Run after standby mode ##### */
/* Clear Standby flag */
LL_PWR_ClearFlag_SB();
/* Clear wakeup flag */
LL_PWR_ClearFlag_WU();
/* Reset RTC Internal Wake up flag */
LL_RTC_ClearFlag_WUT(RTC);
}
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-08-18 7:37 PM
For me working on STM32G030F6 I had similar problem, and simply calling
LL_PWR_ClearFlag_WU(); //Need to clear the wakeup flags or else MCU immediately wakes up from standby!
HAL_PWR_EnterSTANDBYMode(); //Enter standby mode (see you next runtime!
made things work for me. Seems the only thing causing standby to fail in my case was the wakeup flags in the PWR_SCR register
