Skip to main content
h2399
Associate II
September 11, 2014
Question

STM32Cube UART Receive Interrupt

  • September 11, 2014
  • 12 replies
  • 5629 views
Posted on September 11, 2014 at 17:24

Dear Friends,

Hi,

I want to get an interrupt by receiving each character on UART port. How can I use HAL_UART_Receive_IT() and HAL_UART_RxCpltCallback() functions? When I call HAL_UART_Receive_IT() function its call USART1_IRQHandler I want to know is it a

correct approach

to call HAL_UART_Receive_IT() function before each receiving character?

 

 

Thanks.

#stm32cube-interrupt-uart
This topic has been closed for replies.

12 replies

alberto2399
Associate II
January 7, 2016
Posted on January 07, 2016 at 12:27

Thank you Mas.sam for your suggestions.

Cel

dheerajdake9
Associate III
November 30, 2016
Posted on November 30, 2016 at 23:38

Hello,

I followed your steps for UART2, but it didn't work. I am using STM32F072RB eval board. I got the UART1 working using HAL_UART_Receive_IT and HAL_UART_RxCpltCallback. 

I added code for UART2 the same way I did for UART1. When I send data on the UART2 Rx pin, the callback is not getting triggered. I have no idea why? Everything is same as the UART1.