Skip to main content
BAndr.5
Associate
January 31, 2023
Question

Is there an example using USBX with the two USB ports available on the STM32H7?

  • January 31, 2023
  • 4 replies
  • 1051 views

Currently looking to design a board with STM32H7 with two independent cellular modems, each on their own USB port to the STM32H7 processor. I have USBX working with one of the controllers, would like to know if there is any example of using USBX with both controllers, or if this is even possible.

This topic has been closed for replies.

4 replies

ST Technical Moderator
January 31, 2023

Hello @BAndr.5​ and welcome to the Community :)

Please have a look at this wiki page: Introduction_to_USBX. This may help you on how to configure and customize the USBX Device for STM32.

Imen

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. Thanks
BAndr.5
BAndr.5Author
Associate
January 31, 2023

Thanks for the response. This article refers to getting USBX to work with a single USB controller. I already have this working, but wish to know if USBX can be extended to work with the two USB controllers available on the STM32H7 and if so how.

The introduction just provides the standard single USB controller examples and discussions.

BAndr.5
BAndr.5Author
Associate
January 31, 2023

I am investigating ux_host_stack_hcd_register which seems to indicate that multiple controllers can be used with the stack. The example project I have doesn't seem to call this function and microsoft USBX page states "It is required to define at least one USB host controller for USBX to operate in host mode." this tends to indicate multiple controllers are a possibility, but will need to investigate if the ST implementation also allows this.

BAndr.5
BAndr.5Author
Associate
January 31, 2023

Thanks Imen

Delving further I found UX_MAX_HCD which was defined as 1 in my example, I will now work through setting this to 2 and getting both USB ports working on the same stack.

Appreciate your response.