Skip to main content
path321
Associate II
July 10, 2026
Question

Is it mandatory to reconfigure clocks after Stop mode ?

  • July 10, 2026
  • 1 reply
  • 24 views

Hi everyone, 

I am facing an long-standing issue with a STM32L476RE-powered device loosing UART frames when waking up from UART3 from Stop Mode (will be analyzed on another issue).

Prompted by this, I have a generic question for clock configuration after Stop1-2 mode.

The device uses HSI & LSE for all of its peripherals, in a bare-metal CubeMX project.

Q1: The function 

__HAL_RCC_WAKEUPSTOP_CLK_CONFIG(RCC_STOP_WAKEUPCLOCK_HSI);

is called 1 time before while(1){} loop. Should it be called just once or should it be called every time before calling 

HAL_SuspendTick();
HAL_PWREx_EnterSTOP1Mode(PWR_STOPENTRY_WFI);

?

Q2: Should we call 

SystemClock_Config();

every time after waking up from Stop mode, despite the fact that the clock selection ( HSI & LSE ) remains the same and no PLL or MSI is used ?

Q3: Could calling 

SystemClock_Config();
HAL_ResumeTick();

disrupt an ongoing UART-RX ( running on Idle-line callback ) , despite the fact that clock selection is not changing ? 



Thank you in advance

1 reply

Andrew Neil
Super User
July 10, 2026

The datasheet tells you:

 

So, if that’s the configuration you want after exiting STOP - you don’t need to do anything.

If it’s not what you want then, of course, you will have to reconfigure it,

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.