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. */
Solved! Go to Solution.
Hi Denis,
I don't know how did you connect MCU and PC. Sounds like the GND is not well connected.
You can also observing the LPUART2_TX data using oscilloscope.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Denis,
I don't know how did you connect MCU and PC. Sounds like the GND is not well connected.
You can also observing the LPUART2_TX data using oscilloscope.
Best Regards,
Robin
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi robinshen,
The MCU is connected to PC via Serial/TTL-to-USB cable (FTDI). I think that you may be right that the fault is GND (or power) related, and the JTAG connection has the effect of stabilizing it.
In any case, I'm sure this has nothing to do with the fsl_uart driver.