static void SftJumpToBootloader(void)
{
void (*SysMemBootJump)(void);
//volatile uint32_t BootAddr = 0x8000000;
g_JumpInit = 0xAA553344;
SysMemBootJump = (void (*)(void)) *((uint32_t *) ((BootAddr + 4))); /* Set up the jump to boot loader address + 4 */
__set_MSP(*(uint32_t *)BootAddr); /* Set the main stack pointer to the boot loader stack */
SysMemBootJump(); /* Call the function to jump to boot loader location */
while (1)
{
/* Jump is done successfully */
/* Code should never reach this loop */
}
}