Using OTG2 for USB CDC host

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

Using OTG2 for USB CDC host

638件の閲覧回数
jeffthompson
Contributor V

I'm using MCUXpresso 11.01 for the MIMXRT1062DVJ6A, and MCUXpresso SDK USB Stack, Rev. 10, 06/2019, and want to be able to switch from OTG1 to OTG2 (and back) for use as a USB CDC host. How is this possible?

The example code, host_cdc_bm, uses CONTROLLER_ID, which is a macro defined as kUSB_ControllerEhci0, when it calls USB_HostInit, but changing this to kUSB_ControllerEhci1 does not enable USB OTG2. In fact, according to the comments in usb.h, "Currently, there are no platforms which have two EHCI IPs, this is reserved
to be used in the future". The MCU I'm using actually does have two IPs, which I'm assuming are both EHCI-capable, and I'd like to use both in my product, even if I can only use one at a time.

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

528件の閲覧回数
tim_wang
NXP Employee
NXP Employee

Hi Jeff,

I've tried this demo, and changed the macro to kUSB_ControllerEhci1 can enable OTG2 successfully.

And if you want to use OTG1 and OTG2 simultaneously, you need to build two sets of application to serve each port.  You can refer to the keyboard2mouse demo to setup your own app.

Thanks

Tim

0 件の賞賛