3
\$\begingroup\$

I'm designing a board that both USB Host and device are in the same board. The host is a microprocessor and the device is a HID device which has a stm32f107 as usb device controller. What I need to know is:

  • Is it possible to connect my host and device data lines as differential pair on the board without any extra components like USB connectors, resistor and ...?

As in antenna connectors in telecommunication board that matchs impedance of the board and the antenna, does USB connectors do the same thing? I mean does omitting the USB connectors from the circuit affect the operation of USB communication?

\$\endgroup\$
  • 2
    \$\begingroup\$ If memory serves me right, USB, like most high-speed differential serial busses, uses a 100ohm differential imedance. On short runs that might not matter that much, especially not if you are working with low-speed version (things get a /lot/ more complex when you get to USB3 and such, where things like lengthmatching become very important) \$\endgroup\$ – Joren Vaes May 12 '17 at 9:24
  • \$\begingroup\$ The Raspberry Pi is a common device which has a similar situation. Its ethernet port is connected to the SoC through its USB hub, all on the same PCB. \$\endgroup\$ – Wesley Lee May 12 '17 at 9:51
  • 1
    \$\begingroup\$ See table 7-12 (Cable Characteristics) in the spec, and the Inter-Chip USB Supplement to the USB 2.0 Specification. \$\endgroup\$ – CL. May 12 '17 at 11:17
2
\$\begingroup\$

USB 1 and 2 A/B connectors are just connectors, there is no special magic inside them. USB 3 A/B connectors are also just connectors but they are reaching speeds where controling parasitics in the connector, maintaining characteristic impedance etc starts to become really important.

As long as you maintain the correct impedances going directly from chip to chip should be just fine. Even if you don't a "Full speed" interface will almost certainly work.

USB C connectors can have some inteligence inside but afaict it's mostly related to the "power delivery" stuff.

| improve this answer | |
\$\endgroup\$
3
\$\begingroup\$

Yes, it is possible to connect a host and device on the same PCB simply by running a differential pair of the appropriate impedance between them. In practice you can get away with some mismatch, so you can do this on FR4 with no problem even without requiring special controlled-impedance fabrication. Many embedded or laptop computers do this.

I've never had any difficulty with USB 2.0 high speed (480 Mbps) just by following basic high speed design practices; USB 3.0 would require more care and probably simulation.

| improve this answer | |
\$\endgroup\$
1
\$\begingroup\$

Connecting USB devices with host microprocessors on the same board without any intermediate connectors is called "embedded USB". Many laptops and desktops embed USB devices on-board. In some sense the signal integrity can be even better, assuming HS differential traces are implemented with 90-Ohm impedance, since any connector is always a deviation from PCB trace and thus an impedance mismatch is introduced.

However, there is one caveat that is frequently is overlooked. Normal USB connect protocol involves VBUS detect on device side of connection, prompting the device to start "connect" protocol by pulling up D+ (or D- in case of LS device) line AFTER the VBUS is received (after cable plug in). The problem is that in embedded design the VBUS (and device power) is assumed as always on, prompting USB devices to assert the connect event (pull-up) BEFORE the host is powered up, booted up, USB controller configured, and USB software stack is loaded making the host ready to communicate. In many legacy host hardware this premature assertion of connect state can disrupt normal host set-up functionality, and likely some additional software work-arounds might be necessary. It might work, but in some number of power-up cycles the embedded USB connection can fail.

If a designer doesn't want power-on surprises, the host should implement an additional GPIO line (analogous of VBUS) that would hold embedded USB devices in unconnected state until the host boots up and is ready to communicate via USB. Or use that extra GPIO to power-up embedded USB chips only after the host USB stack is ready.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

I think that having a good cable and proper connectors, in most cases, is a matter of minimizing loss and signal degradation when your application REQUIRES you to transfer a signal over a distance.

Shorter is usually better.

I strongly doubt that the cable provides any essential function beyond transferring the signals from point A to point B with as little degradation as possible. That being said, I note that numerous comments express concerns over USB 3.0, so I expect there are other considerations if that is being implemented.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.