Question
STM32wl series: Wakeup call with rtc
Hi.
I'm implementing a wakeup call using the STM32WLxx series and an RTC. However, when I use this, the device enters standby mode but upon wakeup, the code completely resets and runs from the beginning. It seems like the main function is running without any issues. Please let me know if there are any mistakes in my code.
int main(void)
{
HAL_Init();
SystemClock_Config();
MX_GPIO_Init();
MX_RTC_Init();
HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 61475, RTC_WAKEUPCLOCK_RTCCLK_DIV16, 0);
while (1) {
HAL_SuspendTick();
HAL_PWR_EnterSTANDBYMode();
HAL_RTCEx_DeactivateWakeUpTimer(&hrtc);
HAL_ResumeTick();
}
}