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

Can i change SP at run time in CM33?

Dear All.

I am trying to back trace and get the call of faulty application after getting an exception, in this i need to update SP from HardFault Handler.

I tried in many way like "MOV SP, Rn" , "MSR SP, Rn" and etc but finally ended up with either Compilation error or Lockup state after execution of this instruction.

Already I've updated PSP from Handler, but i need to change SP to get called stack frames.

Please help me to do this.

Regards,

Deepak

Parents
  • $> armasm --version_number↵

    6120001

    I don't get any error with "254 0000002A 4685    MOV   SP, R0      ;set SP" but it fails to move R0 into SP while execution.

    replacing line no 254 with "MSR SP, R0" gives error,

    with this way i want to move R0 into SP register, is it right?

Reply
  • $> armasm --version_number↵

    6120001

    I don't get any error with "254 0000002A 4685    MOV   SP, R0      ;set SP" but it fails to move R0 into SP while execution.

    replacing line no 254 with "MSR SP, R0" gives error,

    with this way i want to move R0 into SP register, is it right?

Children