AnsweredAssumed Answered

MX, USB and Host vs. Device support

Question asked by Barta.Hank on Jul 9, 2015
Latest reply on Jul 14, 2015 by chahrayar.chahrazed
Hi folks,
New to USB here. I know (more or less ;) ) what the difference between host and device are but not a lot more.

When configuring USB via 'MX, I find that if I set USB_OTG_FS as Host_Only, the USB Host middleware is available. Likewise configure as Device_Only, the Device middleware is available. If I configure USB_OTG_FS as OTG/Dual_Role_Device, then neither Host nor Device middleware is available. (Activate_SOF is not available to configure as the related GPIO pin is already configured for another input.)

Why is this? I would expect with dual role, I would be able to configure both Host and Device middlewares.

Is this a middleware library limitation? Does HAL not support dual role devices? (I'm just starting on reviewing UM1720 (host library) and UNM1734 (device library) and perhaps will find the answer there.)

At present I may need to either detect that a USB cable connects the device to a PC or that a USB flash drive has been connected via OTG cable, depending on which way the powers that be decide to go. I think I need the device library for the former and the host library for the latter and it would be nice to get both configured while I wait for an answer.

Feel free to offer alternate suggestions.