Skip to main content
Graduate
August 23, 2022
Question

USB_OTG_FS, Activate_VBUS option doesn't work in STM32CubeIDE.

  • August 23, 2022
  • 1 reply
  • 3168 views

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?

    This topic has been closed for replies.

    1 reply

    Technical Moderator
    August 23, 2022

    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

    HTDAuthor
    Graduate
    August 23, 2022

    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.