Hello,
I am struggling with getting the USB bootloader to work.
Here is what I have done.
1. USB Bulk Device application works just fine.
2. I send a command from the PC over USB bulk to my code to jump to the USB bootloader located in ROM
3. Here is the code that gets executed before trying to jump to the ROM based USB bootloader:
USBDevDisconnect(USB0_BASE);
//
// Disable SysTick and its interrupt.
//
ROM_SysTickIntDisable();
ROM_SysTickDisable();
//
// Disable all processor interrupts. Instead of disabling them one at a
// time, a direct write to NVIC is done to disable all peripheral
// interrupts.
//
HWREG(NVIC_DIS0) = 0xffffffff;
HWREG(NVIC_DIS1) = 0xffffffff;
HWREG(NVIC_DIS2) = 0xffffffff;
HWREG(NVIC_DIS3) = 0xffffffff;
HWREG(NVIC_DIS4) = 0xffffffff;
//
// Call the USB boot loader.
//
ROM_UpdateUSB(0);
4. For reference, here is my .cmd file for the project.
#define APP_BASE 0x00000000
#define RAM_BASE 0x20000000
/* System memory map */
MEMORY
{
/* Application stored in and executes from internal flash */
FLASH (RX) : origin = APP_BASE, length = 0x00100000
/* Application uses internal RAM for data */
SRAM (RWX) : origin = 0x20000000, length = 0x00040000
}
/* Section allocation in memory */
SECTIONS
{
.intvecs: > APP_BASE
.text : > FLASH
.const : > FLASH
.cinit : > FLASH
.pinit : > FLASH
.init_array : > FLASH
.vtable : > RAM_BASE
.data : > SRAM
.bss : > SRAM
.sysmem : > SRAM
.stack : > SRAM
}
__STACK_TOP = __stack + 1024;
5. After jumping to the bootloader, the code is executing around location 0x0100CB58.
6. Eventually Device Manager shows Unknown USB Device (Device Descriptor Request Failed)
Any help or hints would be appreciated.