AnsweredAssumed Answered

Why are the last few bytes in UART0's TX buffer delayed?

Question asked by Alexander Farley on Feb 6, 2019
Latest reply on Feb 7, 2019 by Alexander Farley

I'm printing out some strings over UART0 (the LPUART, I believe) on a K22F. 


Sometimes it works just fine; the entire string is printed out on the serial port. 


Other times, I see a strange behavior: most of the string is printed, except for the last few bytes. The next time a string is printed, the missing bytes appear, but the end of the next string is missing. 


For example, I print "Hello World!" and see:
"Hello Wor"


then, I trigger the next string ("another string") to be printed in my code, and I see:


another str


So it's like the UART is "falling a few bytes behind" and not catching up, even though the bytes are still in the TX buffer. 


I'm using the PE asynchronous serial component as a driver. Any ideas about why this is happening?