Dropped bytes with K8x LPUART2 when J-Link disconnected

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Dropped bytes with K8x LPUART2 when J-Link disconnected

跳至解决方案
806 次查看
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. */ 

标签 (1)
0 项奖励
回复
1 解答
659 次查看
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 项奖励
回复
2 回复数
660 次查看
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 项奖励
回复
659 次查看
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 项奖励
回复