cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting USB HUB to STM32

ISeed
Senior

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?

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

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.

View solution in original post

9 REPLIES 9

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.
Evangelist III

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

Wow, ok. Thanks for the warning!

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

> 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
Senior

This is really important. Thank you!

PatrickF
ST Employee

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.

Thanks! I was actually thinking in that direction.

Where do you see the USB camera demo?

PatrickF
ST Employee

please have a look to https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157C-DK2/Let's_start/Use_the_demo_launcher

and https://www.youtube.com/watch?v=M-oodDBpETI

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.

May god bless you with many sons.