AnsweredAssumed Answered

Changing USB ports at run time.

Question asked by Jeffery Thompson on Apr 6, 2020
Latest reply on Apr 15, 2020 by Jeffery Thompson

I'm using MCUXpresso SDK 2.6.2 and USB stack on the MIMXRT1062. I want to chance the USB port I'm using at run time. So I undo the initialization done by the host_cdc_bm example, in reverse order; that is, I disable the IRQ, call USB_HostDeinit(), and then CLOCK_DisableUsbhs0PhyPllClock() or CLOCK_DisableUsbhs1PhyPllClock(). But there is no call to disable the enable done by CLOCK_EnableUsbhs0Clock() or CLOCK_EnableUsbhs1Clock(), and when I subsequently try to enable the other USB HS peripheral, I get a hard fault.

 

How do I properly tear down one USB port in order to bring up the other?

Outcomes