Skip to main content
JAltu.1
Associate II
October 4, 2024
Question

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

  • October 4, 2024
  • 1 reply
  • 866 views

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.

1 reply

Technical Moderator
October 4, 2024

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"".ThanksImen"
JAltu.1
JAltu.1Author
Associate II
October 7, 2024

Hi Imen.D

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