cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 error when wake up from Stop mode 2 without ST-LINK

JAltu.1
Associate II

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.

2 REPLIES 2
Imen.D
ST Employee

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

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen

Hi Imen.D

I am already using LPUART for other things. Anyway, I do not think that could solve the problem.