Dropped bytes with K8x LPUART2 when J-Link disconnected

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dropped bytes with K8x LPUART2 when J-Link disconnected

Jump to solution
729 Views
deniscollis
Contributor V

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. */ 

Labels (1)
0 Kudos
1 Solution
582 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
2 Replies
583 Views
Robin_Shen
NXP TechSupport
NXP TechSupport

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!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
582 Views
deniscollis
Contributor V

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.

0 Kudos