AnsweredAssumed Answered

LPC845 bootloader jump issue

Question asked by jtro 9 on Aug 16, 2019
Latest reply on Aug 16, 2019 by soledad

In my custom bootloader I'm not able to jump to application.

 

memory mapping:

0x0 to 0x8fff - bootloader

0x9000 - 0x9ffff - firmware

 

bootloader Code:

 

void boot_jump(uint32_t address)

{

// below assembly code gives error in mcuxpresso

//     __asm(
//            LDR SP, [R0]        //;Load new stack pointer address
//            LDR PC, [R0, #4]    //;Load new program counter address
//          );

 

//alternate function for jump

    asm("bx %r0");

}

 

void main()

{

            for(uint8_t irqn=0; irqn < 32; irqn++)
            {
                NVIC_DisableIRQ(irqn);
                NVIC_ClearPendingIRQ(irqn);
            }

            SCB->VTOR = 0x9000 & 0x1FFFFF80;

            boot_jump(0x9000 );

}

Outcomes