Showing results for 
Search instead for 
Did you mean: 

STM32 with usb HUB and multiple STM32 devices

Associate II


I been trying to set up a stm32F405 mcu usb host with a hub onto which 4x stm32 device is connected. I would use these 4 devices to send data to the main mcu periodicaly at 50Hz, and to have the data transfer syncronised from the 4 devices to be one after each other. When it is gatehred fromn all 4x the data is sent to PC.

Any idea how this could be programmed becouse I have limited knowledge  on this subject more precise I just started with it.

I read through most of the references which are related to the USB and possible hub solutions but could not find any usable information on, how to set up and use.

Can you give me sme guidance or some cinde ofn reference code or relation description how it should be done.

How Can I comunicate with the four device separately?
How to address each device?
How to receive data ready interrupt through usb to read from a specific device?
How to enumerate the devices?
How to communicate in bouh ways?
How to receive bulk data transfer from the external devices?


Associate II

I see, then SPI would be the best solution for STM, and just leave the USB stuff for standard functions sending data to PC.
While I was searching for references for hubs I saw some hub solution for Nuvoton, it has some library which theoreticaly (is it functional in practice also?) can handle a hub chip on one of its USB ports.

ruff design.PNG