Skip to main content
February 3, 2022
Solved

How can I exchange data using LPUART and interruption as I can find only functions HAL_UART_Transmit_IT and HAL_UART_Receive_IT? Are there similar functions for LPUART? I am using STM32WB55RG

..

This topic has been closed for replies.
TDK
TDKBest answer
February 3, 2022

Please include your chip number in your post.

Doesn't HAL_UART_Transmit_IT also work with LPUARTx the exact same way it works with USARTx/UARTx?

> #define LPUART1 ((USART_TypeDef *) LPUART1_BASE)

"If you feel a post has answered your question, please click ""Accept as Solution""."

7 replies

TDK
TDKBest answer
February 3, 2022

Please include your chip number in your post.

Doesn't HAL_UART_Transmit_IT also work with LPUARTx the exact same way it works with USARTx/UARTx?

> #define LPUART1 ((USART_TypeDef *) LPUART1_BASE)

"If you feel a post has answered your question, please click ""Accept as Solution""."
February 3, 2022

STM32WB55RG (nucleo)

February 3, 2022

@TDK​ and how can I activate the interruption for RX? Like this?__HAL_UART_ENABLE_IT(&hlpuart1,UART_IT_RXNE);

TDK
February 3, 2022

I think so, but let CubeMX generate the setup code if you are unsure. This doesn't enable the NVIC interrupt.

"If you feel a post has answered your question, please click ""Accept as Solution""."
February 3, 2022

as far as I understood I can use any function for UART just changing the typedef to &hlpuart?

February 3, 2022

I tried this __HAL_UART_ENABLE_IT(&hlpuart1,UART_IT_RXNE); but there are some weird symbols in my rx buffer

TDK
February 3, 2022
It’s not possible to provide focused help to debug your problem with the amount of information you’ve provided.
If you need general help on using LPUART there are many examples in the repository.
"If you feel a post has answered your question, please click ""Accept as Solution""."