USB OTG host and device role detection via software

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

USB OTG host and device role detection via software

665件の閲覧回数
yangao
Contributor III

Hi

We use iMX6 and expose the USB OTG port. We use OTG-ID pin to set host/device role. When we pull down OTG-ID, it works as a host; we leave it float to make it work as a device. 

We have two kind of special cables to connect to the OTG port:

1) one side of the cable connects to USB OTG port, the other side is UAB-A male. OTG port is in device role when using this cable.

2) one side of the cable connects to USB OTG port, the other side is USB-A female. OTG port is in host role when using this cable.

Everything works fine after we set the OTG-ID. The problem is we have to set OTG-ID manually.

My question is: is there a way to find out what USB cable/device is connected via software and thus we can set OTG-ID properly automatically?

Thanks,

Winston

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

654件の閲覧回数
igorpadykov
NXP Employee
NXP Employee

Hi Yan

 

in general one can make necessary connections (ground OTG-ID of float) on cable side

and in software read ID signal as GPIO_1 (ALT3)  on i.MX6DL.

 

Best regards
igor

0 件の賞賛
返信