2
\$\begingroup\$

Is there any specification for the allowed impedance to ground for the GND pin of a USB2.0 connection to an STM32 microcontroller?

I'm not using VBUS to power my PCB, so it's not really connected. If I don't connect the USB ground at all and only have DN and DP connected to the STM32F429VIT6 it doesn't work.

I have tried different resistances between the USB's ground and the MCU's ground (R105) and it's OK for 0 Ω, 1 kΩ, and 1.5 kΩ, but not 9.1 kΩ. I would like to have something better to go on than a value based on tests performed on a couple of host PCs. Is there an appropriate specification for this?

Ideally, I want VBUS and the USB's ground to be isolated. I know there are ICs that offer this functionality, but I already have a custom PCB with pads for a resistor here.

Note: I'm using a USB-C connector, but USB2.0 through it. CC1 and CC2 are connected to USB ground via 5.1 kΩ resistors.

Edit: The STM32 application note on USB includes the following: enter image description here

\$\endgroup\$
4
  • 3
    \$\begingroup\$ The USB data signals as well as CC1/CC2 are all referenced to GND. You can't isolate GND without isolating all the others as well. \$\endgroup\$
    – Finbarr
    Commented Aug 23, 2022 at 18:12
  • \$\begingroup\$ I don't think CC1/CC2 have to have anything to do with the main circuit ground, but the definitely need to be connected to the USB connector's ground. \$\endgroup\$ Commented Aug 23, 2022 at 18:29
  • 2
    \$\begingroup\$ The "allowed impedance" for the GND pin is effectively 0 ohms. The D+ and D- signals are GND referenced and are not floating differential signals. In some cases they're not even "non-floating" differential - they're explicitly single-ended signals. What makes you think that you might need to isolate the USB GND from your circuit? \$\endgroup\$
    – brhans
    Commented Aug 23, 2022 at 18:44
  • \$\begingroup\$ "but the definitely need to be connected to the USB connector's ground" - which has to be connected to the main circuit ground in order for them to function properly. They normally have pullups to +5V which only make sense if the 5V is referenced to ground. \$\endgroup\$
    – Finbarr
    Commented Aug 23, 2022 at 22:25

2 Answers 2

3
\$\begingroup\$

USB ground must be connected to STM32 ground. You can't keep the ground disconnected, that's not how USB works. USB data pins are differential, but must share common reference ground, just like any other differential non-isolated physical interface (e.g RS-485 or CAN etc). So it's not about impedance.

Best connection is as low impedance ground connction between devices as possible.

If you need isolated USB interface, there's chips for isolating USB. But then you might want to use the USB side power and MCU side power for the isolator.

You can also keep the USB non-isolated and isolate something else if necessary.

\$\endgroup\$
3
\$\begingroup\$

The DP/DN pair have a specified differential and single-ended impedance (90 and 45 Ω, respectively.) The single-ended impedance is referenced to GND. So, the two devices need to share a common GND connection to ensure that - your added resistor will mess up signal integrity.

More here: USB trace impedance calculations, with termination resistors

Also, USB uses pull up/pull down resistors (1.5k up, 15k down, respectively) in the endpoint so that the host can identify not only if a device is plugged in, but also its speed capabilities (low or full/high). Adding additional GND resistance will also mess this up.

More here: https://beyondlogic.org/usbnutshell/usb2.shtml

If your concern is isolating noise, consider using a common-mode filter.

\$\endgroup\$
3
  • \$\begingroup\$ So how does it work at all when I have 1k5 there? \$\endgroup\$ Commented Aug 23, 2022 at 20:16
  • 2
    \$\begingroup\$ Big difference between appearing to work ok on one quick try and guaranteed to work ok under all conditions. \$\endgroup\$
    – Finbarr
    Commented Aug 23, 2022 at 22:26
  • 2
    \$\begingroup\$ "So how does it work at all when I have 1k5 there?" It doesn't "work". It will fail USB compliance tests. The PC you're using to play with it isn't a suitable test tool. It's a tool that lets you weed out clear cases of not working. It doesn't prove that it works according to spec. \$\endgroup\$ Commented Aug 24, 2022 at 1:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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