- About device controller, unfortunately two device port can not be supported at the same time (in USB spec. a device connected to two host tree is not defined).
- Feel free to run device on one port but host on other ports. In this case, the actual register base address is used (actually how ports are distinguished depends on the controller driver implement, but usually uses register base address to show difference).
E.g.,
in simulation example you can see both device and host run at the same time (https://github.com/azure-rtos/usbx/blob/master/samples/demo_usbx.c)
- Feel free to use https://video2.skills-academy.com/en-us/azure/rtos/usbx/usbx-host-stack-4#ux_host_stack_hcd_register to register multiple host controllers (if necessary). The initialization function and two parameters passed to HCD initialization function is used to differentiate controllers and/or drivers. Note If host ports are on single controller there is no need to register multiple controllers.