AnsweredAssumed Answered

Jumping from bootloader to user application

Question asked by Kevin Luty on Sep 12, 2016
Latest reply on Jul 11, 2017 by Niyanth Krishna Polisetty

I'm using KBOOT v2.0 and a MK22F512VLH12 chip.


I currently have my user application placed at 0xA000 and it is running MQX.  Direct boot is currently enabled, so at power-up, it skips the bootloader and goes straight into user application.  


Now, I want to be able to go from my user application into the bootloader.  I've tried using the code found in the bootloader manual however that seems to be unsuccessful:

// Variables
uint32_t runBootloaderAddress;
void (*runBootloader)(void * arg);

void run_bootloader(void * arg)
// Read the function address from the ROM API tree.
runBootloaderAddress = **(uint32_t **)(0x0000001CUL);
runBootloader = (void (*)(void * arg))runBootloaderAddress;

And then I eventually call:

What am I doing wrong?  How can I jump back into bootloader successfully?