cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H5 USBX hub class

MFuch.3
Associate II

Hi,

a new STM32H5 based design (Azure RTOS) needs two USB host ports. We want to use a hub.

To give this a try I modified UX_Host_DualClass example from STM32H573I-DK /
STM32Cube_FW_H5_V1.1.0 to run on my NUCLEO-STM32H563ZI board.

I removed all the USBPD code and started the host stack manually. I installed the
USB_USER jumper AND STLK jumper to get a fixed VBUS output while
supplying the board via the ST-Link interface. That's probably not the
idea of the board, but it works for my test.

Now HID devices and mass storage devices are detected correctly and demo
works as expected.

Next I added hub class support to the demo via CubeMX.
Any hub is now correctly detected: I print its VID/PID.

But enummeration of any device behind the hub fails!

In ux_host_stack_transfer_request.c:

   /* Send the command to the controller.  */
     status =  hcd -> ux_hcd_entry_function(hcd, UX_HCD_TRANSFER_REQUEST, transfer_request);

fails with status = UX_TRANSFER_TIMEOUT (0x53)
when called from _ux_host_stack_device_address_set() with device_address=2.

What's the problem?
Can I expect the hub class to work on STM32?
Do you have any hub class example running on STM32H5 (or similiar) as
reference?

Regards,

Matthias

2 REPLIES 2
mohamed.ayed
ST Employee

Hi @MFuch.3  there is a sample application HUB_HID_MSC running on stm32u5 target you refer to this application :

https://github.com/STMicroelectronics/STM32CubeU5/tree/main/Projects/STM32U5x9J-DK/Applications/USBX/Ux_Host_HUB_HID_MSC

Hi Mohamed,

I have continued the work already done by Matthias and have had a close look at the HUB_HID_MSC example. Our configuration on the STM32H5 is the same as on the STM32U5 in the example. I have enabled tracing inside the USBx stack. When I connect a USB HID device directly to the USB port of the board, it is enumerated and works. When I connect a USB hub to the board and a HID device to the hub, I see that the STM32H5 sends a USB device address set message to the HID device, but never gets a response. Any idea what is going wrong?