I am working on MK22 series controller. After flashing new code via custom usb bootloader, i am not able to jump to application.
code is as follows:
#define APP_START_ADDRESS 0x50000
#define __API_JMP_APPLICATION (*((const void(*)(void))APP_START_ADDRESS))
void start_application(unsigned long app_link_location)
__asm(" ldr sp, [r0,#0]");
__asm(" ldr pc, [r0,#4]");
extern uint32_t __FBL_APP_HANDSHAKE;
/* handshake signal */
__FBL_APP_HANDSHAKE = 0x55EEAAB8;
/* disable interrupt */
/* deinitialize the hardware peripherals */
/* deinit the clock */
/* jump to application */
USB is not deinitialized before jumping.
Kindly let me know whats wrong.
Thank you in advance.