This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2745R10-Q1: Jumping to a particular slot in flash

Part Number: CC2745R10-Q1

Tool/software:

I have one user-specific bootloader image flashed in the SSB slot with the version set as 1.0. An application image is flashed in the primary slot with the version set as 2.0. As per Secure Boot's functionality, the image with the higher version boots up (in this case, the application image). However, now I want to enter the SSB slot.

I'm trying to perform a jump from my application to bootloader with the following code:

/**************************************************************************************/

// Get the application's initial stack pointer
uint32_t app_sp = *(volatile uint32_t *)BL_START_ADDR;

// Get the application's reset handler address
uint32_t app_reset_handler = *(volatile uint32_t *)(BL_START_ADDR + 4);

// Set the Vector Table Offset Register to the application's base address
SCB->VTOR = BL_START_ADDR;

// Memory and Instruction Synchronization Barriers
// These ensure the VTOR update is complete before the jump.
__DSB();
__ISB();

// Disable all interrupts to prevent conflicts.
__disable_irq();

// Set the Main Stack Pointer (MSP) to the application's stack pointer.
__set_MSP(app_sp);

// Jump to the application's reset handler.
void (*app_jump)(void) = (void (*)(void))app_reset_handler;
app_jump();

/**************************************************************************************/

When this code is executed, the device reboots into the application again (higher version number), even though I'm changing the registers for the bootloader's addresses.

I have also tried using the ROM API: 

/**************************************/
HapiSbSetId(3); // Boot into SSB
/**************************************/
But it doesn't work as expected. 

Could you review this process and provide any insights into potential issues or suggest alternative steps to perform a jump?
NOTE: Even a jump from bootloader to app doesn't work as expected.

  • Hello,

    In order to achieve this, please see the attached project. 

    You'll find that the primary and secondary slots are actually not secure boot images, which from ROM's perspective means there are no valid images and the SSB is inovked everytime. This will mean that you must do image verification on your own, but it should get you to a place where it works. Additionally the code for jumping images is provided (see and read the readme.md file included in the project). Hope that helps!

    6036.SSB_Always_Boot.zip

    Best,

    Nima Behmanesh