UART framing error after reset?

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

UART framing error after reset?

跳至解决方案
1,772 次查看
danreltek
Contributor III

I am using 2 FRDM-KL25Z to chat to each other using UART1 and UART2. I am using UART0 of each to connect to my PC and report what is being received on UARTS 1 & 2, so I have 2 instances of Termite open to do this.

The program sends one character out of each port once per second.

The problem I am having is this:

Case1: Reset unit A and unit A reports activity but unit B stops reporting activity.

Case2: Reset unit B and unit B reports activity but unit A stops reporting activity.

Case3: Reset units A and B at the same time and both work properly.

When I look at the signals using an oscilloscope it appears as though there are a few extra bits pre-pended immediately after a reset, compared to subsequent transmissions.

Can you please tell me if this is normal and how can I stop this and/or recover from it.

Thanks

0 项奖励
回复
1 解答
1,438 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Dan Bovill,

    Please also post your oscilloscope wave for UART after reset. Is that the correct UART data?

   If yes, you need to check your code, whether after reset, you send something out.

    I think your problem is caused by out of sync, maybe you can design the uart communication protocol, add some handshaking data.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
1,439 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hello Dan Bovill,

    Please also post your oscilloscope wave for UART after reset. Is that the correct UART data?

   If yes, you need to check your code, whether after reset, you send something out.

    I think your problem is caused by out of sync, maybe you can design the uart communication protocol, add some handshaking data.


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,438 次查看
danreltek
Contributor III

Thanks Kerry,

Your suggestions were helpful. Problem appeared to be a bug in XON/XOFF flow control.

Fixed now.

Thanks again

Dan

0 项奖励
回复