AnsweredAssumed Answered

kea128  bootloader cannot work ?

Question asked by 维 邓 on Dec 24, 2018
Latest reply on Jan 2, 2019 by Jing Pan

I am working on bootloader of kea128,  i download the DEMOCODE from INTERNET, and convert it from Codewarrior to Keil, but the function jumptoapplication() doesn't work. In debugging, the sp register is 0x4000, the pc register is not 0x4000, it can not jump to application from boot .the code is like this :

  

void JumpToApplication(uint32_t sp, uint32_t pc)
{

JumpToPtr pJumpTo;
uint16_t i;

static uint32_t s_stackPointer = 0;
uint32_t *pNewAppEntry;
pNewAppEntry = (uint32_t *)pc;
s_stackPointer = sp;

 

SCB->VTOR=0X4000;
__set_MSP(s_stackPointer);
__set_PSP(s_stackPointer);
pJumpTo = ((JumpToPtr)(*pNewAppEntry));

// s_application();
pJumpTo();

while(1)
{
i++;
}


}

 

who can help me?  

Outcomes