The SCB->SHCSR is written during boot, when enabling faults. This overwrites the SYSACT bit that was set by branching to Handler_Mode earlier. The integrity checks on exception return fails because the IPSR and the active interrupt in the SCB don't match.
Fixes: (1) enables the faults before, or (2) do not modify other bits in SCB->SHCSR than the fault enabling bits.
The
SCB->SHCSR
is written during boot, when enabling faults. This overwrites theSYSACT
bit that was set by branching to Handler_Mode earlier. The integrity checks on exception return fails because theIPSR
and the active interrupt in the SCB don't match.Fixes: (1) enables the faults before, or (2) do not modify other bits in
SCB->SHCSR
than the fault enabling bits.Seen on NRF52 eval board, but not in QEMU.