I am facing some embarrassing problems recently.
After some trouble-shooting, I found that: We have Board-A and Board-B. Board-A and Board-B communicate to each other with a UART TTL Level Communication. The communication cable is around 80cm long. During the communication, I got a lot of UART errors.
My mission is to build a more reliable communication between Board-A and Board-B; but not allowed to modify the hardware design and baud-rate.
To me, it is not wise to use a UART TTL Level Communication between two boards. However, I am being told that, it is very popular to us to use a UART TTL Level Communication between two boards.
I tried to find some articles/documentation to convince the involved people, that, they should not use a UART TTL Level Communication between two boards. But I can not find anything useful. What I could find is something like: The UART usually does not directly generate or receive the external signals used between different items of equipment.
My question is: Where can I find some convincing articles/documentation to convince the involved people? (This is to avoid the future problems.) If I am not allowed to modify the hardware design and baud-rate, what choices do I have to build a more reliable communication?
Hi Andy,
Many thanks for your help.
Most UART errors are Framing errors at the receiving end. (UART Framing error flag == 1)
With an oscilloscope, I can see that, at the transmitting end, the signal at MCU tx pin is clean (frequency 19.2xxkHz, square ware), but the signal at the middle junction of the cable is not clean (frequency 20.xxxkHz, wave with rounded corners).
"at the transmitting end ... frequency 19.2xxkHz ... at the middle junction of the cable ... frequency 20.xxxkHz"
How can just a cable change the frequency??!!
"the middle junction of the cable"
What do you mean by that? What is this "junction"?
"not clean"
What, exactly, do you mean by that?
As the late, great Bob Pease used to say, "if something is 'funny', record 'amount of funny'"
I guess the damaged flanks of the signal makes it hard to measure the baudrate, so trying to measure a single bit gives enough measurement errors to make it seem like 20kHz.
Baudrate should always be measured by spanning as many bits as possible.
Sorry for my bad descriptions.
At the transmitting end (Board-A), if I directly measure the tx-pin of the MCU, calculate the width of one single bit (a bit 1), the oscilloscope shows [ 1/delta-X == 19.2xxkHz ], and the signal of this bit is a perfect square wave.
Board-A has Cable-A, and Board-B has Cable-B, the connection between Board-A and Board-B is actually [ Cable-A <-> Cable-B ]. Cable-A and Cable-B connect to each other with a connector. Cable-B has branched hooks for measurement purposes.
If I measure the hook of Board-B/Cable-B, the oscilloscope shows [ 1/delta-X == 20.xxxkHz ], and the signal is a wave with rounded left corner.
Sorry for my bad descriptions, again.
We measured several damaged bits (bit 1), all of them were [ 1/delta-X == 20.xxxkHz ].
No, I did not talk about measuring several damaged bits, one-by-one.
I talked about emasuring the total time spanned by multiple sequential bits. Measuring over 5 bits means that any round-off errors from guestimating the specific measurement position of a potentially bad flank gets divided by 5, giving less measurements errors.
In the end, there will always be the same baudrate, but the quality of the individual bits will be worse with distance.