2026-02-05 6:26 AM - last edited on 2026-02-05 6:37 AM by mƎALLEm
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.
Solved! Go to Solution.
2026-02-05 6:37 AM
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.
2026-02-05 6:37 AM
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.
2026-02-05 6:46 AM
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?
2026-02-05 7:12 AM
> So if my MCU is device-only, the PA10 pin can be used for other functions then, right?
Yes, correct.