Associate II
May 19, 2022
Solved
Why doesn't the uC STM32L431CCT6 exit standby mode with RTC wakeup event?
- May 19, 2022
- 7 replies
- 3367 views
I have a STM32L431CCT6 uC configured with CubeMX (project attached): RTC connected to LSE 32.768 kHz, auto wake up enabled. In my code, I perform the following calls:
HAL_GPIO_WritePin(LED2_RESET_ESP32_GPIO_Port, LED2_RESET_ESP32_Pin, GPIO_PinState::GPIO_PIN_RESET);
HAL_PWREx_EnableInternalWakeUpLine();
result = HAL_RTCEx_SetWakeUpTimer(&hrtc, 0x0000FFFF, RTC_WAKEUPCLOCK_RTCCLK_DIV2);
if(result == HAL_OK)
{
HAL_PWR_EnterSTANDBYMode();
}The uC enters correctly the standby mode, it should wake up after 4 seconds, ma it never does. I tried to check if wake up interrupt is launched, removing the HAL_PWR_EnterSTANDBYMode() call, but handler code is never executed (no breakpoint hit, no led blinked).