cancel
Showing results for 
Search instead for 
Did you mean: 

USB_OTG_FS, Activate_VBUS option doesn't work in STM32CubeIDE.

HTD
Senior III

Board: STM32H745I-DISCO.

Component: USB_OTG_FS.

Mode: Host_Only

When the Activate_VBUS is set to "VBUS sensing", the USB port is not powered and it doesn't work. What's important, the pin used for VBUS (PA9) cannot be selected in USB_HOST as Drive_VBUS_FS. This seems like a bug to me.

When I disabled the Activate_VBUS feature and configured PA9 as GPIO output, I was able to set it as Drive_VBUS_FS. I also set it to high to be sure. Then the port is powered and the host seems to work, at least it detects the USB disk as a storage device.

So - is it a bug, or is it a feature? How is "VBUS Sensing" option supposed to work here? Is there a special function in the driver to call to set the PA9 pin configured this way?

2 REPLIES 2
Amel NASRI
ST Employee

Hi @Adam �?yskawa​ ,

In the FAQ of the application note AN4879 USB hardware and PCB guidelines using STM32 MCUs, the following question is asked "In order to manage the VBUS sensing for USB device, are there any recommendations for the resistor bridge values?"

I invite you to read this document in order to find the answer to this question as well as several other useful recommendations.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Thank you, this is fully covered in the document. USB disk is bus powered, so it doesn't need VBUS sensing. However, PA9 must be set to power the device.