cancel
Showing results for 
Search instead for 
Did you mean: 

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

Kolab
Senior
 
1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

7 REPLIES 7
TDK
Guru

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".
Kolab
Senior

STM32WB55RG (nucleo)

Kolab
Senior

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

TDK
Guru

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".
Kolab
Senior

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

Kolab
Senior

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

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".