2024-10-10 06:43 AM
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
Solved! Go to Solution.
2024-11-01 01:23 AM
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!
2024-10-11 02:20 AM - edited 2024-10-11 02:22 AM
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
2024-10-13 02:26 AM
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
2024-10-13 01:57 PM - edited 2024-10-13 02:36 PM
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 ))
2024-10-13 06:25 PM
Could you try connect one 2.2K resistor from VBUS to D+?
2024-10-13 06:26 PM
Only in full speed mode.
2024-10-14 12:16 PM
2024-10-14 09:54 PM
Hi @Pavel A. , and @Richard Li ,
Thank you for your assistance!
From the user manual, it seems that this functionality (5V VBUS) should be provided by the MFX IO extender, by using I2C1 , but there are no examples available for successfully implementing that in a new project with an .IOC file.
I have found the ready examples, such as the audio_standalone, that work on my board. However, they are using some necessary packages, like the BSP_IO package and when creating a new project, Unfortunately these packages are missing. Attempts to add the missing libraries and files to a new project have been so far unsuccessful.
Thanks,
Itzik
2024-10-14 10:01 PM
You noticed HS work and output voltage, does it meaning HS Vbus work?
If HS Vbus work, FS Vbus only need PHY detect device plug in. (before plug in device, FS Vbus should no output)
I suggest add one resistor between 3.3V and D+, it force PHY think full speed device plug in.
Regards,
Richard
2024-10-15 03:00 PM - edited 2024-10-15 03:02 PM
> some necessary packages, like the BSP_IO package
Aha, this can be because the USB host voltage enable pin on this board may be not going from the MCU at all. It goes out of "I/O extender" chip which itself is controlled via I2C (this extender chip is actually some small pre-programmed STM32). The code for sending commands to this extender is in the BSP_IO module.
Read the documentation of the board, the schemes are there.