Skip to main content
ISeed
Associate III
Apr 7, 2019 11:33 AM UTC
Solved

Connecting USB HUB to STM32

Hello,

I understand that many STM32 support USB OTG, so they can be USB hosts.

What if I want to connect more than one device? Can I connect a USB hub and control several devices at the same time?

This topic has been closed for replies.
PatrickF
PatrickFBest answer
ST Employee
Apr 15, 2019 4:09 PM UTC

Maybe a little bit out of you requirements, but please note that MPUs of STM32MP1 Series embed an USB high speed Host (named USBH) with 2 ports and PHY, and, if you want more, fully support USB Hub (soldered or external box) under Linux without any 3rd party license (as an example, there is already a 1 to 4 hub on STM32MP157C-DK2).

Btw, the provided USB camera demo on the discovery work through internal Hub.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent

9 replies

waclawek.jan
Super User
Apr 7, 2019 12:00 PM UTC

Yes, but the USB host stack coming with Cube/CubeMX does not support hub(s). You would need to resort to 3rd party libraries, or write your own.

JW

Pavel A.
Apr 7, 2019 5:08 PM UTC

Segger's USBH library manual says that Synopsys controllers in F and L series have a bug with low-speed devices connected thru a external hub:

https://www.segger.com/downloads/emusb-host/UM10001 19.3.2.1

(show stopper for me because I use low-speed HID devices).

Segger's support states that at least some H series MCUs do not have this bug (I haven't tested).

Hope this helps.

-- pa

ISeed
ISeedAuthor
Associate III
Apr 8, 2019 6:15 AM UTC

Wow, ok. Thanks for the warning!

Low speed is 1.5 Mbit? So if I'm using a USB camera, we should be fine?

Pavel A.
Apr 8, 2019 9:55 PM UTC

> So if I'm using a USB camera, we should be fine?

If you also use Segger's or other good library with hub support - maybe.

ST's free "middleware" does not work with hubs.

-- pa

ISeed
ISeedAuthor
Associate III
Apr 10, 2019 10:58 AM UTC

This is really important. Thank you!

PatrickF
PatrickFBest answer
ST Employee
Apr 15, 2019 4:09 PM UTC

Maybe a little bit out of you requirements, but please note that MPUs of STM32MP1 Series embed an USB high speed Host (named USBH) with 2 ports and PHY, and, if you want more, fully support USB Hub (soldered or external box) under Linux without any 3rd party license (as an example, there is already a 1 to 4 hub on STM32MP157C-DK2).

Btw, the provided USB camera demo on the discovery work through internal Hub.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
ISeed
ISeedAuthor
Associate III
Apr 15, 2019 9:38 PM UTC

Thanks! I was actually thinking in that direction.

Where do you see the USB camera demo?

PatrickF
ST Employee
Apr 16, 2019 6:34 AM UTC
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent
ISeed
ISeedAuthor
Associate III
Apr 16, 2019 6:51 PM UTC

May god bless you with many sons.