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
解決済! 解決策の投稿を見る。
Thank you for replie.
The problem was in this line:
__asm volatile ("cpsie i");
I had to replace with __asm volatile ("cpsie f"); to make it work.
regards
Christian
Thank you for replie.
The problem was in this line:
__asm volatile ("cpsie i");
I had to replace with __asm volatile ("cpsie f"); to make it work.
regards
Christian