Skip to main content
Graduate II
July 10, 2025
Question

Cannot wake-up from STOP mode with LPTIM

  • July 10, 2025
  • 1 reply
  • 232 views

Greetings, 
I am having trouble in waking up from Stop mode in STM32U585RIT6 LQFP64 MCU. 
So I saw the following posts: 
https://community.st.com/t5/stm32-mcus/troubleshooting-waking-up-from-stop-mode-issues-with-lptim-in/ta-p/745343
https://community.st.com/t5/stm32-mcus-products/lptim-interrupt-can-t-wake-stm32u5-from-stop-low-power-mode/td-p/55162
At the main function I placed:
__HAL_RCC_LPTIM1_CONFIG(RCC_LPTIM1CLKSOURCE_LSE);
__HAL_RCC_RTCAPB_CLKAM_ENABLE();
__HAL_RCC_LPTIM1_CLKAM_ENABLE();
as it was referred in those posts. 

So I am going to stop mode in the following way: 
HAL_LPTIM_Counter_Start_IT(&hlptim1);
HAL_PWR_EnterSTOPMode(PWR_LOWPOWERREGULATOR_ON, PWR_STOPENTRY_WFI);

And it was supposed to wake-up when the counter register reached the expected value.
Then I call the callback:

void HAL_LPTIM_AutoReloadMatchCallback(LPTIM_HandleTypeDef* hlptim)

   SystemClock_Config();
    .... 
}

Still isn't work. Am I missing something?
Thank you! 

    This topic has been closed for replies.

    1 reply

    Graduate II
    July 10, 2025

    Have you enable NVIC interrupt? And dont place systemclockconfig in ISR callback. Simply next line after stop is ok.

    j_filipeAuthor
    Graduate II
    July 14, 2025

    Yes I did.