2024-10-04 01:49 AM - edited 2024-10-04 03:11 AM
After entering in Stop mode 2, it wakes up by RTC or EXTI2 using those functions:
__HAL_RCC_RTCAPB_CLKAM_ENABLE();
HAL_SuspendTick();
HAL_PWREx_EnterSTOP2Mode(PWR_STOPENTRY_WFI);
SystemClock_Config();
HAL_ResumeTick();
When I load the program with the ST-LINK/V2, at that moment everything runs correctly, it wakes up, read LPTIM1 etc. But once the code is loaded, when I reset the system it gets stuck in the SystemClock_Config();. Specifically in the HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE2) function.
I am using a custom board and the SMPS Power Regulator.
2024-10-04 02:11 AM
Hello @JAltu.1
Please refer to this article on how to wake up the STM32U5 from STOP2:
How to wake up the STM32U5 from STOP2 using LPUART - STMicroelectronics Community
2024-10-06 11:21 PM
Hi Imen.D
I am already using LPUART for other things. Anyway, I do not think that could solve the problem.