Electronic – Differences between UART receiver STOP bit implementations

hardwareuart

Some UART receivers require that the specified number of stop bits are present in the received data. For example, if the receiving UART is configured for 2 stop bits, the transmitting UART must also be configured for 2 stop bits. Other UARTs only use the stop bit setting for transmitting, and the receiver is always satisfied with 1 stop bit. Is there a specification that applies to this behavior?

Best Answer

The stop bit for UART, is equivalent to the idle level on the bus.

If your transmitter sends out 2 stop bits, but the receiver is configured for 1 stop bit, everything will work fine. The receiver sees the first stop bit, finishes its packet, and then waits for the next start bit. The second stop bit is seen as simply a bus idle state.

If however the settings were reversed, transmission included only 1 stop bit, but receive requires 2, things may not work properly, as if two packets are transmitted immediately after each other, only one stop bit is detected. If however the transmitter waits at least one baud period before it sends the next packet, the two devices will successfully be able to communicate, as the extra idle state between packets would be long enough for the receiver to detect a second stop bit.