Other Parts Discussed in Thread: UNIFLASH
USB firmware update - bootloader (msp-exp432e401y launchpad)
A flash based bootloader reads the firmware from USB storage device and writes to flash. The firmware was correctly read from USB stick and written into flash by the bootloader, and was confirmed / verified by UniFlash. After exporting the image using UniFlash to a file, it was exact the same as the firmware image on the USB stick, and the exported application (nortos) image run as expected after programing it by using UniFlah. However, the bootloader couldn't start the application by jumping to the application's address in flash (0x40000). The code to jump and start the application is as follows:
void CallApplication(uint_fast32_t ui32StartAddr)
{
/* Disable all processor interrupts. */
HWREG(NVIC_DIS0) = 0xffffffff;
HWREG(NVIC_DIS1) = 0xffffffff;
HWREG(NVIC_DIS2) = 0xffffffff;
HWREG(NVIC_DIS3) = 0xffffffff;
HWREG(NVIC_DIS4) = 0xffffffff;
//
// Set the vector table to the beginning of the app in flash.
//
HWREG(NVIC_VTABLE) = ui32StartAddr;
//
// Load the stack pointer from the application's vector table.
//
__asm(" ldr r1, [r0]\n"
" mov sp, r1\n");
//
// Load the initial PC from the application's vector table and branch to
// the application's entry point.
//
__asm(" ldr r0, [r0, #4]\n"
" bx r0\n");
}
Any help would be appreciated.