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

Cortext M3 Program Counter

Note: This was originally posted on 21st March 2011 at http://forums.arm.com

Hello all,
I am using Cortex M3 (which support only Thumb-2 Instruction Set). I want to let the PC to jump to a particular address. When I try to use PC as destination register to move the address in the PC, a fault exception occurs. I have read the Ref. Manual but could not find any restrictions that may apply on PC. I am using IAR IDE. Any help would be highly appreciated.
Parents
  • Note: This was originally posted on 22nd March 2011 at http://forums.arm.com

    Instructions for ARM instructions must be word aligned in memory, and for Thumb instructions they must be half-word aligned.

    When used in the PC the LSB of the register is not part of the address, but encodes mode to set on the branch. For Thumb it should be one, and for ARM should be zero.

    Iso
Reply
  • Note: This was originally posted on 22nd March 2011 at http://forums.arm.com

    Instructions for ARM instructions must be word aligned in memory, and for Thumb instructions they must be half-word aligned.

    When used in the PC the LSB of the register is not part of the address, but encodes mode to set on the branch. For Thumb it should be one, and for ARM should be zero.

    Iso
Children
No data