cancel
Showing results for 
Search instead for 
Did you mean: 

UART Reception bytes missing

SYLVIA
Associate II

I am trying to receive variable length of data by manipulating the the RxXferCount value and pRxBUffPtr.I am getting desired results most of the time but for certain time the receive buffer is unable to capture all the bytes i sent.I tried to debug it seeing if my code to calculate the amount of data bytes received is okay or not but I find the behaviour random without any syncronism

1 REPLY 1

Likely introducing race conditions, or making the ones in the HAL implementation worse.

If you understand what you're doing, discard the HAL routines, and manage the USART more directly in the IRQHandler, into buffering structures you have control of and are more inherently thread safe.

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