The Current Program Status Register (CPSR) holds processor status and control information. More...
Content | |
| CPSR Bits | |
| Bit position and mask macros. | |
| CPSR M field values | |
| Valid values for CPSR M field. | |
Data Structures | |
| struct | CPSR_Type |
| Bit field declaration for CPSR layout. More... | |
Functions | |
| __STATIC_FORCEINLINE uint32_t | __get_CPSR (void) |
| Get CPSR Register. | |
| __STATIC_FORCEINLINE void | __set_CPSR (uint32_t cpsr) |
| Set CPSR Register. | |
The Current Program Status Register (CPSR) holds processor status and control information.
The individual register bits have the following meaning:
| Bits | Name | Function |
|---|---|---|
| [31] | N | Negative condition code flag |
| [30] | Z | Zero condition code flag |
| [29] | C | Carry condition code flag |
| [28] | V | Overflow condition code flag |
| [27] | Q | Cumulative saturation bit |
| [26:25] | IT[1:0] | If-Then execution state bits for the Thumb IT (If-Then) instruction |
| [24] | J | Jazelle bit |
| [19:16] | GE | Greater than or Equal flags |
| [15:10] | IT[7:2] | If-Then execution state bits for the Thumb IT (If-Then) instruction |
| [9] | E | Endianness execution state bit: 0 - Little-endian, 1 - Big-endian |
| [8] | A | Asynchronous abort mask bit |
| [7] | I | IRQ mask bit |
| [6] | F | FIRQ mask bit |
| [5] | T | Thumb execution state bit |
| [4:0] | M | Mode field |
Consider using __get_CPSR and __set_CPSR for accessing this register.
| __STATIC_FORCEINLINE uint32_t __get_CPSR | ( | void | ) |
Get CPSR Register.
This function returns the content of the Current Program Status Register (CPSR).
| __STATIC_FORCEINLINE void __set_CPSR | ( | uint32_t | cpsr | ) |
Set CPSR Register.
| [in] | cpsr | CPSR value to set |
This function assigns the given value to the Current Program Status Register (CPSR).