AnsweredAssumed Answered

Variable-size Rx on UART using Interrupts

Question asked by b.dennis on Aug 18, 2014
Latest reply on Aug 19, 2014 by Andrew Neil
I need to implement the reception of messages on UART using interrupt and the HAL set of drivers. Messages can be of varied length, but they have a terminating character. My problem is that HAL_UART_Receive_IT() takes a parameter "size", and the Rx_Complete_Callback() won't be called until 'size' characters have been received. The callback also won't be called if I don't call HAL_UART_Receive_IT() at all. So it seems that my only choice is to loop on HAL_UART_Receive_IT(size=1) in the application and manage my Rx buffer. I can do that, but is there no less time consuming solution?