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
解決済! 解決策の投稿を見る。
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!
-----------------------------------------------------------------------------------------------------------------------
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!
-----------------------------------------------------------------------------------------------------------------------
Thanks Kerry,
Your suggestions were helpful. Problem appeared to be a bug in XON/XOFF flow control.
Fixed now.
Thanks again
Dan