__asm void boot_jump( uint32_t address ){ LDR SP, [R0] ;Load new stack pointer address LDR PC, [R0, #4] ;Load new program counter address } void execute_user_code(void) { /* Change the Vector Table to the USER_FLASH_START in case the user application uses interrupts */ SCB->VTOR = USER_FLASH_START & 0x1FFFFF80; boot_jump(USER_FLASH_START); } |