cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4r5vit rtc wakeup from stopmode2 and unable to re enter stopmode2

AJ.2
Associate II

Hi i am able to enter stop mode but after returning stop mode again i am unable enter stop mode

HAL_RTCEx_DeactivateWakeUpTimer(&hrtc); 
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 0x3FFF, RTC_WAKEUPCLOCK_RTCCLK_DIV16);
 
HAL_SuspendTick();
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);  
 
if(__HAL_PWR_GET_FLAG(PWR_FLAG_SB) != RESET){
/* Clear standby flag */
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_SB);
}
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WU);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUF2);
__HAL_PWR_CLEAR_FLAG(PWR_EXTI_LINE_PVD);
__HAL_PWR_CLEAR_FLAG(PWR_FLAG_WUFI); 
 
HAL_ResumeTick();  
1 REPLY 1
Imen.D
ST Employee

Hello @AJ.2 ,

I advise you this FAQ to help you in your configuration: How to configure the RTC to wake up the STM32 peri... - STMicroelectronics Community

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen