cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U5 wakeup from stop mode with LPUART

andreas23
Associate II

Hello.

I'm trying to wakeup the STM32U5 controller (U575ZI Nucleo board) when a byte is received using the LPUART.

I'm using the LSE clock for the LPUART. Without entering the stop mode, the LPUART interrupt is triggered whenever a byte is received. This is working fine.

But when I enter the stop mode, I'm not able to wakeup the controller with the LPUART. Using the Userbutton as wakeup source is working.

The reference manual shows the "lpuart_wkup" output signal in the block diagram. But there is now further description about this signal and how it is enabled. Other STM32 controllers (like the STM32L4) have a dedicated WUFIE interrupt bit which can be enabled.

0693W00000WJbwhQAD.png 

How do I enable the wakeup signal for the LPUART on STM32U5 controllers. Can you help me please.

Thanks,

Andreas

11 REPLIES 11

@FM.1 
There is no such function as HAL_UARTEx_EnableClockStopMode. And if you look carefully inside HAL_UARTEx_StopModeWakeUpSourceConfig function, it is doing nothing when UART_WAKEUP_ON_READDATA_NONEMPTYis provided.

 

FM.1
Associate III

@nilesh-dryad 
It's been some time since I looked into this but the function you look for is here (maybe l476-tickless is one of ST's tickless example - I forgot):
l476-tickless/Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart_ex.c implements that function.

For the other statement that it's doing nothing, I cannot verify this due to no longer on that project, sorry. Good luck.