I have a K8x processor with its LPUART2 connected to an app on a PC. (fsl_uart driver / 115200-N-8-1)
With MCUXpresso running debug via J-Link, the communication channel is robust and reliable. However, when the debug is terminated, then transmitted bytes (MCU-to-PC) are dropped. If I remove the J-Link probe, then the same problem occurs. Received bytes (PC-to-MCU) are good.
Serial data is sent using LPUART_WriteBlocking(), which I note has the following ominous warning:
/* This API can only ensure that the data is written into the data buffer but can't
ensure all data in the data buffer are sent into the transmit shift buffer. */