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

Present program counter address

Good day,

I want to refresh and (or) update my knowledge on ARMv7.

Is it true for ARMv7-M that when CPU starts execute one instruction, PC value has already been updated/is being updated in parallel with address of the next instruction? Or PC is updated after execution? Or when? Can you provide reference to architecture manuals for this info?

Why I am asking this? I have hard-fault handler which captures current (when hard-fault occurs) context. When debugging that captured information I have PC value which was captured. I want to be sure is that value (a) is an address on an instruction on which hard-fault occurred, (b) is an address of the next instruction, which was intended to be executed after the one which hard-faulted, (c) it depends and can be either (a) or (b) and where to look for info to decide which of (a) an (b) may be true for the specific situation. And there also may be (d) for this: is a value of PC when PC was being updated by instruction in execution progress..

Thank you in advance!