This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"BX LR" causing INVPC Usage Fault exception

I have implemented a context switching code. For going back to privileged user mode after setting the return value in SP + 0x18 address, I am using BX LR instruction.

But code execution goes to HardFault handler and INVPC bit of USAFAULT register is set.

Following is the status of CPU registers just before executing the BX LR instruction. Address (0x100EFA34) saved at SP+0x18 is a valid address where I want PC to go