
USB 2 is the USB we all know and love. But about ten years ago, USB got an upgrade: USB 3.0. And it’s a lot faster. It started off ten times the speed of USB 2, with 5 Gbps, and later got 20 Gbps and 40 Gbps revisions. How does that work, and how do you hack on it? Well, for a start, it’s very different from USB 2, and the hacking differs in many important ways.
In fact, USB 3 is an entirely separate interface from USB 2, and it does not depend on USB 2 in any way whatsoever – some people think that USB 3 negotiation happens through USB 2, but that’s a complete myth. USB 2 and USB 3 are electrically, physically, and logically distinct interfaces. Except for the fact that USB 3 is backwards compatible with USB 2, they are simply entirely different.
This also means that every USB-A port with USB 3 capabilities (typically blue, but not always) carries two interfaces; indeed, if you want, you can split a typical USB 3 port into a USB 3-only USB-A port and a USB 2-only USB-A port. USB 3-only ports are not legal per USB 3 standard, you’re expected to keep USB 2 there, but only for user convenience; you can split it with a hub and get, like, three extra USB 2 branches for your own use. Even if it’s forbidden, it works flawlessly – it’s what I’m currently using to connect my mouse to my laptop as I’m typing this!
Not to say that USB 3 is all easy to work with – there’s a fair bit of complexity.
For A More Civilized Age
USB 3 is fully differential, and full duplex. It’s still point-to-point, but unlike USB 2 with its pseudodifferential half-duplex transmitters, there are two differential pairs – one RX, one TX. It’s like UART: TX on one end connects to RX on the other end, RX connects to TX, so the two pairs have to be crossed over, typically, inside the cable – for instance, high-speed USB-C cables have the USB 3-intended pairs crossed-over by default! Oh, and you have to put series capacitors on each end, at each TX output.

Device detection isn’t done with resistors – instead, the USB 3 peripheral produces regular pulses on the TX pair, known as LPFS mode, and the peripheral on the other end listens to the RX pair for these pulses. That’s also how polarity flips get compensated for.
There are no resistors to add, though if you want to connect different USB 3 devices on your board, you might need to take care of some common mode level matching every now and then, like niconico shows us in detail in the extensive readme for their wonderful PCB housing a USB 2 – USB 3 transaction translator.
Just like PCIe, you’re not expected to handle USB 3 yourself. Unlike USB 2, you can’t quite hand-wire it either – there are products of Eastern manufacture that do, and the failures are quite prominent. If you are shopping for USB 3 hubs and find one with a captive cable, be careful – it might be wired in a lax way, neglecting USB 3 requirements, and you won’t be able to fix it without buying a new hub. Better stick to USB 3 hubs equipped with microUSB3 and USB-C ports!
If you want your links to work guaranteed, don’t hand-wire them, rather, use impedance-matched traces on your PCB as much as possible, PCB track quality really matters here, and could easily limit your speed; even big companies might screw it up!
For instance, [WifiCable] has tinkered on a laptop with USB 3 ports limited to 5 Gbps mode by a chipset setting, and once the setting was unlocked, the ports would negotiate 10 Gbps mode, but had constant stability issues. I’ve also seen Dell route a USB 3 link over an FPC, only to get stability issues with certain kinds of hubs.
The Three Versions
You might have heard of the USB 3 naming shenanigans, with like fifteen different names and logos used to refer to different USB3 versions – like USB 3.0 USB 3.1, USB 3.1 Gen 2, USB 3.2, and so on. I am pleased to inform you there are only three versions – the dozen different names and logos are duplicates of each other, a marketing strategy that confused people more than it helped, nothing more. If you want to learn more about how it came, you can read here, but let’s be fair, you likely don’t need to know that.

As for matters more physical, there’s four different connectors you will see USB 3 on – USB-A, USB-B, microUSB 3, and USB-C, each of them getting extra two pairs of pins, and, for the first three, an extra GND pin. This GND line helps provide a more stable ground reference, is perhaps not as much encumbered by the ground current, and with the GND pin placed between the two pairs, it helps prevent crosstalk. USB-A is used on hosts, USB-B and microUSB3 are mainstays on devices, and USB-C, in its universality, can be used everywhere.

Nowadays, if USB-C isn’t an option because you can’t be bothered to find a mux, a device with microUSB3 would be my second choice. The trick is to buy a few USB-C to microUSB3 cables on Aliexpress. I swear by them, and if you have some microUSB3 devices at home, you should grab two or three cables like that and never worry about microUSB3 again. Not that the forbidden A-A cable is hard to find nowadays, either!
Last thing to mention is, you might see USB 3 cables and sockets in an initially unexpected place – carrying a PCIe x1 link, again, in hardware of Eastern design. USB 3 cables are only used there for the extra lines: USB 2 pins carry REFCLK, and the two high-speed pairs carry, DRAIN typically carries GND, and the USB2 VBUS and GND tend to carry two PCIe link management signals.
This is an unspoken standard across Eastern vendors of many PCIe accessories – you might see slight pinout variations, but nothing too major. Honestly, I respect that a lot, I’ve recommended it to my hardware hacker friends as a way to expose PCIe, and it’s something that I believe is a decent option, especially given the abundance of hardware that uses USB 3 connectors for PCIe. Is it standards compliant? No. Could someone call it cursed? Yes. Is it a viable way to carry a PCIe x1 link? Also yes. Is it easy to implement? Yes, again. Is it cheap? Without a doubt. If you really need x4 and guaranteed high speeds, you might want to go for Oculink, but until then, the abusing USB 3 hardware will do just fine.
There’s more I could say about USB 3, but for now, I hope this is more than sufficient for you to wade through USB 3 waters, for whatever hacks and projects you might be exploring. Got questions, corrections, or advice? Ever make something cool with USB 3? Tell us all in the comments down below!
No comments:
Post a Comment