2021-04-24 09:26 AM
Hi,
I am using the MX Cube example in STM32Cube_FW_L0_V1.12.0\Projects\32L0538DISCOVERY\Examples\UART\LPUART_WakeUpFromStop.
I have modified it to use the STM32L0538NUCLEO BSP and to use USART2.
I had to add a HAL_SuspendTick in order to get into STOP mode.
All of that is working and I can get into stop mode. I am then trying to use a terminal to wake up the unit which never works.
Is there something else that has to be done to wake up the MCU via UART in stop mode??
I have added my code
Solved! Go to Solution.
2021-04-24 11:34 AM
This has been resolved...
The problem was the peripheral clock selection had not been updated
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART2;
PeriphClkInitStruct.Usart2ClockSelection = RCC_USART2CLKSOURCE_HSI;
2021-04-24 11:34 AM
This has been resolved...
The problem was the peripheral clock selection had not been updated
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART2;
PeriphClkInitStruct.Usart2ClockSelection = RCC_USART2CLKSOURCE_HSI;
2021-05-10 07:53 AM
Thanks @buff thokoa for sharing your solution :)
I marked your answer as Best, this will help other users find that answer faster.
Imen