I am trying to conduct USB communication with a STM32F103RET6.

Circuit Design

I found this article on USB power.

I think I need VBUS because any power will come from an external power source, so I connected VBUS to GND via a 0.1 µF capacitor.

Is this design correct?

  • \$\begingroup\$ Please note that if you directly connect the 1k5 resistor to 3.3V supply, the PC will try to communicate with the MCU, even if it is not ready yet for some reason. Expect problems and angry customers if you do that. \$\endgroup\$
    – Justme
    Sep 17 at 8:01

VBUS is used as a signal that tells the device that a host is present. For a self-powered device, VBUS sensing is mandatory.

And the host and device must share GND. You need to connect all four signals.

And the STM already has integrated series resistors.

You also need to ensure that the VBUS pin at the STM does not go above 4 V when powered off, and that the DP pull-up is enabled only when the device is ready. See the documentation, especially AN4879: USB hardware and PCB guidelines using STM32 MCUs, and Management of VBUS sensing for USB device design.


  • \$\begingroup\$ I read u r text now. But STM32F103RET6 has no VBUS pin. That case, VBUS detection is all own to me? \$\endgroup\$
    – 박성재
    Sep 17 at 7:13
  • 1
    \$\begingroup\$ Just use any digital input. \$\endgroup\$
    – CL.
    Sep 17 at 11:53
  • \$\begingroup\$ oh... thank you! \$\endgroup\$
    – 박성재
    Sep 17 at 12:12

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.