USB Failure with Bootloader

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB Failure with Bootloader

Jump to solution
677 Views
dspNeil
Contributor III

I have an MQX 3.8 application that is working fine when loaded alone into my K53. USB works as expected here.

 

When I load the application using my USB bootloader, the application now resides at flash 0x10000, and everything works fine, except my USB will no longer function. The USB task launches, but does not ever report a successful device insertion.

 

Something else strange that I've noticed is that my UART debugger seems to repeat some messages 3x when my image runs from the bootloader. Any ideas? I'm really stuck, and need to release this product in a couple of days.

1 Solution
309 Views
dspNeil
Contributor III

Thanks to the FAEs, here's the fix:

 

The USB MSD bootloader example does not disable the clock gating to the peripherals that were enabled, and the main MQX app assumes that these registers are in their POR states.

 

The fix - Disable all of the clock gating before jumping to your app (USB was the important one for me):

if((New_sp != 0xffffffff)&&(New_pc != 0xffffffff))        {            SIM_SCGC4 &= ~(0x00040000);         //DES disable USBOTG clock/module

 

View solution in original post

1 Reply
310 Views
dspNeil
Contributor III

Thanks to the FAEs, here's the fix:

 

The USB MSD bootloader example does not disable the clock gating to the peripherals that were enabled, and the main MQX app assumes that these registers are in their POR states.

 

The fix - Disable all of the clock gating before jumping to your app (USB was the important one for me):

if((New_sp != 0xffffffff)&&(New_pc != 0xffffffff))        {            SIM_SCGC4 &= ~(0x00040000);         //DES disable USBOTG clock/module