Skip to main content
ISeed
Associate III
April 7, 2019
Solved

Connecting USB HUB to STM32

  • April 7, 2019
  • 5 replies
  • 5550 views

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.
Best answer by PatrickF

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.

5 replies

waclawek.jan
Super User
April 7, 2019

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.
Super User
April 7, 2019

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
April 8, 2019

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.
Super User
April 8, 2019

> 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
April 10, 2019

This is really important. Thank you!

PatrickF
PatrickFBest answer
Technical Moderator
April 15, 2019

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 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
ISeed
ISeedAuthor
Associate III
April 15, 2019

Thanks! I was actually thinking in that direction.

Where do you see the USB camera demo?

PatrickF
Technical Moderator
April 16, 2019
In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.NEW ! Sidekick STM32 AI agent, see here
ISeed
ISeedAuthor
Associate III
April 16, 2019

May god bless you with many sons.