cancel
Showing results for 
Search instead for 
Did you mean: 

is there any way to get interrupt on data ready in UART buffer in HAL library........?

NK.13
Associate II

I were trying to get data continues from a sensor and didnt find any flag that will acknowledge when a data is received . Only thing is there is HAL_UART_Receive_IT(),HAL_UART_Receive() functions.i need to seperate my data from Uart interupt handler.

11 REPLIES 11

how to enable USART1_IRQn interrupt....?

RMcCa
Senior II

It is easy to write your own ISRs that conpletely skip all the hal callback faff.

Here's what i do:​

1. Look in the interrupt vector ​table to get the name of the interrupt you want to use

2: declare a void [isr name] ( void ) function in your code. This is your isr.

3. Build the code and then delete/ comment out the old definition of the isr when the linker complains & rebuild.

This, of course, isn't the only approach, just what i did at first​