Page 1 of 1

Has anyone managed to make USB Host work?

Posted: Mon Mar 02, 2020 4:31 pm
by rtek1000
I would like to try USB Host with STM32F407VG (DiyMore board)

I've been trying to understand why the repository is incomplete, despite having the libraries already.

STM32CubeIDE appears to work with similar libraries, and is already functional. I liked the speed of writing a USB stick.

Unfortunately, something seems to be missing from the repository, so support is not provided officially:
For the USB Host, there is no dedicated implementation but the STM32_USB_Host_Library is already included and already in the USB request list: #687
https://github.com/stm32duino/Arduino_ ... issues/960

[Example] USB storage with STM32F4-Discovery and CubeMX
http://evenlund.blogspot.com/2016/10/us ... nd_58.html

In case anyone else wants to try to make it work.

STM32F407VG (DiyMore) USB Port FS (CN1 or PA11: DM, PA12: DP; PC9: Drive_VBUS)

Functional Example; STM32CubeIDE (V1.3.0; FW_F4 V1.25.0)
https://github.com/stm32duino/Arduino_C ... SC_CPP.zip

Arduino example; Not Functional, but compiles without errors, It must be missing to call some routine.
https://github.com/stm32duino/Arduino_C ... B_Host.zip
Sketch uses 15900 bytes (1%) of program storage space. Maximum is 1048576 bytes.

Re: Has anyone managed to make USB Host work?

Posted: Tue Mar 03, 2020 6:48 am
by fpiSTM
rtek1000 wrote: Mon Mar 02, 2020 4:31 pm I've been trying to understand why the repository is incomplete, despite having the libraries already.
It is not incomplete, the USB Host library is provided but currently not used that's all.
As I answered you on GitHub, while no dedicated development done for this, there is no reason to have it to the include path.

As an example how to integrate it, look at how the USB device was integrated this should be the same way for the host.

Re: Has anyone managed to make USB Host work?

Posted: Fri Mar 27, 2020 11:53 pm
by gaganchd2000
Are you able to access USB disk via arduino IDE. I read you post and understood there is some gap in the linkage.
Actually i am trying to read the USB thumb drive via USB port but unable to do so in arduinoIDE.
I am checking your STM32CUBE code you posted in github for reference.

Re: Has anyone managed to make USB Host work?

Posted: Sat May 30, 2020 9:23 pm
by delgadosouza
Hi,
were you able to use the USB-OTG for thumbdrive reading/writing?
I have a BlackPill STM32F401 and it would be great if I could its capability...

Re: Has anyone managed to make USB Host work?

Posted: Wed Jul 20, 2022 5:23 pm
by rtek1000
Hi,

For STM32CubeIDE see:

("Training materials (slides, hands-on projects) can be downloaded" Guys: download the material to follow up better, link in the description!!!)

MOOC - STM32 USB training:
https://www.youtube.com/watch?v=rI3yBmn ... nHhQZI4Hxa


[STM32] STM32F4 USB HOST + Pendrive: Writing to text file:
https://www.youtube.com/watch?v=uIOb5sSFyUY