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

Pushing to the MSP stack instead when late arriving?

Hello.

We know that if an ARMv7-M is running in Thread mode using PSP when an exception occurs, registers will normally be pushed onto the PSP stack. However, in the case of late arriving, e.g. if an exception of higher priority happens after r0 has just been pushed onto the PSP stack but before r1 is pushed, what exactly will happen next? I can think of two possibilities. Which is correct?

  1. Stop pushing to the PSP stack. Push all the eight registers (PC/xSPR/r0...)to the MSP stack instead, from scratch.
  2. Only push the remaining registers (r1, r2, r3...) onto the MSP stack.

Thanks.