2022-03-02 12:36 AM
HAL_PWR_EnterSTANDBYMode() will still wait properly, but HAL_PWREx_EnterSHUTDOWNMode() will immediately return to RUN mode.
What do you think is the cause of immediate wakeup?
As shown below, the only code difference is whether to enable HAL_PWREx_EnterSHUTDOWNMode () or HAL_PWR_EnterSTANDBYMode ().
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
__HAL_RTC_WAKEUPTIMER_CLEAR_FLAG(&hrtc, RTC_FLAG_WUTF);
while(1)
{
HAL_PWREx_EnterSHUTDOWNMode();
// HAL_PWR_EnterSTANDBYMode();
}
Best regards,
Solved! Go to Solution.
2022-03-02 08:31 PM
I solved it myself.
The cause was that nRST_SHDW was unchecked in the option byte.
Best regards,
2022-03-02 08:31 PM
I solved it myself.
The cause was that nRST_SHDW was unchecked in the option byte.
Best regards,
2022-03-03 11:56 AM
Hello @則幸 �?�岡 ,
Really glad to know you overcame this problem.
Thank you for the update you provided.
Thanks
Imen