cancel
Showing results for 
Search instead for 
Did you mean: 

I'm using STM32f031k6 microcontroller when i receive the data through hal_uart_recieve the first byte i get is correct after that following bytes are garbage and also if i add the lines after the receive command it won't read the proper values?

A.ALUR_SWAMY
Associate
 
1 REPLY 1

Is there a question here? You've made a statement, with no code, or supporting information.

HAL_UART_Receive() blocks, won't typically pull data from the past, and can miss data. You really want to be using the HAL_UART_Receive_IT() form for any non-trivial implementation, and BUFFER the inbound data in a way you can process in a more leisurely fashion

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..