cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0 UART/LPUART wake from STOP MODE

buff thokoa
Associate III

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

1 ACCEPTED SOLUTION

Accepted Solutions
buff thokoa
Associate III

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;

View solution in original post

2 REPLIES 2
buff thokoa
Associate III

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;

Imen.D
ST Employee

Thanks @buff thokoa​  for sharing your solution 🙂

I marked your answer as Best, this will help other users find that answer faster.

Imen

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