How to determine who drives the clock ?
I have come to this problem where I wanted to go with synchronous UART between 2 peers for reliable communication.
The problem is how to determine who drives the clock ?
I mean it's a bi-directional communication. so for peer1, it will try to sync the clock to its TX line, and for peer2 it will try to do the same for its TX line. which results in a conflict for whom to drive the clock.
@Middleware & OS
Solution:Jump to solution
In a synchronous UART setup where reliable bi-directional communication is required, the clock source needs to be clearly defined to avoid conflicts.
9 Replies
If you need truly symmetrical communication, consider using asynchronous UART instead, where each device generates its own clock internally.
Isn't the solution above applicable? are you lacking UART on your device?
But,why is it that asynchronous UART is preferred over other communication methods for symmetrical communication? @wafa_ath
Different people with different solutions...I want to learn more...😁 @ZacckOsiemo
Ah I see, noted.
Solution
In a synchronous UART setup where reliable bi-directional communication is required, the clock source needs to be clearly defined to avoid conflicts.
as i said because each device generates its own clock, and that reduce complexity in bi-directional communication
Peer1 (Master) Peer2 (Slave)
----------------- -----------------
| Clock Generator | ----> | Clock Follower |
| TX | ----> | RX |
| RX | <---- | TX |
----------------- -----------------
Ok @kentaurse 👍