Switch USB role

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Switch USB role

1,302 Views
Salvatore1z
Contributor II

Hi,

I know that iMX6 has a OTG enabled USB controller and I would like to know if an API is available to change the role of the USB controller dynamically from host mode to device mode.

I expect to call this API from user space.

After calling the API I exepct the USB host stack to go down and the USB gadget stack to come up.

Thank you.

Salvatore

Labels (2)
0 Kudos
1 Reply

703 Views
jamesbone
NXP TechSupport
NXP TechSupport

Hello Salvatore,

You need to control the USB_OTG_ID pin in order to change from one to another here is another thread that you can follow regarding this topic:

How to control the USB_OTG_PWR_CTL_WAKE and USB_OTG_ID of i.MX6 in Linux BSP


Have a great day,
Jaime

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos