USB Failure with Bootloader

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

USB Failure with Bootloader

跳至解决方案
1,124 次查看
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 解答
756 次查看
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

 

在原帖中查看解决方案

1 回复
757 次查看
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