Hi,
I try to load a program in ram and run it.
Evrything work unless the interrupt.
Running the program directly from project with MCUX is OK.
After downloading the .bin in ram I start it with this code:
asm ("CPSID f"); //Disable interrupts and all fault handlers (set FAULTMASK)
static void (*go_to_app)(void) = 0;
go_to_app = (void (*)())(ptPC); //ptPC =0x20008181
SCB->VTOR = (uint32_t)Relocated;//Relocated=0x20008000
__set_MSP(ptSP);
__set_PSP(Relocated);
__asm volatile ("cpsie i");
go_to_app();
have I miss something ?
Regards
Christian
已解决! 转到解答。