Is it mandatory to reconfigure clocks after Stop mode ?
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
