Has anyone managed to make USB Host work?

Post here all questions related to STM32 core if you can't find a relevant section!
Post Reply
rtek1000
Posts: 4
Joined: Wed Dec 18, 2019 7:41 pm

Has anyone managed to make USB Host work?

Post 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.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Has anyone managed to make USB Host work?

Post 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.
gaganchd2000
Posts: 1
Joined: Fri Mar 27, 2020 11:12 pm

Re: Has anyone managed to make USB Host work?

Post 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.
delgadosouza
Posts: 1
Joined: Sat May 30, 2020 9:19 pm

Re: Has anyone managed to make USB Host work?

Post 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...
rtek1000
Posts: 4
Joined: Wed Dec 18, 2019 7:41 pm

Re: Has anyone managed to make USB Host work?

Post 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
Post Reply

Return to “General discussion”