Skip to main content
Associate II
October 10, 2024
Solved

Stm32h753i-eval2 USB Host FS

  • October 10, 2024
  • 2 replies
  • 3201 views

Hi, 

I need help generating an .IOC file through the cube generator. What I need is USB Host FS. I'm having trouble getting it to work, specifically, there's no voltage on the VBUS output.
I want to mention that I was able to create a USB Host HS that works and outputs voltage.
Thank you!

Itzik

    Best answer by ikogman

    Thank you all for your help!!
    I wasn't able to create an IOC file such that, but I solved it by:
    1) Using a ready example that works
    2) Use our CUSTOM BOARD and generate such IOC file worked.
    I really appreciate your assistance!

    2 replies

    Ghofrane GSOURI
    Technical Moderator
    October 11, 2024

    Hello @ikogman 

    First let me thank you for posting.

    1- Create a New Project:
    Select your STM32H753I-EVAL2 from the board selector .
    2- Configure USB Host FS:
    Go to the Peripherals tab.
    * Enable USB_OTG_FS under the Connectivity section.
    * Set the mode to Host Only.
    3- Enable VBUS Sensing:
    In the configuration settings for USB, ensure that you enable VBUS Sensing (typically PA9).
    This is crucial for detecting when a USB device is connected and supplying power.
    If VBUS sensing is enabled but not functioning, try disabling it and manually controlling the VBUS pin (PA9) as a GPIO output set to high.
    4- Clock Configuration:
    Make sure that the clock settings are properly configured to provide adequate power to the USB peripheral.
    5- Generate Code:
    Click on Project > Generate Code to create your .IOC file and associated project files.

    I invite you to read this  document which provides guidelines on USB hardware configurations and might offer additional insights into your setup : AN4879 the following question is asked "In order to manage the VBUS sensing for USB device, are there any recommendations for the resistor bridge values?"

    THX

    Ghofrane

    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.
    ikogmanAuthor
    Associate II
    October 13, 2024

    Hi @Ghofrane GSOURI ,

    Thank you for your assistance. Following your solution, I have encountered a new issue:

    I disabled VBUS sensing, and now I am using PA9 as a GPIO output set to high. I do see that green LED10 is turned on, but I'm only measuring 2.8V on VBUS. When checking directly the PA9 pin, it is 3.3V.

    I need help to get 5V on VBUS.

    Thank you!


    Itzik

    Pavel A.
    Super User
    October 13, 2024

    In host mode you need a 5V & 100 mA (at least) power source for the devices. You don't get VBUS directly from the STM32 pin. Rather the pin controls  (turns on/off) the power supply that provides Vbus.

    Please read the user manual for your board and find how to use the USB ports in host mode.

    Or better find in the ST software package a ready example program for USB in host mode and play with it (keep a fire extinguisher handy ))

     

     

    ikogmanAuthorBest answer
    Associate II
    November 1, 2024

    Thank you all for your help!!
    I wasn't able to create an IOC file such that, but I solved it by:
    1) Using a ready example that works
    2) Use our CUSTOM BOARD and generate such IOC file worked.
    I really appreciate your assistance!