Data circulating with UART in STM32

35 Views Asked by At

When I initialize my stm32 i add a 5 second delay and then transmit a 13 bytes long uint8 array over UART. On the reception side, I have my HAL_UART_Receive_IT in the main loop (before while) and then another call to the same function in the Receive complete callback. Additionally, I am also displaying my rx buffer through a tft LCD in my main loop which is set to update after every 1 second. When i reset my transmission MCU, at first i get my data in the right order but then my data order gets screwed up. so for example, if i send 1234, I get 1234 at first and upon the next reset of my transmission MCU, i get 3412. why is my data circulating like this and what can i do to prevent this from happening. Tried reading the reference manual to find the answer but to no avail. Please help! ~a noob coder

Resetting again and again and searching on youtube and other forums

0

There are 0 best solutions below