it cant jump to application after bootloader
Hello,
i use spc58ec80e1 in our project. (spc5studio)
the bootloader code is flashed in address 0x00fc0000 (Boot Mode : copy in flash),
and application code is flashed in address 0x01000000.(Boot Mode : Excute from flash)
After the bootloader starts to operate after power,
it wants to jump to the application code using timeout using PIT.
but it does not work.
Looking at the community and so on,
void application()
{
void (*user_application)(void);
uint32_t jump_address_pointer;
vuint32_t jump_address;
jump_address_pointer = (0x01000000 + 0x4);
jump_address = *((vuint32_t*)(jump_address_pointer));
SPC5_PIT0_DISABLE_CLOCK();
/*
* disable interrupt
*/
irqIsrDisable();
/*
* Disable XOSC and set DRUN mode
*/
MC_ME.DRUN_MC.R = SPC5_ME_MC_SYSCLK_IRC | SPC5_ME_MC_IRCON | SPC5_ME_MC_XOSCON | SPC5_ME_MC_FLAON_NORMAL | SPC5_ME_MC_MVRON;
if (SPCSetRunMode(SPC5_RUNMODE_DRUN) == CLOCK_FAILED) {
SPC5_CLOCK_FAILURE_HOOK();
}
user_application = (void(*)(void))jump_address;
user_application();
}
I've tried it, but it don't jump either.
I saw to do "jump after the last byte of reset vector" in the community, but I didn't understand this.
please help me.
