AnsweredAssumed Answered

Booloader to Application jump

Question asked by aniketmarkande on Jul 18, 2017
Latest reply on Aug 1, 2017 by aniketmarkande

Hi,

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]");
    __API_JMP_APPLICATION();
}

 

void Jump_To_Application(void)
{
    extern uint32_t __FBL_APP_HANDSHAKE;
    /* handshake signal */
    __FBL_APP_HANDSHAKE = 0x55EEAAB8;
    /* disable interrupt */
    INT_SYS_DisableIRQGlobal();
    /* deinitialize the hardware peripherals */
    Boards_HardwareDeInit(g_etBoard_t);
    /* deinit the clock */
    Boards_ClockDeInit();
    /* jump to application */
    start_application(APP_START_ADDRESS);
}

 

USB is not deinitialized before jumping.

 

Kindly let me know whats wrong.

Thank you in advance.

 

Regards,

Aniket

Outcomes