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:
then, I trigger the next string ("another string") to be printed in my code, and I see:
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?