WAKEUP with RTC_WAKEUPCLOCK_CK_SPRE_16BITS not Working
Hi everyone,
I have a problem with the STM32F401RE wakeup timer setup, to exit standby.
This is my code.
* Disable Wake-up timer */
HAL_RTCEx_DeactivateWakeUpTimer(&RTCHandle);
/*## 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);
/*## Setting the Wake up time ######################################*/
HAL_RTCEx_SetWakeUpTimer(&RTCHandle, 60, RTC_WAKEUPCLOCK_CK_SPRE_16BITS);
/*## Enter Standby Mode##########################################*/
/* Request to enter STANDBY mode */
HAL_PWR_EnterSTANDBYMode();
If I use the
HAL_RTCEx_SetWakeUpTimer_IT(&RTCHandle, 0x2805,RTC_WAKEUPCLOCK_RTCCLK_DIV16);
it works well
But if I want longer times and use HAL_RTCEx_SetWakeUpTimer(&RTCHandle, 60, RTC_WAKEUPCLOCK_CK_SPRE_16BITS);
it does not come out of the standby condition. aftet 60 seconds
What's wrong.
A little help, Please.
Fausto
