This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Use USB0 and USB1 in device mode simultaneously?

Hi,

I've managed to get USB1 working in device mode on AM335x (some minor patches needed on top of 02.00.00.07; see below).

What kind of trouble should I expect to see when trying to use both controllers in device mode simultaneously?  I.e., is it known not to work for some reason, or has it simply not been enabled and tested?

Thanks for any heads up before I dive into it.

In usbdenum.c, USBDeviceEnumHandler (two places):

- USBDReadAndDispatchRequest(0);
+ USBDReadAndDispatchRequest(ulIndex);

In usbdenum.c, USBDSetConfiguration:

- USBDeviceConfig(0, ...)
+ USBDeviceConfig(ulIndex, ...)

In addition, there are a few

  ASSERT(ulIndex == 0);

that need to be removed/commented out if doing a Debug build.

  • HI Orjan,

    If you refer the USB examples in StarterWare , there are examples which use both the USB controllers .usb_device_host_msc is one such example. There should not be anything stopping you from using both the controllers simultaneously. Currently we do not have any example which configures both the controllers in device mode as the evaluation boards we release have by default a host port on USB1 (say AM335x EVMAM).

    If you are integrating into an OS ( which would mean queuing transfers on both the controllers ) there is a potential issue of non re-entrancy or thread safety .

      

  • Thanks.  I'll watch out for the things you mentioned.