2026-05-28 5:39 AM
Hello St Teams,
I have two MCUs (one as master and other as slave). They can send and receive data through UART (UART+DMA). The master/slave is always listening. Whenever, the slave receives command from the master, it sends data back to the master. The DMA is interrupted after receiving specified length of data in both MCUs. In the code, I check the first and the last byte to see everything works correctly. But the problem arises when I want to connect two MCUs via cable. At this time, the MCUs receive unwanted bytes due to glitching.
How I can make the whole system robust to unwanted bytes when the data length is fixed? What strategy would you suggest?
Best,
Davood.
2026-05-28 5:43 AM
@Davood_Kesha wrote:But the problem arises when I want to connect two MCUs via cable. .
How long is this cable?
Does it include a GND?
Note that UART alone is not suitable for long cables - you should add something like RS232, RS422, etc ...