From Cortex-M4 Technical Reference Manual:
2.3.1 Program counter
Register R15 is the Program Counter (PC).
Bit [0] is always 0, so instructions are always aligned to word or halfword boundaries.
Reading from PC
shouldn't return an odd address. However when you write to PC
, LSB of value is loaded into the EPSR T-bit. From Cortex-M3 Devices Generic User Guide - 2.1.3. Core registers
Thumb state
The Cortex-M3 processor only supports execution of instructions in Thumb state. The following can clear the T bit to 0:
instructions BLX, BX and POP{PC} restoration from the stacked xPSR value on an exception return bit[0] of the vector value on an exception entry or reset.
Attempting to execute instructions when the T bit is 0 results in a fault or lockup. See Lockup for more information.
In other words, you can read even values from PC
but can't write such values under normal circumstances.