cancel
Showing results for 
Search instead for 
Did you mean: 

USART reception giving problem

vinayakrjoshi
Associate II
Posted on May 25, 2015 at 10:54

I am using STM32F407 USART HAL driver. I want to receive data one by one using the

HAL_UART_Receive_IT()
which sets up the device to run an interrupt function when data is received.

Problem is that you have to specify the length of data to read before the interrupt triggers. I plan on sending console like commands of varying length so can't have a fixed length. I assume the only way to do this would be to read single characters at a time and build up a separate string.

The HAL driver seems to have a problem where if you set the

HAL_UART_Receive_IT()
to receive
x
number of characters, and then try to send more than
x
characters, there will be an error.

#sart-reception-giving-problem
0 REPLIES 0