AnsweredAssumed Answered

Jump to bootloader from APP

Question asked by Zhang Huarong on Dec 13, 2016
Latest reply on Dec 14, 2016 by jeremyzhou


I used the taget CPU is MK22FN1M0AVLQ12,the bootloader version is NXP_Kinetis_Bootloader_2_0_0,the development tool is KDS 3.2.0.

The bootloader running OK and the Update image funcion is OK.When CPU power,the bootloader timeout 2S,then jump to APP,the APP running OK.


Now i want to implemnet the function that Jump to bootloader from APP,and through the APP_flag control the bootloader running.


bool RunBootloaderFlag = 0U;


if(0x55 = APP_flag)


     RunBootloaderFlag = 1U;



time out = 2000U;    /* 2S */


while(activePeripheral == NULL)


      if((time out > 0U) && (RunBootloaderFlag == 0))


            time out--;


      if(time out == 0 )


           jump_to_application(applicationAddress, stackPointer);



      wait the shake hands;



How can i do that modify the APP_flag?Whether i can call the runBootloader function and pass the parameter.