Skip to main content
Associate
February 5, 2026
Solved

STM32H7 USB VBUS sensing question

  • February 5, 2026
  • 1 reply
  • 229 views

I am using the USB OTG FS on the STM32H7. My MCU is self powered, so I need to use VBUS sensing. Can a 3.3V signal be used for the VBUS sensing on PA9 or must it be 5V? Based on the linked forum, I believe 3.3V would work, but would like to confirm with the STM32H7 series.
https://community.st.com/t5/stm32-mcus/management-of-vbus-sensing-for-usb-device-design/ta-p/49485#:~:text=On%20STM32F2/F4/F7/,136):


How should I configure OTG_FS_ID PA10 so my MCU is device only? Should I leave it floating, pulled to LOW, or pulled HIGH?

 

Thanks in advance for any help on this topic.

Best answer by TDK

You can use any pin to detect when VBUS is present. The pin should be high when VBUS is present, but the level can be either 3.3 V or 5 V (if the pin is 5 V tolerant, which most are).

PA10 is not needed at all if it's device-only. The ID pin of the connector should be pulled low, but doesn't need connected to the STM32. It only needs connected when using OTG functionality where the device can be either host or device.

1 reply

TDK
TDKBest answer
Super User
February 5, 2026

You can use any pin to detect when VBUS is present. The pin should be high when VBUS is present, but the level can be either 3.3 V or 5 V (if the pin is 5 V tolerant, which most are).

PA10 is not needed at all if it's device-only. The ID pin of the connector should be pulled low, but doesn't need connected to the STM32. It only needs connected when using OTG functionality where the device can be either host or device.

"If you feel a post has answered your question, please click ""Accept as Solution""."
GMartinezAuthor
Associate
February 5, 2026

Wow thank you for such a quick response! 

So if my MCU is device-only, the PA10 pin can be used for other functions then, right?

TDK
Super User
February 5, 2026

> So if my MCU is device-only, the PA10 pin can be used for other functions then, right?

Yes, correct.

"If you feel a post has answered your question, please click ""Accept as Solution""."