ARMv8-M MPS2_AEMv8M FVP, try to manually set XPSR in Privileged Secure state, the exception number cannot be set successfully.

Hi Community,

For test purpose, I try to manually set the XPSR register with exception number 3, in this way

"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.

More questions in this forum