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.
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