This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Jumping Between Applications

hey guys i want to implement two separate application programs on the same chip.

Say Application1 is stored in address start_address1 to end_address2 and Application2 is stored in address start_address2 to end_address2.

can i just directly jump to one application to another ? i am used to using this on simpler microcontroller, can i do this in the NRF52 too?

void JumpToApp(void) {

void (*fptr)(void);
fptr = (void (*)(void))APP1_RESET_ADDRESS;
fptr();

}

thanks.

Parents
  • Hi AmbystomaLabs, The main vector table is still point into the softdevice vector table. Normally the softdevice will forward those interrupt that's available to the application to the application vector table, which is located at the start address of the application. sd_softdevice_vector_table_base_set() can change that and change the forward address to the address set in the call. Using this you can branch directly to the reset handler of the 2nd application you want to run.

    This is the same mechanism we used to jump from application to bootloader and vice versa in our legacy bootloader. (Check bootloader_app_start() function in the bootloader or bootloader_start() in buttonless application in SDK v11)

Reply
  • Hi AmbystomaLabs, The main vector table is still point into the softdevice vector table. Normally the softdevice will forward those interrupt that's available to the application to the application vector table, which is located at the start address of the application. sd_softdevice_vector_table_base_set() can change that and change the forward address to the address set in the call. Using this you can branch directly to the reset handler of the 2nd application you want to run.

    This is the same mechanism we used to jump from application to bootloader and vice versa in our legacy bootloader. (Check bootloader_app_start() function in the bootloader or bootloader_start() in buttonless application in SDK v11)

Children
Related