I have a custom board with the MK60DN512ZVLQ10. I have a standalone bootloader in 0-0xFFFF memory that uses USB and micro SD. After jump to application, I run MQX 4.2. I have a USB task that sets up my board as a host and mounts an MSD.
If I start the main application out of the debugger in KDS (bypassing bootloader), everything works fine and the flash drive is mounted and I can read and write to it.
If I power cycle my board and start in the bootloader and let it jump to my main application, it can never mount the USB drive, it repeatedly receives KHCI_ATOM_TR_TO and eventually hangs up.
I have tried manipulating every USB_OTG register in BSP and have had no luck.
If I launch into the main application via debugger and set my PC register to the bootloader start before I press run on the main application, and then press run (thereby executing the bootloader code while debugging the main application code), then the USB drive correctly mounts.