0

I'm currently designing a self-powered PCB with a STM32L432KCU6 and USB. After having done some research, it seems that it is necessary to connect the VBUS pin for detection purposes. However, is it also needed if I want not to use the detection feature? I would prefer establishing the USB connection by clicking on a button instead of automatically establishing it when VBUS is sensed.

I'm sorry if this is a trivial question, but I don't have much experience with USB so far.

schematic

simulate this circuit – Schematic created using CircuitLab

Hermetica
  • 475
  • 4
  • 7
  • 1
    If your device isn't the host in this scenario, keep in mind it's the USB host that's responsible for establishing the USB connection. If the host can't detect your device, it won't attempt to enumerate. – LMS Sep 15 '19 at 00:38
  • Thanks! So, the USB host will detect my device via VBUS, too? How would that work for a USB powered device for example? As far as I know a USB powered device doesn't need the VUSB to be connected to a pin of the MCU that senses VUSB. Would it make a difference if I included USB charging and connect VBUS to a charging IC? Isn't the host always listening so that when enabling the pull-up on the data line via a button press it could detect the device? – Hermetica Sep 15 '19 at 09:32
  • 1
    No, USB host starts enumeration based on pull-up detection on the data lines. But your device is not allowed to pull data lines up until the USB bus is powered (thus 5V detection). See this answer https://electronics.stackexchange.com/a/323551/137742 – Martin Sep 15 '19 at 09:53

0 Answers0