USB – USB Bus Differential Signals and Pin Swapping

connectordifferentialsignalusbusb-host

USB 1.0 and 2.0 has D+ and D- two differential pins.

USB Pins

My understanding is that differential signals are symmetrical so any of the two lines carries an inverted signal of the other line.

But in the case of USB if I swap the two lines then the USB ceases to function. Is it because the USB lines are differential as well as tri-state logic also to reverse the data direction in them?

Best Answer

At the receiver end, the Data- is substracted from Data+ (a difference is calculated). Then if the difference is positive, and above a threshold it is translated to a logic 1 or 0, depending on the protocol, if it is negative and below a threshold, it is translated to the opposite. By swapping the lines, you basically invert the logic levels, thus messing up the protocol.

Edit: Chris Stratton pointed out the non-differential use of the lines during speed identification. More info about this here