How do you confirm data reception in UART / SPI?

Thread Starter

Embededd

Joined Jun 4, 2025
145
In I2C, every byte transmission is followed by an ACK/NACK bit from the receiver.
That makes it straightforward to confirm whether the target device actually received the data.

However, protocols like UART and SPI do not have a built-in acknowledge mechanism at the hardware level. They only shift bits, and the sender has no automatic feedback from the receiver.

Can we do ACK/NAK in the application layer for UART/SPI? how do you normally confirm that the other device actually received the data?
 

geekoftheweek

Joined Oct 6, 2013
1,429
One way is to calculate and return a checksum. With SPI you can do it in the same "frame", but with UART you'll need to do a bit of synchronization somehow to make sure you're checking the right checksum with the right data.
 

Vihaan@123

Joined Oct 7, 2025
226
By checking in the receive buffer and also put a breakpoint in the receive interrupt. The problem can be at transmit side and you can check TXBuf and interrupt breakpoint.
 
Top