Page 1 of 1

Has anyone got a STM32F411CE Blackpill working as a USB Host?

Posted: Wed May 25, 2022 12:34 pm
by Nello
Hi. I've got about a million questions and may be on conceptually shaky ground, so apologies if this is a bit scattergun.

I've been trying to work this out with the STM32CubeIDE for a few weeks now and am pretty well stumped. I can't even get VBUS power working, so suffice it to say I'm not getting very far. I've tried following most of these, but most of the doc is centred around Nucleo boards:
https://www.youtube.com/watch?v=MlhUG4GsOT0
https://controllerstech.com/stm32-usb-host-hid
https://www.bennettnotes.com/notes/stm3 ... usb-serial

I managed to find this old stm32duino thread, but it doesn't seem to get anywhere that I could see: viewtopic.php?f=62&t=197&p=3001&hilit=b ... host#p3001

Searching avidly through these forums it seems that mostly people are interested in STM32's as HID devices not as USB hosts. Has anyone ever managed to get this working?

Re: Has anyone got a STM32F411CE Blackpill working as a USB Host?

Posted: Thu May 26, 2022 8:53 am
by ag123
I'm not familiar with the requirements of USB host, i think host is 'a lot more difficult' vs being a device. among the things, it needs to enumerate buses/devices, poll the buses/devices, power the buses etc.
nevertheless someone has done something, it isn't yet committed, but you could probably pull from the original user's repository
https://github.com/stm32duino/Arduino_C ... /pull/1196
it may not be for the F411 though. I'm not sure about the details.

Re: Has anyone got a STM32F411CE Blackpill working as a USB Host?

Posted: Wed Feb 01, 2023 3:07 am
by superedan
The system clock in the default setup comes from the PLL, which is generated from HSE, and is set at 96 MHz, which is the highest frequency that can be used to produce a stable USB clock (48MHz).
1v1 lol

Re: Has anyone got a STM32F411CE Blackpill working as a USB Host?

Posted: Wed Feb 15, 2023 7:51 am
by mathew32
Have you already tried getting a Nucleo to function with it so you have a reliable starting point?

I'd go in that direction...

Re: Has anyone got a STM32F411CE Blackpill working as a USB Host?

Posted: Fri Feb 24, 2023 8:50 am
by sharase
Make sure that all the connections between your STM32 microcontroller and the USB connector are correct and secure. Double-check your wiring to ensure that you haven't reversed any connections or made any other errors.

subway surfers

Re: Has anyone got a STM32F411CE Blackpill working as a USB Host?

Posted: Thu Mar 02, 2023 12:07 pm
by BennehBoy
If you get something working, please do share with us - I was wanting to use any form of STM32 as a USB host so I could use USB keyboards with retro hardware. I gave up after much mucking about - but that's over a year ago now.

Re: Has anyone got a STM32F411CE Blackpill working as a USB Host?

Posted: Tue Mar 07, 2023 7:05 am
by darkspr1te
I think you need to look into the stm32f4xx examples packs available from STM website or git hub,
heres a old github example , note that bugs and api changes by stm to the stmcore renders some example code non-compilable so you may have to hunt down a older stm32core or patch to newer api/core

https://github.com/dbridges/stm32f4-dis ... hid_core.c




darkspr1te

Re: Has anyone got a STM32F411CE Blackpill working as a USB Host?

Posted: Fri Jun 30, 2023 8:14 am
by deservepodzol
I tried to get a Nucleo working and it worked