Programming Model
1574
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
Cortex-M3 Processor
These registers can be accessed individually or as a combination of any two or all three registers, using
the register name as an argument to the MSR or MRS instructions. For example, all of the registers can
be read using PSR with the MRS instruction, or APSR only can be written to using APSR with the MSR
instruction.
shows the possible register combinations for the PSR. See the MRS and MSR
instruction descriptions in the
Cortex-M3 Instruction Set Technical User's Manual
for more information
about how to access the program status registers.
(1)
The processor ignores writes to the IPSR bits.
(2)
Reads of the EPSR bits return zero, and the processor ignores writes to these bits.
Table 24-7. PSR Register Combinations
Register
Type
Combination
PSR
R/W
(1) (2)
APSR, EPSR, and IPSR
IEPSR
RO
EPSR and IPSR
IAPSR
R/W
APSR and IPSR
EAPSR
R/W
APSR and EPSR
Figure 24-7. Program Status Register (PSR)
31
30
29
28
27
26
25
24
N
Z
C
V
Q
ICI / IT
THUMB
R/W-0
R/W-0
R/W-0
R/W-0
R/W-0
R/0-0x0
R/0-1
23
16
Reserved
R-0
15
10
9
8
ICI/IT
Reserved
R/O-0x00
R-0
7
6
0
Reserved
ISRNUM
R-0
R/0-0x00
LEGEND: R/W = Read/Write; R = Read only; -
n
= value after reset
Table 24-8. Program Status Register (PSR) Field Descriptions
Bit
Field
Value
Description
31
N
APSR Negative or Less Flag
0
The previous operation result was positive, zero, greater than, or equal
1
The previous operation result was negative or less than.
30
Z
APSR Zero Flag
0
The previous operation result was non-zero.
1
The previous operation result was zero
29
C
APSR Carry or Borrow Flag
0
The previous add operation did not result in a carry bit or the previous subtract operation resulted in
a borrow bit.
1
The previous add operation resulted in a carry bit or the previous subtract operation did not result in
a borrow bit.
The value of this bit is only meaningful when accessing PSR or APSR.
28
V
APSR Overflow Flag
0
The previous operation did not result in an overflow
1
The previous operation resulted in an overflow.
The value of this bit is only meaningful when accessing PSR or APSR.