| Address | Core Peripheral |
|---|---|
0xE000E010 ~ 0xE000E01F |
System Timer |
0xE000E100 ~ 0xE000E4Ef |
NVIC - Nested Vectored Interrupt Controller |
0xE000Ed00 ~ 0xE000ED3F |
System Control Block |
0xE000ED88 ~ 0xE000ED8B |
FPU Coprocessor Access Control |
0xE000ED90 ~ 0xE000EDB8 |
MPU - Memory Protection Unit (rarely used in Cortex-M4 programming) |
0xE000EF00 ~ 0xE000EF03 |
NVIC Again |
0xE000EF30 ~ 0xE000EF44 |
FPU - Floating Point Unit |
| Address | Name | Type | Required Privilege | Value on Reset |
|---|---|---|---|---|
0xE000E100 ~ 0xE000E11F |
NVIC_ISER0 ~ NVIC_ISER7 (goto) | RW | Privileged | 0x00000000 |
0xE000E180 ~ 0xE000E19F |
NVIC_ICER0 ~ NVIC_ICER7 (goto) | RW | Privileged | 0x00000000 |
0xE000E200 ~ 0xE000E21F |
NVIC_ISPR0 ~ NVIC_ISPR7 (goto) | RW | Privileged | 0x00000000 |
0xE000E280 ~ 0xE000E29F |
NVIC_ICPR0 ~ NVIC_ICPR7 (goto) | RW | Privileged | 0x00000000 |
0xE000E300 ~ 0xE000E31F |
NVIC_IABR0 ~ NVIC_IABR7 (goto) | RO | Privileged | 0x00000000 |
0xE000E400 ~ 0xE000E4EF |
NVIC_IPR0 ~ NVIC_IPR59 (goto) | RW | Privileged | 0x00000000 |
0xE000EF00 |
NVIC_STIR (goto) | WO | Configurable | 0x00000000 |
0xE000 E000
0x0100 + 0x04 * x (x = 0 ~ 7)
x[y] = interrupt 32 * x + y
0x0180 + 0x04 * x (x = 0 ~ 7)
x[y] = interrupt 32 * x + y
0x0200 + 0x04 * x (x = 0 ~ 7)
x[y] = interrupt 32 * x + y
0x0280 + 0x04 * x (x = 0 ~ 7)
x[y] = interrupt 32 * x + y
0x0300 + 0x04 * x (x = 0 ~ 7)
x[y] = interrupt 32 * x + y
0x0400 + 0x04 * x (x = 0 ~ 59)
| Reg | Bits 31 ~ 24 | Bits 23 ~ 16 | Bits 15 ~ 8 | Bits 7 ~ 0 |
|---|---|---|---|---|
| NVIC_IPR59 | IP[239] |
IP[238] |
IP[237] |
IP[236] |
| NVIC_IPRx | IP[4x + 3] |
IP[4x + 2] |
IP[4x + 1] |
IP[4x] |
| NVIC_IPR0 | IP[3] |
IP[2] |
IP[1] |
IP[0] |
0x0E00
0x03 specifies interrupt IRQ3.
| Address | Name | Type | Required Privileged | Reset Value |
|---|---|---|---|---|
0xE000 E008 |
ACTLR | RW | Privileged | 0x00000000 |
0xE000 ED00 |
CPUID | RO | Privileged | 0x410FC241 |
0xE000 ED04 |
ICSR | RW | Privileged | 0x00000000 |
0xE000 ED08 |
VTOR | RW | Privileged | 0x00000000 |
0xE000 ED0C |
AIRCR | RW | Privileged | 0xFA050000 |
0xE000 ED10 |
SCR | RW | Privileged | 0x00000000 |
0xE000 ED14 |
CCR | RW | Privileged | 0x00000200 |
0xE000 ED18 |
SHPR1 | RW | Privileged | 0x00000000 |
0xE000 ED1C |
SHPR2 | RW | Privileged | 0x00000000 |
0xE000 ED20 |
SHPR3 | RW | Privileged | 0x00000000 |
0xE000 ED24 |
SHCSR | RW | Privileged | 0x00000000 |
0xE000 ED28 |
CFSR | RW | Privileged | 0x00000000 |
0xE000 ED28 |
MMSR | RW | Privileged | 0x00 |
0xE000 ED29 |
BFSR | RW | Privileged | 0x00 |
0xE000 ED2A |
UFSR | RW | Privileged | 0x0000 |
0xE000 ED2C |
HFSR | RW | Privileged | 0x00000000 |
0xE000 ED34 |
MMFAR | RW | Privileged | Unknown |
0xE000 ED38 |
BFAR | RW | Privileged | Unknown |
0xE000 ED3C |
AFSR | RW | Privileged | 0x00000000 |
0xE000 E008)
| Bit 9 | Bit 8 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|
| DISOOFP | DISFPCA | DISFOLD | DISDEFWBUF | DISMCYCINT |
| Reserved on Cortex-M4. | Reserved on Cortex-M4. | Disable instruction folding. | Disable write buffer. | Disable multi-cycle interrupt. |
0xE000 ED00)0x410F C241| Bits 31 ~ 24 | Bits 23 ~ 20 | Bits 19 ~ 16 | Bits 15 ~ 4 | Bits 3 ~ 0 |
|---|---|---|---|---|
| Implementer | Variant | Constant | PartNo | Revision |
| Implementer Code. (0x41 - Arm) | Variant Number. The r value in the rnpn product revision identifier. (0x0 - revision 0) |
Constant Value. (reads as 0xF) | Part Number of the Processor. (0x0C24 - Cortex-M4) | Revision Number. The p value in the rnpn product revision identifier. (0x1 - patch 1) |
0xE000 ED00)| Bit 31 | Bits 30, 29 | Bit 28 | Bit 27 | Bit 26 | Bit 25 | Bits 24, 23 | Bit 22 | Bits 21, 20, 19 | Bits 18 ~ 12 | Bit 11 | Bits 10, 9 | Bits 8 ~ 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| NMIPENDSET (rw) | Reserved | PENDSVSET (rw) | PENDSVCLR (w) | PENDSTSET (rw) | PENDSTCLR (w) | Reserved | ISRPENDING (r) | Reserved | VECTPENDING[6:0] (r) | RETOBASE (r) | Reserved | VECTACTIVE[8:0] (rw) |
| NMI set-pending bit. | ... | PendSV set-pending bit. | PendSV clear-pending bit. This bit is write-only. On a read, value is unknown. | SysTick exception set-pending bit. | SysTick exception clear-pending bit. Write-only. On a read, value is unknown. | Bit-24 is reserved but must be kept zero; Bit-23 is read-as-zero when the processor is not in Debug. | Interrupt Service Routine Pending flag, excluding NMI and Faults. | Reserved but must be kept zero. | Pending vector. Indicates an exception number of the highest priority level pending enabled exception. | Return to base level. Indicates whethere there are preempted active exceptions. | ... | Active vector. Contains the active exception number. |
0xE000 ED00)| Bits 31, 30 | Bits 29 ~ 9 | Bits 8 ~ 0 |
|---|---|---|
| Reserved. | TBLOFF[29:9] (rw) | Reserved. |
| Must be kept cleared. | Vector Table Base Offset. It contains bits [29:9] of the offset of the table base from memory address 0x00000000. |
Must be kept cleared. |
0xE000 ED00)0xFA05 0000| Bits 31 ~ 16 | Bit 15 | Bits 14 ~ 11 | Bits 10, 9, 8 | Bits 7 ~ 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|---|---|---|
| VECTKEYSTAT[15:0] (read) / VECTKEY[15:0] (write) | ENDIANESS (r) | Reserved. | PRIGROUP[2:0] (rw) | Reserved. | SYS RESET REQ (w) |
VECT CLR ACTIVE (w) |
VECT RESET (w) |
| Register Key. Reads as 0xFA05 On writes, write 0x05FA to it, otherwise the write is ignored. |
Data Endianess Bit. Reads as zero, indicating little-endian. |
Must be kept cleared. | Interrupt Priority Grouping Field. This field determines how NVIC priority bits are split between group priority and subpriority.. |
Must be kept cleared. | System Reset Request. Writing 1 requests a system-level reset (it causes the entire device to be reset — just like a hardware reset). |
Reserved for debug use. This bit reads as zero. When writing to the register you must write 0 to this bit, otherwise behavior is unpredictable. |
Reserved for debug use. This bit reads as zero. When writing to the register you must write 0 to this bit, otherwise behavior is unpredictable. |
0xE000 ED00)| Bits 31 ~ 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|---|
| Reserved. | SEVON PEDN (rw) |
Reserved. | SLEEP DEEP (rw) |
SLEEP ON EXIT (rw) |
Reserved. |
| Kept cleared. | Send Event on Pending bit. | Kept cleared. | Controls whether the processor uses sleep (0) or deep sleep (1) as its low power mode. | Configures sleep-on-exit when returning from Handler mode to Thread mode. 0: Do not sleep when returning to Thread mode. 1: Enter sleep, or deep sleep, on return from an interrupt service routine. |
Kept cleared. |
0xE000 ED00)| Bits 31 ~ 10 | Bit 9 | Bit 8 | Bits 7 ~ 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|---|---|---|---|
| Reserved. | STK ALIGN (rw) |
BFHF NMIGN (rw) |
Reserved. | DIV_0_TRP (rw) | UNALIGN_TRP (rw) | Reserved. | USER SET MPEND (rw) |
NON BASE THRD ENA (rw) |
| Kept cleared. | Configures stack alignment on exception entry. | Enables (1) or disables (0) handlers with priority -1 or -2 to ignore data bus faults caused by load and store instructions. | Kept cleared. | 0 : Do not trap divide by zero. 1: Trap divide by zero. When this bit is set to 0, a divide by zero returns a quotient of 0. |
0: Do not trap unaligned halfword and word accesses. 1: Trap unaligned halfword and word accesses with a usage fault. NOTE:Unaligned LDM, STM, LDRD, and STRD instructions always fault irrespective of whether it is set to 1. |
Kept cleared. | Enables (1) or disables (0) unprivileged software access to the NVIC_STIR. | 0: Processor can enter Thread mode only when no exception is active. 1: Processor can enter Thread mode from any level under the control of an EXC_RETURN value. |
0xE000 ED00)| Bits 31 ~ 24 | Bits 23 ~ 16 | Bits 15 ~ 8 | Bits 7 ~ 0 |
|---|---|---|---|
| Reserved. | PRI_6[7:0] | PRI_5[7:0] | PRI_4[7:0] |
| Kept cleared. | Priority of system handler 6, usage fault. | Priority of system handler 5, bus fault. | Priority of system handler 4, memory management fault. |
0xE000 ED00)| Bits 31 ~ 24 | Bits 23 ~ 0 |
|---|---|
| Reserved. | PRI_11[7:0] |
| Kept cleared. | Priority of system handler 11, SVCall. |
0xE000 ED00)| Bits 31 ~ 24 | Bits 23 ~ 16 | Bits 15 ~ 0 |
|---|---|---|
| PRI_15[7:0] | PRI_14[7:0] | Reserved. |
| Priority of system handler 15, SysTick exception. | Priority of system handler 14, PendSV. | Kept cleared. |
0xE000 ED00)| Bits 31 ~ 19 | Bit 18 | Bit 17 | Bit 16 | Bit 15 | Bit 14 | Bit 13 | Bit 12 | Bit 11 | Bit 10 | Bit 9 | Bit 8 | Bit 7 | Bits 6 ~ 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Reserved. | USG FAULT ENA (rw) |
BUS FAULT ENA (rw) |
MEM FAULT ENA (rw) |
SV CALL PEND ED (rw) |
BUS FAULT PEND ED (rw) |
MEM FAULT PEND ED (rw) |
USG FAULT PEND ED (rw) |
SYS TICK ACT (rw) |
PEND SV ACT (rw) |
Reserved. | MONIT OR ACT (rw) |
SV CALL ACT (rw) |
Reserved. | USG FAULT ACT (rw) |
Reserved. | BUS FAULT ACT (rw) |
MEM FAULT ACT (rw) |
| Kept cleared. | Usage fault enable bit. | Bus fault enable bit. | Memory management fault enable bit. | SVC call pending bit. | Bus fault exception pending bit. | Memory management fault exception pending bit. | Usage fault exception pending bit. | SysTick exception active bit. | PendSV exception active bit. | Kept cleared. | Debug monitor active bit. | SVC call active bit. | Kept cleared. | Usage fault exception active bit. | Kept cleared. | Bus fault exception active bit. | Memory management fault exception active bit. |
0xE000 ED00)0xE000 ED280xE000 ED280xE000 ED280xE000 ED290xE000 ED2A| Bits 31 ~ 16 | Bits 15 ~ 8 | Bits 7 ~ 0 |
|---|---|---|
| UFSR | BFSR | MMFSR |
| Bits 31 ~ 26 | Bit 25 | Bit 24 | Bits 23 ~ 20 | Bit 19 | Bit 18 | Bit 17 | Bit 16 | Bit 15 | Bit 14 | Bit 13 | Bit 12 | Bit 11 | Bit 10 | Bit 9 | Bit 8 | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Reserved. | DIVBY ZERO (rc_w1) |
UNALIGNED (rc_w1) |
Reserved. | NOCP (rc_w1) |
INVPC (rc_w1) |
INV STATE (rc_w1) |
UNDEF INSTR (rc_w1) |
BFAR VALID (rw) |
Reserved. | LSP ERR (rw) |
STK ERR (rw) |
UNSTK ERR (rw) |
IMPRECIS ERR (rw) |
PRECIS ERR (rw) |
IBUS ERR (rw) |
MMAR VALID (rw) |
Reserved. | MLSP ERR (rw) |
MSTK ERR (rw) |
MUNSTK ERR (rw) |
Reserved. | DACC VIOL (rw) |
IACC VIOL (rw) |
| Kept cleared. | Divide by zero usage fault. 0: No divide by zero fault, or divide by zero trapping not enabled. 1: The processor has executed an SDIV or UDIV instruction with a divisor of 0. |
Unaligned access usage fault. (Unaligned LDM, STM, LDRD, and STRD instructions always fault irrespective of the setting of UNALIGN_TRP.) 0: No unaligned access fault, or unaligned access trapping not enabled. 1: the processor has made an unaligned memory access. |
Kept cleared. | No coprocessor usage fault. 0: No usage fault caused by attempting to access a coprocessor. 1: the processor has attempted to access a coprocessor. |
Invalid PC load usage fault, caused by an invalid PC load by EXC_RETURN. 0: No invalid PC load usage fault. 1: The processor has attempted an illegal load of EXC_RETURN to the PC, as a result of an invalid context, or an invalid EXC_RETURN value. |
Invalid state usage fault. 0: No invalid state usage fault. 1: The processor has attempted to execute an instruction that makes illegal use of the EPSR. |
Undefined instruction usage fault. 0: No undefined instruction usage fault. 1: The processor has attempted to execute an undefined instruction. |
Bus Fault Address Register (BFAR) valid flag. | Kept cleared. | Bus fault on floating-point lazy state preservation. 0: No bus fault occurred during floating-point lazy state preservation. 1: A bus fault occurred during floating-point lazy state preservation. |
Bus fault on stacking for exception entry. 0: No stacking fault. 1: Stacking for an exception entry has caused one or more bus faults. |
Bus fault on unstacking for a return from exception. 0: No unstacking fault. 1: Unstack for an exception return has caused one or more bus faults. |
Imprecise data bus error. 0: No imprecise data bus error. 1: A data bus error has occurred, but the return address in the stack frame is not related to the instruction that caused the error. |
Precise data bus error. 0: No precise data bus error. 1: A data bus error has occurred, and the PC value stacked for the exception return points to the instruction that caused the fault. |
Instruction bus error. 0: No instruction bus error. 1: Instruction bus error. |
Memory Management Fault Address Register (MMAR) valid flag. 0: Value in MMAR is not a valid fault address. 1: MMAR holds a valid fault address. |
Kept cleared. | 0: No MemManage fault occurred during floating-point lazy state preservation. 1: A MemManage fault occurred during floating-point lazy state preservation. |
Memory manager fault on stacking for exception entry. 0: No stacking fault. 1: Stacking for an exception entry has caused one or more access violations. |
Memory manager fault on unstacking for a return from exception. 0: No unstacking fault. 1: Unstack for an exception return has caused one or more access violations. |
Kept cleared. | Data access violation flag. 0: No data access violation fault. 1: The processor attempted a load or store at a location that does not permit the operation. |
Instruction access violation flag. 0: No instruction access violation fault. 1: The processor attempted an instruction fetch from a location that does not permit execution. |
0xE000 ED00)| Bit 31 | Bit 30 | Bits 29 ~ 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|
| DEBUG_VT (rc_w1) |
FORCED (rc_w1) |
Reserved. | VECTTBL (rc_w1) |
Reserved. |
| Reserved for Debug use. When writing to the register you must write 0 to this bit, otherwise behavior is unpredictable. |
Forced hard fault. 0: No forced hard fault. 1: Forced hard fault. |
Kept cleared. | Vector table hard fault. 0: No bus fault on vector table read. 1: Bus fault on vector table read. |
Kept cleared. |
0xE000 ED00)0xE000 ED00)0xE000 ED00)| Address | Name | Type | Required Privilege | Value on Reset |
|---|---|---|---|---|
0xE000 E010 |
STK_CTRL (goto) | RW | Privileged | 0x00000000 |
0xE000 E014 |
STK_LOAD (goto) | RW | Privileged | Unknown |
0xE000 E018 |
STK_VAL (goto) | RW | Privileged | Unknown |
0xE000 E01C |
STK_CALIB (goto) | RO | Privileged | 0xC0000000 |
0xE000 ED10)| Bits 31 ~ 17 | Bit 16 | Bits 15 ~ 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|---|---|
| Reserved. | COUNTFLAG (rw) |
Reserved. | CLKSOURCE (rw) |
TICKINT (rw) |
ENABLE (rw) |
| Kept cleared. | Returns 1 if timer counted to 0 since last time this was read. | Kept cleared. | Selects the clock source. 0: AHB/8 1: Processor clock (AHB) |
SysTick exception request enable. 0: Counting down to zero does not assert the SysTick exception request. 1: Counting down to zero to asserts the SysTick exception request. |
Counter enable (1) or disable (1) |
0xE000 ED10)| Bits 31 ~ 24 | Bits 23 ~ 0 |
|---|---|
| Reserved. | RELOAD[23:0] (rw) |
| Kept cleared. | RELOAD value. |
0xE000 ED10)| Bits 31 ~ 24 | Bits 23 ~ 0 |
|---|---|
| Reserved. | CURRENT[23:0] (rw) |
| Kept cleared. | Current Counter Value. A write of any value clears the field to 0, and also clears the COUNTFLAG bit in the STK_CTRL register to 0. |
0xE000 ED10)| Bit 31 | Bit 30 | Bits 29 ~ 24 | Bits 23 ~ 0 |
|---|---|---|---|
| NOREF (r) |
SKEW (r) |
Reserved. | TENMS[23:0] (r) |
| NOREF flag.
Indicates whether a reference clock (external to the processor) is provided. 0: A reference clock (external or internal) is available — TENMS field is valid. 1: No reference clock is provided; TENMS is not valid. |
SKEW flag. Indicates whether the 10 ms reference value in TENMS is exact (0) or only approximate (1). | Kept cleared. | Calibration value. Contains the number of SysTick clock cycles required to generate exactly 10 ms of time at the reference clock frequency. |
0xFFFF FFFF0x0100 FFFF| Bit 31 | Bit 30 | Bit 29 | Bit 28 | Bit 27 | Bits 26, 25 | Bit 24 | Bits 23 ~ 20 | Bits 19 ~ 16 | Bits 15 ~ 10 | Bit 9 | Bits 8 ~ 0 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| N | Z | C | V | Q | ICI/IT | T | Reserved. | GE[3:0] | ICI/IT | Reserved. | ISR_NUMBER |
| 0: Operation result was positive, zero, greater than, or equal. 1: Operation result was negative or less than. |
0: Operation result was not zero. 1: Operation result was zero. |
0: Add operation did not result in a carry bit or subtract operation resulted in a borrow bit. 1: Add operation resulted in a carry bit or subtract operation did not result in a borrow bit. |
0: Operation did not result in an overflow. 1: Operation resulted in an overflow. |
Saturation or Sticky Overflow flag. Could be cleared to zero by software using an MSR instruction. |
ICI: Interruptible-continuable instruction bits. IT: Indicates the execution state bits of the If-Then instruction. |
Thumb State Bit. | ... | Greater than or Equal flags | See before | ... | This is the number of the current exception. |
| Bit 31 | Bit 30 | Bit 29 | Bit 28 | Bit 27 | Bits 26 ~ 20 | Bits 19 ~ 16 | Bits 15 ~ 0 |
|---|---|---|---|---|---|---|---|
| N | Z | C | V | Q | Reserved. | GE[3:0] | Reserved. |
| Bits 31 ~ 9 | Bits 8 ~ 0 |
|---|---|
| Reserved. | ISR_NUMBER |
| Bits 31 ~ 27 | Bits 26, 25 | Bit 24 | Bits 23 ~ 16 | Bits 15 ~ 10 | Bits 9 ~ 0 |
|---|---|---|---|---|---|
| Reserved. | ICI/IT | T | Reserved. | ICI/IT | Reserved. |
MRS <R0 ~ R12>, PSRMSR APSR_nzcvq, <R0 ~ R12>
LDM STM,
PUSH,
POP,
VLDM,
VSTM,
VPUSH,
or
VPOP
instruction, the processor:| Bits 31 ~ 1 | Bit 0 |
|---|---|
| Reserved. | PRIMASK |
| ... | 0: No effect. 1: Prevents the activation of all exceptions with configurable priority. |
| Bits 31 ~ 1 | Bit 0 |
|---|---|
| Reserved. | FAULTMASK |
| ... | 0: No effect. 1: Prevents the activation of all exceptions except for NMI. |
| Bits 31 ~ 8 | Bits 7 ~ 4 | Bits 3 ~ 0 |
|---|---|---|
| Reserved. | BASEPRI[7:4] | Reserved. |
| ... | 0x00: No effect. Non-Zero: The processor does not process any exception with a priority value greater than or equal to BASEPRI. |
... |
| Bits 31 ~ 3 | Bit 2 | Bit 1 | Bit 0 |
|---|---|---|---|
| Reserved. | FPCA | SPSEL | nPRIV |
| ... | 0: No floating-point context active. 1: Floating-point context active. The Cortex-M4 uses this bit to determine whether to preserve floating-point state when processing an exception. |
0: MSP is the current stack pointer. 1: PSP is the current stack pointer. In Handler mode this bit reads as zero and ignores writes. The Cortex-M4 updates this bit automatically on exception return. |
Thread mode privilege level. 0: Privileged. 1: Unprivileged. |
0x00000000 ~ 0x1FFFFFFF |
0x20000000 ~ 0x3FFFFFFF |
0x40000000 ~ 0x5FFFFFFF |
0x60000000 ~ 0x9FFFFFFF |
0xA0000000 ~ 0xDFFFFFFF |
0xE0000000 ~ 0xE00FFFFF |
0xE0100000 ~ 0xFFFFFFFF |
|---|---|---|---|---|---|---|
| Code (0.5 GB) |
SRAM (0.5 GB) |
Peripheral (0.5 GB) (XN) |
External RAM (1.0 GB) |
External Device (1.0 GB) (XN) |
Private Peripheral Bus (1.0 MB) (XN) |
Vendor-Specific Memory (511 MB) (XN) |
0x20000000 ~ 0x200FFFFF |
0x22000000 ~ 0x23FFFFFF |
|---|---|
| Bit Band Region (1MB) |
Bit Band Alias (32MB) |
0x40000000 ~ 0x400FFFFF |
0x42000000 ~ 0x43FFFFFF |
|---|---|
| Bit Band Region (1MB) |
Bit Band Alias (32MB) |
bit_word_offset = (byte_offset x 32) + (bit_number x 4)
bit_word_addr = bit_band_base + bit_word_offset0x23FFFFED = 0x22000000 + (0xFFFFF x 32) + (0 x 4).| Exception number | IRQ number | Exception type | Priority | Vector address or offset | Activation |
|---|---|---|---|---|---|
| 1 | - | Reset | -3, the highest | 0x0000 0004 | Asynchronous |
| 2 | -14 | NMI | -2 | 0x0000 0008 | Asynchronous |
| 3 | -13 | Hard fault | -1 | 0x0000 000C | - |
| 4 | -12 | Memory management fault | Configurable | 0x0000 0010 | Synchronous |
| 5 | -11 | Bus fault | Configurable | 0x0000 0014 | Synchronous when precise. Asynchronous when imprecise. |
| 6 | -10 | Usage fault | Configurable | 0x0000 0018 | Synchronous |
| 7 ~ 10 | - | - | - | Reserved | - |
| 11 | -5 | SVCall | Configurable | 0x0000 002C | Synchronous |
| 12, 13 | - | - | - | Reserved | - |
| 14 | -2 | PendSV | Configurable | 0x0000 0038 | Asynchronous |
| 15 | -1 | SysTick | Configurable | 0x0000 003C | Asynchronous |
| 16 and above | 0 and above | Interrupt (IRQ) | Configurable | 0x0000 0040 and above | Asynchronous |
| Exception number | IRQ number | Offset | Vector |
|---|---|---|---|
| - | - | 0x0000 |
Initial SP value |
| 1 | - | 0x0004 |
Reset |
| 2 | - | 0x0008 |
NMI |
| 3 | - | 0x000C |
Hard fault |
| 4 | - | 0x0010 |
Memory management fault |
| 5 | - | 0x0014 |
Bus fault |
| 6 | - | 0x0018 |
Usage fault |
| 7 ~ 10 | - | - |
Reserved. |
| 11 | - | 0x002C |
SVCall |
| 12 | - | - |
Reserved for Debug |
| 13 | - | - |
Reserved. |
| 14 | - | 0x0038 |
PendSV |
| 15 | - | 0x003C |
Systick |
| 16 | 0 | 0x0040 |
IRQ0 |
| 17 | 1 | 0x0044 |
IRQ1 |
| 18 | 2 | 0x0048 |
IRQ2 |
| . | . | . |
. |
| n | n - 16 | 0x0040 + 4 x (n - 16) |
IRQn |
| . | . | . |
. |
| 255 | 239 | 0x03FC |
IRQ239 |
0x00000080 to 0x3FFFFF80.| Stack Order (from SP) | Register |
|---|---|
| SP + 0x20 | {Aligner} |
| SP + 0x1C | xPSR |
| SP + 0x18 | PC (R15) |
| SP + 0x14 | LR (R14) |
| SP + 0x10 | R12 |
| SP + 0x0C | R3 |
| SP + 0x08 | R2 |
| SP + 0x04 | R1 |
| SP + 0x00 | R0 |
| Stack Order (from SP) | Register |
|---|---|
| {Aligner} | |
| FPSCR | |
| S15 | |
| S14 | |
| S13 | |
| S12 | |
| S11 | |
| S10 | |
| S9 | |
| S8 | |
| S7 | |
| S6 | |
| S5 | |
| S4 | |
| S3 | |
| S2 | |
| S1 | |
| S0 | |
| SP + 0x1C | xPSR |
| SP + 0x18 | PC (R15) |
| SP + 0x14 | LR (R14) |
| SP + 0x10 | R12 |
| SP + 0x0C | R3 |
| SP + 0x08 | R2 |
| SP + 0x04 | R1 |
| SP + 0x00 | R0 |
| EXC_RETURN[31:0] | Description |
|---|---|
| 0xFFFF FFF1 | Return to Handler mode. Exception return uses non-floating-point state from the MSP and execution uses MSP after return. |
| 0xFFFF FFF9 | Return to Thread mode. Exception return uses non-floating-point state from MSP and execution uses MSP after return. |
| 0xFFFF FFFD | Return to Thread mode. Exception return uses non-floating-point state from the PSP and execution uses PSP after return. |
| 0xFFFF FFE1 | Return to Handler mode. Exception return uses floating-point-state from MSP and execution uses MSP after return. |
| 0xFFFF FFE9 | Return to Thread mode. Exception return uses floating-point state from MSP and execution uses MSP after return. |
| 0xFFFF FFED | Return to Thread mode. Exception return uses floating-point state from PSP and execution uses PSP after return. |
| Fault | Handler | Bit Name | Fault Status Register |
|---|---|---|---|
| Bus error on a vector read. | Hard fault | VECTTBL | HFSR |
| Fault escalated to a hard fault. | Hard fault | FORCED | HFSR |
| MPU or default memory map mismatch on instructions access | MemManage | IACCVIOL | MMFAR |
| MPU or default memory map mismatch on data access | MemManage | DACCVIOL | MMFAR |
| MPU or default memory map mismatch during exception stacking | MemManage | MSTKERR | MMFAR |
| MPU or default memory map mismatch during exception unstacking | MemManage | MUNSTKERR | MMFAR |
| MPU or default memory map mismatch during lazy FP state preservation | MemManage | MLSPERR | MMFAR |
| Bus error during exception stacking | Bus fault | STKERR | BFAR |
| Bus error during exception unstacking | Bus fault | UNSTKERR | BFAR |
| Bus error during instruction prefetch | Bus fault | IBUSERR | BFAR |
| Bus error during lazy FU state preservation | Bus fault | LSPERR | BFAR |
| Precise data bus error | Bus fault | PRECISERR | BFAR |
| Imprecise data bus error | Bus fault | IMPRECISERR | BFAR |
| Attempt to access a coprocessor | Usage fault | NOCP | CFSR |
| Undefined instruction | Usage fault | UNDEFINSTR | CFSR |
| Attempt to enter an invalid instruction set state | Usage fault | INVSTATE | CFSR |
| Invalid EXC_RETURN value | Usage fault | INVPC | CFSR |
| Illegal unaligned load or store | Usage fault | UNALIGNED | CFSR |
| Divide by 0 | Usage fault | DIVBYZERO | CFSR |
| Mnemonic | Description | Flags |
|---|---|---|
ADD{S}{cond} Rd, Rn, Op2 |
N, Z, C, V | |
ADC{S}{cond} Rd, Rn, Op2 |
N, Z, C, V | |
ADR Rd, label |
-- | |
AND{S}{cond} Rd, Rn, Op2 |
N, Z, C | |
ASR{S}{cond} Rd, Rm, <Rs|#n> |
N, Z, C | |
|
||
|
||
|
| Suffix | Flags | Description |
|---|---|---|
| EQ | Z = 1 | EQual |
| NE | Z = 0 | Not Equal |
| CS or HS | C = 1 | Higher or Same. Unsigned ≥ |
| CC or LO | C = 0 | LOwer. Unsigned < |
| MI | N = 1 | MInus (negative) |
| PL | N = 0 | PLus (positive or zero) |
| VS | V = 1 | OVerflow Set |
| VC | V = 0 | OVerflow Cleared |
| HI | C = 1 and Z = 0 | HIgher. Unsigned > |
| LS | C = 0 or Z = 1 | Lower or Same. Unsigned ≤ |
| GE | N = V | Greater or Equal. Signed ≥ |
| LT | N != V | Less Than. Signed < |
| GT | Z = 0 and N = V | Greater Than. Signed > |
| LE | Z = 1 or N != V | Less or Equal. Signed ≤ |
| AL | - | ALways. This is the default when no suffix is sepcified. |
CMP R0, #10 ; Compare R0 with 10, sets flags
BGE greater_eq ; Branch if R0 >= 10 (N == V)
ADDNE R1, R1, #1 ; Increment R1 if R0 != 10 (Z == 0)
op{S}{cond} {Rd, } Rn, Op2
op{cond} {Rd, } Rn, #imm12 ; ADD and SUB only