cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube UART Receive Interrupt

h2399
Associate II
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
12 REPLIES 12
alberto2399
Associate II
Posted on December 15, 2015 at 11:29

Hi HankB,

thank you for your help. I have found online that example but interrupts configuration code wasn't available. Do you or someone else know where I could find it?

Thanks again.

Cel

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

Thank you Mas.sam for your suggestions.

Cel

dheerajdake9
Associate III
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.