Electronic – Does transmitting break over FTDI chipset yield a binary 0 received on the receiving end

ftdisignal integrityuart

I send breaks (using Tx) over FTDI FT232R chipset using two ways:

a. Using the BREAK command in the operating system (Windows 7 and Ubuntu)
b. Gating the Tx line for an arbitrary period

I connected the Tx pin to the Rx pin of the FT232R (loopback test) and used a variety of serial consoles to read the Rx input

I always got a binary 0 in both case. Each case individually behaved so:

  • i. Using the BREAK command, I recieved binary 0 when the BREAK command was made active (BREAK is active low)
  • ii. When gating the Tx line, I recieved binary 0 when I forced the Tx line low

This does not seem right to me.

The only time when the UART Rx can get "confused" between BREAK and a binary 0 transmission, is when the BREAK switches the line low for exactly 9 bits duration and then brings the line back to high (making the Rx side misinterpret as a stop bit), but this breaks a definition of BREAK which requires the line to be held low for at-least 10 bits duration.

So my questions are:

  1. Is this expected behaviour ?
  2. If you do a loopback test on your FTDI chipsets can you reproduce this behavior (implying I have bad drivers/faulty chipset)

Best Answer

Yes, this is expected behavior. Most UARTs will interpret the start of a "break" condition as an all-zero (null) byte that happens to have a framing error (no stop bit). Some (but not all) UARTs also have hardware detection of "break", but this typically kicks in only if the break condition extends for more than two whole character times (i.e., >20 bit times).

Traditionally, a hardware UART makes all bytes received available to the software; in other words, anything that can be interpreted as a start bit will cause a byte to be delivered to the software — along with status bits indicating possible parity and/or framing (stop bit) errors. It's up to the software to discard bytes that have errors, if that's the desired behavior.

I don't know about the FT232R specifically; it may be one of those UARTs that simply doesn't care about framing errors and has no way of signaling them to the USB host.

Related Topic