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

What should be LR(link register) value for Cortex-M7 core?

I checked LR(link register) value about Cortex-M7 core with NUCLEO-H723ZG(STM32H723ZGT6).

As a result, when service routine is returned, LR value is PC address +1 as below.

PC=0x08001182

LR=0x08001183

Is this behavior correct one?

I expexted that LR and PC value are the same in this case.

Parents
  • The least significant bit in the LR register specifies that the code at this address is a Thumb instruction and all Cortex-M instructions have Thumb encoding. So this behavior is expected. All instructions of Cortex-M cores must be located on even addresses.

Reply
  • The least significant bit in the LR register specifies that the code at this address is a Thumb instruction and all Cortex-M instructions have Thumb encoding. So this behavior is expected. All instructions of Cortex-M cores must be located on even addresses.

Children