For test purpose, I try to manually set the XPSR register with exception number 3, in this way
asm( "ldr r0, =0x21000003 \t\n" "msr xpsr, r0 \t\n" );
During the setting, the core is in privileged secure state. After execution, XPSR = 0x21000000, so the bit[8:0] is not successfully set. But if I set XPSR from the debugger, the exception number can be set, any idea? Thanks.
View all questions in Cortex-M / M-Profile forum