2.4. Cortex-M0+
ARM Documentation
Excerpted from the Cortex-M0+ Technical Reference Manual . Used with permission.
The ARM Cortex-M0+ processor is a very low gate count, highly energy efficient processor that is intended for microcontroller and deeply embedded applications that require an area optimized, low-power processor.
2.4.1. Features
The ARM Cortex-M0+ processor features and benefits are:
- • Tight integration of system peripherals reduces area and development costs.
- • Thumb instruction set combines high code density with 32-bit performance.
- • Support for single-cycle I/O access.
- • Power control optimization of system components.
- • Integrated sleep modes for low-power consumption.
- • Fast code execution enables running the processor with a slower clock or increasing sleep mode time.
- • Optimized code fetching for reduced flash and ROM power consumption.
- • Hardware multiplier.
- • Deterministic, high-performance interrupt handling for time-critical applications.
- • Deterministic instruction cycle timing.
- • Support for system level debug authentication.
- • Serial Wire Debug reduces the number of pins required for debugging.
2.4.1.1. Interfaces
The interfaces included in the processor for external access include:
- • External AHB-Lite interface to busfabric
- • Debug Access Port (DAP)
- • Single-cycle I/O Port to SIO peripherals
2.4.1.2. Configuration
Each processor is configured with the following features:
- • Architectural clock gating (for power saving)
- • Little Endian bus access
- • Four Breakpoints
- • Debug support (via 2-wire debug pins SWD/SWCLK )
- • 32-bit instruction fetch (to match 32-bit data bus)
- • IOPORT (for low latency access to local peripherals (see SIO ))
- • 26 interrupts
- • 8 MPU regions
- • All registers reset on powerup
- • Fast multiplier (MULS 32×32 single cycle)
- • SysTick timer
- • Vector Table Offset Register ( VTOR )
- • 34 WIC (Wake-up Interrupt Controller) lines (32 IRQ and NMI, RXEV)
- • DAP feature: Halt event support
- • DAP feature: SerialWire debug interface (protocol 2 with multidrop support)
- • DAP feature: Micro Trace Buffer (MTB) is not implemented
Architectural clock gating allows the processor core to support SLEEP and DEEPSLEEP power states by disabling the clock to parts of the processor core. Note that power gating is not supported.
Each M0+ core has its own interrupt controller which can individually mask out interrupt sources as required. The same interrupts are routed to both M0+ cores.
2.4.1.3. ARM architecture
The processor implements the ARMv6-M architecture profile. See the ARMv6-M Architecture Reference Manual , and for
further details refer to the ARM Cortex M0+ Technical Reference Manual .
2.4.2. Functional Description
2.4.2.1. Overview
The Cortex-M0+ processor is a configurable, multistage, 32-bit RISC processor. It has an AMBA AHB-Lite interface and includes an NVIC component. It also has hardware debug, single-cycle I/O interfacing, and memory-protection functionality. The processor can execute Thumb code and is compatible with other Cortex-M profile processors.
Figure 11 shows the functional blocks of the processor and surrounding blocks.
Figure 11. Cortex M0+ Functional block diagram

2.4.2.2. Features
The M0+ features:
- • The ARMv6-M Thumb® instruction set.
- • Thumb-2 technology.
- • An ARMv6-M compliant 24-bit SysTick timer.
- • A 32-bit hardware multiplier. This is the standard single-cycle multiplier
- • The ability to have deterministic, fixed-latency, interrupt handling.
- • Load/store multiple instructions that can be abandoned and restarted to facilitate rapid interrupt handling.
- • C Application Binary Interface compliant exception model. This is the ARMv6-M, C Application Binary Interface (C-ABI) compliant exception model that enables the use of pure C functions as interrupt handlers.
- • Low power sleep-mode entry using Wait For Interrupt (WFI), Wait For Event (WFE) instructions, or the return from interrupt sleep-on-exit feature.
2.4.2.3. NVIC features
The Nested Vectored Interrupt Controller (NVIC) features are:
- • 26 external interrupt inputs, each with four levels of priority.
- • Dedicated Non-Maskable Interrupt (NMI) input (which can be driven from any standard interrupt source)
- • Support for both level-sensitive and pulse-sensitive interrupt lines.
- • Wake-up Interrupt Controller (WIC), providing ultra-low power sleep mode support.
- • Relocatable vector table.
The NVIC supports hardware nesting of exceptions, e.g. an interrupt handler may itself be interrupted if a higher-priority interrupt request arrives whilst the handler is running.
Further details available in Section 2.4.5 .
2.4.2.4. Debug features
Debug features are:
- • Four hardware breakpoints.
- • Two watchpoints.
- • Program Counter Sampling Register (PCSR) for non-intrusive code profiling.
- • Single step and vector catch capabilities.
- • Support for unlimited software breakpoints using BKPT instruction.
- • Non-intrusive access to core peripherals and zero-waitstate system slaves through a compact bus matrix. A debugger can access these devices, including memory, even when the processor is running.
- • Full access to core registers when the processor is halted.
- • CoreSight compliant debug access through a Debug Access Port (DAP) supporting Serial Wire debug connections.
2.4.2.4.1. Debug Access Port
The processor is implemented with a low gate count Debug Access Port (DAP). The low gate count Debug Access Port (DAP) provides a Serial Wire debug-port, and connects to the processor slave port to provide full system-level debug access. For more information on DAP, see the ADI v5.1 version of the ARM Debug Interface v5, Architecture Specification
2.4.2.5. MPU features
Memory Protection Unit (MPU) features are:
- • Eight user-configurable memory regions.
- • Eight sub-region disables per region.
- • Execute never (XN) support.
- • Default memory map support.
Further details available in Section 2.4.6 .
2.4.2.6. AHB-Lite interface
Transactions on the AHB-Lite interface are always marked as non-sequential. Processor accesses and debug accesses share the external interface to external AHB peripherals. The processor accesses take priority over debug accesses. Any vendor-specific components can populate this bus.
NOTEInstructions are only fetched using the AHB-Lite interface. To optimize performance, the Cortex-M0+ processor fetches ahead of the instruction it is executing. To minimize power consumption, the fetch ahead is limited to a maximum of 32 bits.
2.4.2.7. Single-cycle I/O port
The processor implements a single-cycle I/O port that provides high speed access to tightly-coupled peripherals, such as general-purpose-I/O (GPIO). The port is accessible both by loads and stores from either the processor or the debugger. You cannot execute code from the I/O port.
2.4.2.8. Power Management Unit
Each processor has its own Power Management Unit (PMU) which allows power saving by turning off clocks to parts of the processor core. There are no separate power domains on RP2040.
The PMU runs from the processor clock which is controlled from the chip level clocks block. The PMU can control the following clock domains within the processor:
- • A debug clock containing the processor debug resources and the rest of the DAP.
- • A system clock containing the NVIC.
- • A processor clock containing the core and associated interfaces
Control is limited to clock enable/disable. When enabled, all domains run at the same clock speed.
The PMU also interfaces with the WIC, to ensure that power-down and wake-up behaviours are transparent to software and work with clocking and sleeping requirements. This includes SLEEP or DEEPSLEEP support as controlled in SCR register.
2.4.2.8.1. Power Management
RP2040 ARM Cortex M0+ uses ARMv6-M which supports the use of Wait For Interrupt ( WFI ) and Wait For Event ( WFE ) instructions as part of system power management:
WFI provides a mechanism for hardware support of entry to one or more sleep states. Hardware can suspend execution until a wakeup event occurs.
WFE provides a mechanism for software to suspend program execution until a wakeup condition occurs with minimal or no impact on wakeup latency. Both WFI and WFE are hint instructions that might have no effect on program execution. Normally, they are used in software idle loops that resume program execution only after an interrupt or event of interest occurs.
NOTECode using WFE and WFI must handle any spurious wakeup events caused by a debug halt or other reasons.
Refer to the SDK and ARMv6-M guide for further information.
2.4.2.8.2. Wait For Event and Send Event
RP2040 can support software-based synchronization to system events using the Send-Event ( SEV ) and WFE hint instructions. Software can:
- • use the WFE instruction to indicate that it is able to suspend execution of a process or thread until an event occurs, permitting hardware to enter a low power state.
- • rely on a mechanism that is transparent to software and provides low latency wakeup.
The WFE mechanism relies on hardware and software working together to achieve energy saving. For example, stalling execution of a processor until a device or another processor has set a flag:
- • the hardware provides the mechanism to enter the WFE low-power state.
- • software enters a polling loop to determine when the flag is set:
- • the polling processor issues a WFE instruction as part of a polling loop if the flag is clear.
- • an event is generated (hardware interrupt or Send-Event instruction from another processor) when the flag is set.
WFE wake up events
The following events are WFE wake up events:
- • the execution of an SEV instruction on the other processor
- • any exception entering the pending state if SEVONPEND in the System Control Register is set to 1.
- • an asynchronous exception at a priority that preempts any currently active exceptions.
- • a debug event with debug enabled.
The Event Register
The Event Register is a single bit register. When set, an Event Register indicates that an event has occurred, since the register was last cleared, that might prevent the processor having to suspend operation on issuing a WFE instruction. The following conditions apply to the Event Register:
- • A reset clears the Event Register.
- • Any WFE wakeup event, or the execution of an exception return instruction, sets the Event Register.
- • A WFE instruction clears the Event Register.
- • Software cannot read or write the value of the Event Register directly.
The Send-Event instruction
The Send-Event ( SEV ) instruction causes an event to be signalled to the other processor. The Send-Event instruction generates a wakeup event.
The Wait For Event instruction
The action of the WFE instruction depends on the state of the Event Register:
- • If the Event Register is set, the instruction clears the register and returns immediately.
- • If the Event Register is clear the processor can suspend execution and enter a low-power state. It can remain in that state until the processor detects a WFE wakeup event or a reset. When the processor detects a WFE wakeup event, the WFE instruction completes.
WFE wakeup events can occur before a WFE instruction is issued. Software using the WFE mechanism must tolerate spurious wake up events, including multiple wakeups.
2.4.2.8.3. Wait For Interrupt
RP2040 supports Wait For Interrupt through the hint instruction, WFI .
When a processor issues a WFI instruction it can suspend execution and enter a low-power state. It can remain in that state until the processor detects one of the following WFI wake up events:
- • A reset.
- • An asynchronous exception at a priority that, if PRIMASK.PM was set to 0, would preempt any currently active exceptions.
If
PRIMASK.PM is set to 1, an asynchronous exception that has a higher group priority than any active exception results in a
WFI instruction exit. If the group priority of the exception is less than or equal to the execution group priority, the exception is ignored.
- • If debug is enabled, a debug event.
- • A
WFIwakeup event.
The
WFI instruction completes when the hardware detects a WFI wake up event.
The processor recognizes WFI wake up events only after issuing the
WFI instruction.
2.4.2.8.4. Wakeup Interrupt Controller
The Wakeup Interrupt Controller (WIC) is used to wake the processor from a DEEPSLEEP state as controlled by the
SCR register. In a DEEPSLEEP state clocks to the processor core and NVIC are not running. It can take a few cycles to wake from a DEEPSLEEP state.
The WIC takes inputs from the receive event signal (from the other processor), 32 interrupts lines, and NMI.
For more power saving, RP2040 supports system level power saving modes as defined in Section 2.11 which also includes code examples.
2.4.2.9. Reset Control
The Cortex M0+ Reset Control block controls the following resets:
- • Debug reset
- • M0+ core reset
- • PMU reset
After power up, both processors are released from reset (see details in Section 2.13.2 ). This releases reset to Debug, M0+ core and PMU.
Once running, resets can be triggered from the Debugger, NVIC (using
AIRCR.SYSRESETREQ), or the RP2040 Power On State Machine controller (see details in
Section 2.13
). The NVIC only resets the Cortex-M0+ processor core (not the Debug or PMU), whereas the Power On State Machine controller can reset the processor subsystem which asserts all resets in the subsystem (Debug, M0+ core, PMU).
2.4.3. Programmer's model
2.4.3.1. About the programmer's model
The ARMv6-M Architecture Reference Manual provides a complete description of the programmer's model. This chapter gives an overview of the Cortex-M0+ programmer's model that describes the implementation-defined options. It also contains the ARMv6-M Thumb instructions it uses and their cycle counts for the processor. Additional details are in following chapters
- • Section 2.4.4 summarizes the system control features of the programmer's model.
- • Section 2.4.5 summarizes the NVIC features of the programmer's model.
- • Section 2.3.4 summarizes the Debug features of the programmer's model.
2.4.3.2. Modes of operation and execution
See the ARMv6-M Architecture Reference Manual for information about the modes of operation and execution.
2.4.3.3. Instruction set summary
The processor implements the ARMv6-M Thumb instruction set, including a number of 32-bit instructions that use Thumb-2 technology. The ARMv6-M instruction set comprises:
- • All of the 16-bit Thumb instructions from ARMv7-M excluding CBZ, CBNZ and IT.
- • The 32-bit Thumb instructions BL, DMB, DSB, ISB, MRS and MSR.
Table 81 shows the Cortex-M0+ instructions and their cycle counts. The cycle counts are based on a system with zero wait-states.
Table 81. Cortex-M0+ instruction summary
| Operation | Description | Assembler | Cycles |
|---|---|---|---|
| Move | 8-bit immediate | MOVS Rd, #<imm> | 1 |
| Lo to Lo | MOVS Rd, Rm | 1 | |
| Any to Any | MOV Rd, Rm | 1 | |
| Any to PC | MOV PC, Rm | 2 | |
| Add | 3-bit immediate | ADDS Rd, Rn, #<imm> | 1 |
| All registers Lo | ADDS Rd, Rn, Rm | 1 | |
| Any to Any | ADD Rd, Rd, Rm | 1 | |
| Any to PC | ADD PC, PC, Rm | 2 | |
| 8-bit immediate | ADDS Rd, Rd, #<imm> | 1 | |
| With carry | ADCS Rd, Rd, Rm | 1 | |
| Immediate to SP | ADD SP, SP, #<imm> | 1 | |
| Form address from SP | ADD Rd, SP, #<imm> | 1 | |
| Form address from PC | ADR Rd, <label> | 1 | |
| Subtract | SUBS Rd, Rn, Rm | 1 | |
| 3-bit immediate | SUBS Rd, Rn, #<imm> | 1 | |
| 8-bit immediate | SUBS Rd, Rd, #<imm> | 1 | |
| Subtract | With carry | SBCS Rd, Rd, Rm | 1 |
| Immediate from SP | SUB SP, SP, #<imm> | 1 | |
| Negate | RSBS Rd, Rn, #0 | 1 | |
| Multiply | MULS Rd, Rm, Rd | 1 | |
| Compare | CMP Rn, Rm | 1 | |
| Negative | CMN Rn, Rm | 1 | |
| Logical | Immediate | CMP Rn, #<imm> | 1 |
| AND | ANDS Rd, Rd, Rm | 1 | |
| Exclusive OR | EORS Rd, Rd, Rm | 1 | |
| OR | ORRS Rd, Rd, Rm | 1 |
| Operation | Description | Assembler | Cycles |
|---|---|---|---|
| Bit clear | BICS Rd, Rd, Rm | 1 | |
| Move NOT | MVNS Rd, Rm | 1 | |
| AND test | TST Rn, Rm | 1 | |
| Shift | Logical shift left by immediate | LSLS Rd, Rm, #<shift> | 1 |
| Logical shift left by register | LSLS Rd, Rd, Rs | 1 | |
| Logical shift right by immediate | LSRS Rd, Rm, #<shift> | 1 | |
| Logical shift right by register | LSRS Rd, Rd, Rs | 1 | |
| Arithmetic shift right | ASRS Rd, Rm, #<shift> | 1 | |
| Arithmetic shift right by register | ASRS Rd, Rd, Rs | 1 | |
| Rotate | Rotate right by register | RORS Rd, Rd, Rs | 1 |
| Load | Word, immediate offset | LDR Rd, [Rn, #<imm>] | 2 or 1 a |
| Halfword, immediate offset | LDRH Rd, [Rn, #<imm>] | 2 or 1 a | |
| Byte, immediate offset | LDRB Rd, [Rn, #<imm>] | 2 or 1 a | |
| Word, register offset | LDR Rd, [Rn, Rm] | 2 or 1 a | |
| Halfword, register offset | LDRH Rd, [Rn, Rm] | 2 or 1 a | |
| Signed halfword, register offset | LDRSH Rd, [Rn, Rm] | 2 or 1 a | |
| Byte, register offset | LDRB Rd, [Rn, Rm] | 2 or 1 a | |
| Signed byte, register offset | LDRSB Rd, [Rn, Rm] | 2 or 1 a | |
| PC-relative | LDR Rd, <label> | 2 or 1 a | |
| SP-relative | LDR Rd, [SP, #<imm>] | 2 or 1 a | |
| Multiple, excluding base | LDM Rn!, {<loreglist>} | 1+N b | |
| Multiple, including base | LDM Rn, {<loreglist>} | 1+N b | |
| Store | Word, immediate offset | STR Rd, [Rn, #<imm>] | 2 or 1 a |
| Halfword, immediate offset | STRH Rd, [Rn, #<imm>] | 2 or 1 a | |
| Byte, immediate offset | STRB Rd, [Rn, #<imm>] | 2 or 1 a | |
| Word, register offset | STR Rd, [Rn, Rm] | 2 or 1 a | |
| Halfword, register offset | STRH Rd, [Rn, Rm] | 2 or 1 a | |
| Byte, register offset | STRB Rd, [Rn, Rm] | 2 or 1 a | |
| SP-relative | STR Rd, [SP, #<imm>] | 2 or 1 a | |
| Multiple | STM Rn!, {<loreglist>} | 1+N b | |
| Push | Push | PUSH {<loreglist>} | 1+N b |
| Push with link register | PUSH {<loreglist>, LR} | 1+N c | |
| Pop | Pop | POP {<loreglist>} | 1+N b |
| Pop and return | POP {<loreglist>, PC} | 3+N c | |
| Branch | Conditional | B<cc> <label> | 1 or 2 d |
| Unconditional | B <label> | 2 |
| Operation | Description | Assembler | Cycles |
|---|---|---|---|
| With link | BL <label> | 3 | |
| With exchange | BX Rm | 2 | |
| With link and exchange | BLX Rm | 2 | |
| Extend | Signed halfword to word | SXTH Rd, Rm | 1 |
| Signed byte to word | SXTB Rd, Rm | 1 | |
| Unsigned halfword | UXTH Rd, Rm | 1 | |
| Unsigned byte | UXTB Rd, Rm | 1 | |
| Reverse | Bytes in word | REV Rd, Rm | 1 |
| Bytes in both halfwords | REV16 Rd, Rm | 1 | |
| Signed bottom half word | REVSH Rd, Rm | 1 | |
| State | change Supervisor Call | SVC #<imm> | - e |
| Disable interrupts | CPSID i | 1 | |
| Enable interrupts | CPSIE i | 1 | |
| Read special register | MRS Rd, <specreg> | 3 | |
| Write special register | MSR <specreg>, Rn | 3 | |
| Breakpoint | BKPT #<imm> | - e | |
| Hint | Send-Event | SEV | 1 |
| Wait For Event | WFE | 2 f | |
| Wait For Interrupt | WFI | 2 f | |
| Yield | YIELD | 1 f | |
| No operation | NOP | 1 | |
| Barriers | Instruction synchronization | ISB | 3 |
| Data memory | DMB | 3 | |
| Data synchronization | DSB | 3 |
Table Notes
- a 2 if to AHB interface or SCS, 1 if to single-cycle I/O port.
- b N is the number of elements in the list.
- c N is the number of elements in the list including PC or LR.
- d 2 if taken, 1 if not-taken.
- e Cycle count depends on processor and debug configuration.
- f Excludes time spent waiting for an interrupt or event.
- g Executes as NOP.
See the ARMv6-M Architecture Reference Manual for more information about the ARMv6-M Thumb instructions.
2.4.3.4. Memory model
The processor contains a bus matrix that arbitrates the processor core and Debug Access Port (DAP) memory accesses to both the external memory system and to the internal NVIC and debug components.
Priority is always given to the processor to ensure that any debug accesses are as non-intrusive as possible. For a zero
wait-state system, all debug accesses to system memory, NVIC, and debug resources are completely non-intrusive for typical code execution.
The system memory map is ARMv6-M architecture compliant, and is common both to the debugger and processor accesses. Transactions are routed as follows:
- • All accesses below 0xd0000000 or above 0xffffffff appear as AHB-Lite transactions on the AHB-Lite master port of the processor.
- • Accesses in the range 0xd0000000 to 0xdfffffff are handled by the SIO.
- • Accesses in the range 0xe0000000 to 0xffffffff are handled within the processor and do not appear on the AHB-Lite master port of the processor.
The processor supports only word size accesses in the range 0xd0000000 - 0xffffffff.
Table 82 shows the code, data, and device suitability for each region of the default memory map. This is the memory map used by implementations when the MPU is disabled. The attributes and permissions of all regions, except that targeting the Cortex-M0+ NVIC and debug components, can be modified using an implemented MPU.
Table 82. M0+ Default memory map usage
| Address range | Code | Data | Device |
|---|---|---|---|
| 0xf0000000 - 0xffffffff | No | No | Yes |
| 0xe0000000 - 0xffffffff | No | No | No a |
| 0xa0000000 - 0xdfffffff | No | No | Yes |
| 0x60000000 - 0x9fffffff | Yes | Yes | No |
| 0x40000000 - 0x5fffffff | No | No | Yes |
| 0x20000000 - 0x3fffffff | Yes | Yes | No |
| 0x00000000 - 0x1fffffff | Yes | Yes | No |
a . Space reserved for Cortex-M0+ NVIC and debug components.
Note
Regions not marked as suitable for code behave as eXecute-Never (XN) and generate a HardFault exception if code attempts to execute from this location.
See the ARMv6-M Architecture Reference Manual for more information about the memory model.
2.4.3.5. Processor core registers summary
Table 83 shows the processor core register set summary. Each of these registers is 32 bits wide.
Table 83. M0+ processor core register set summary
| Name | Description |
|---|---|
| R0-R12 | R0-R12 are general-purpose registers for data operations. |
| MSP/PSP (R13) | The Stack Pointer (SP) is register R13. In Thread mode, the CONTROL register indicates the stack pointer to use, Main Stack Pointer (MSP) or Process Stack Pointer (PSP). |
| LR (R14) | The Link Register (LR) is register R14. It stores the return information for subroutines, function calls, and exceptions. |
| PC (R15) | The Program Counter (PC) is register R15. It contains the current program address. |
| Name | Description |
|---|---|
| PSR | The Program Status Register (PSR) combines:
These registers provide different views of the PSR. |
| PRIMASK | The PRIMASK register prevents activation of all exceptions with configurable priority. |
| CONTROL | The CONTROL register controls the stack used, the code privilege level, when the processor is in Thread mode. |
See the ARMv6-M Architecture Reference Manual for information about the processor core registers and their addresses, access types, and reset values.
2.4.3.6. ExceptionsThis section describes the exception model of the processor.
2.4.3.6.1. Exception handlingThe processor implements advanced exception and interrupt handling, as described in the ARMv6-M Architecture Reference Manual. To minimize interrupt latency, the processor abandons any load-multiple or store-multiple instruction to take any pending interrupt. On return from the interrupt handler, the processor restarts the load-multiple or store-multiple instruction from the beginning.
This means that software must not use load-multiple or store-multiple instructions when a device is accessed in a memory region that is read-sensitive or sensitive to repeated writes. The software must not use these instructions in any case where repeated reads or writes might cause inconsistent results or unwanted side-effects.
The processor implementation can ensure that a fixed number of cycles are required for the NVIC to detect an interrupt signal and the processor fetch the first instruction of the associated interrupt handler. If this is done, the highest priority interrupt is jitter-free. This will depend on where the interrupt handler is located and if another higher priority master is accessing that memory. SRAM4 and SRAM5 are provided that may be allocated to interrupt handlers for each processor so this is jitter-free.
To reduce interrupt latency and jitter, the Cortex-M0+ processor implements both interrupt late-arrival and interrupt tail-chaining mechanisms, as defined by the ARMv6-M architecture. The worst case interrupt latency, for the highest priority active interrupt in a zero wait-state system not using jitter suppression, is 15 cycles.
The processor exception model has the following implementation-defined behaviour in addition to the architecture specified behaviour:
- • Exceptions on stacking from HardFault to NMI lockup at NMI priority.
- • Exceptions on unstacking from NMI to HardFault lockup at HardFault priority.
2.4.4.1. System control register summary
Table 84 gives the system control registers. Each of these registers is 32 bits wide.
Table 84. M0+ System control registers
| Name | Description |
|---|---|
| SYST_CSR | SysTick Control and Status Register |
| SYST_RVR | SysTick Reload Value Register |
| SYST_CVR | SysTick Current Value Register |
| SYST_CALIB | SysTick Calibration value Register |
| CPUID | See CPUID Register |
| ICSR | Interrupt Control State Register |
| AIRCR | Application Interrupt and Reset Control Register |
| CCR | Configuration and Control Register |
| SHPR2 | System Handler Priority Register |
| SHPR3 | System Handler Priority Register |
| SHCSR | System Handler Control and State Register |
| VTOR | Vector table Offset Register |
| ACTLR | Auxiliary Control Register |
Note
- • All system control registers are only accessible using word transfers. Any attempt to read or write a halfword or byte is Unpredictable.
- • See the List of Registers or ARMv6-M Architecture Reference Manual for more information about the system control registers, and their addresses and access types, and reset values.
2.4.4.1.1. CPUID Register
The CPUID contains the part number, version, and implementation information that is specific to the processor.
IMPORTANT
This standard internal Arm register contains information about the type of processor. It should not be confused with CPUID (Section 2.3.1.1), an RP2040 SIO register which reads as 0 on core 0 and 1 on core 1.
2.4.5. NVIC
2.4.5.1. About the NVIC
External interrupt signals connect to the Nested Vectored Interrupt Controller (NVIC), and the NVIC prioritizes the interrupts. Software can set the priority of each interrupt. The NVIC and the Cortex-M0+ processor core are closely coupled, providing low latency interrupt processing and efficient processing of late arriving interrupts.
NOTE
"Nested" refers to the fact that interrupts can themselves be interrupted, by higher-priority interrupts. "Vectored" refers to the hardware dispatching each interrupt to a distinct handler routine, specified by the vector table. Details of nesting and vectoring behaviour are given in the ARMv6-M Architecture Reference Manual.
All NVIC registers are only accessible using word transfers. Any attempt to read or write a halfword or byte individually is unpredictable.
NVIC registers are always little-endian.
Processor exception handling is described in Exceptions section.
2.4.5.1.1. SysTick timer
A 24-bit SysTick system timer, extends the functionality of both the processor and the NVIC and provides:
- • A 24-bit system timer (SysTick).
- • Additional configurable priority SysTick interrupt.
The SysTick timer uses a 1µs pulse as a clock enable. This is generated in the watchdog block as timer_tick. Accuracy of SysTick timing depends upon accuracy of this timer_tick. The SysTick timer can also run from the system clock (see SYST_CALIB ).
See the ARMv6-M Architecture Reference Manual for more information.
2.4.5.1.2. Low power modes
The implementation includes a WIC. This enables the processor and NVIC to be put into a very low-power sleep mode leaving the WIC to identify and prioritize interrupts.
The processor fully implements the Wait For Interrupt (WFI), Wait For Event (WFE) and the Send Event (SEV) instructions. In addition, the processor also supports the use of SLEEPONEXIT, that causes the processor core to enter sleep mode when it returns from an exception handler to Thread mode. See the ARMv6-M Architecture Reference Manual for more information.
2.4.5.2. NVIC register summary
Table 85 shows the NVIC registers. Each of these registers is 32 bits wide.
Table 85. M0+ NVIC registers
| Name | Description |
|---|---|
| NVIC_ISER | Interrupt Set-Enable Register. |
| NVIC_ICER | Interrupt Clear-Enable Register. |
| NVIC_ISPR | Interrupt Set-Pending Register. |
| NVIC_ICPR | Interrupt Clear-Pending Register. |
| NVIC_IPR0 - NVIC_IPR7 | Interrupt Priority Registers. |
Note
See the List of Registers or ARMv6-M Architecture Reference Manual for more information about the NVIC registers and their addresses, access types, and reset values.
2.4.6. MPU
2.4.6.1. About the MPU
The MPU is a component for memory protection which allows the processor to support the ARMv6 Protected Memory System Architecture model. The MPU provides full support for:
- • Eight unified protection regions.
- • Overlapping protection regions, with ascending region priority:
- ◦ 7 = highest priority.
- ◦ 0 = lowest priority.
- • Access permissions.
- • Exporting memory attributes to the system.
MPU mismatches and permission violations invoke the HardFault handler. See the ARMv6-M Architecture Reference Manual for more information.
You can use the MPU to:
- • Enforce privilege rules.
- • Separate processes.
- • Manage memory attributes.
2.4.6.2. MPU register summary
Table 86 shows the MPU registers. Each of these registers is 32 bits wide.
Table 86. M0+ MPU registers
| Name | Description |
|---|---|
| MPU_TYPE | MPU Type Register. |
| MPU_CTRL | MPU Control Register. |
| MPU_RNR | MPU Region Number Register. |
| MPU_RBAR | MPU Region Base Address Register. |
| MPU_RASR | MPU Region Attribute and Size Register. |
Note
- • See the ARMv6-M Architecture Reference Manual for more information about the MPU registers and their addresses, access types, and reset values.
- • The MPU supports region sizes from 256-bytes to 4Gb, with 8-sub regions per region.
2.4.7. Debug
Basic debug functionality includes processor halt, single-step, processor core register access, Reset and HardFault Vector Catch, unlimited software breakpoints, and full system memory access. See the ARMv6-M Architecture Reference Manual.
The debug features for this device are:
- • A breakpoint unit supporting 4 hardware breakpoints.
- • A watchpoint unit supporting 2 watchpoints.
2.4.8. List of Registers
The ARM Cortex-M0+ registers start at a base address of
0xe0000000(defined as
PPB_BASE in SDK).
Table 87. List of M0PLUS registers
| Offset | Name | Info |
|---|---|---|
| 0xe010 | SYST_CSR | SysTick Control and Status Register |
| 0xe014 | SYST_RVR | SysTick Reload Value Register |
| 0xe018 | SYST_CVR | SysTick Current Value Register |
| 0xe01c | SYST_CALIB | SysTick Calibration Value Register |
| 0xe100 | NVIC_ISER | Interrupt Set-Enable Register |
| 0xe180 | NVIC_ICER | Interrupt Clear-Enable Register |
| 0xe200 | NVIC_ISPR | Interrupt Set-Pending Register |
| 0xe280 | NVIC_ICPR | Interrupt Clear-Pending Register |
| 0xe400 | NVIC_IPR0 | Interrupt Priority Register 0 |
| 0xe404 | NVIC_IPR1 | Interrupt Priority Register 1 |
| 0xe408 | NVIC_IPR2 | Interrupt Priority Register 2 |
| 0xe40c | NVIC_IPR3 | Interrupt Priority Register 3 |
| 0xe410 | NVIC_IPR4 | Interrupt Priority Register 4 |
| 0xe414 | NVIC_IPR5 | Interrupt Priority Register 5 |
| 0xe418 | NVIC_IPR6 | Interrupt Priority Register 6 |
| 0xe41c | NVIC_IPR7 | Interrupt Priority Register 7 |
| 0xed00 | CPUID | CPUID Base Register |
| 0xed04 | ICSR | Interrupt Control and State Register |
| 0xed08 | VTOR | Vector Table Offset Register |
| 0xed0c | AIRCR | Application Interrupt and Reset Control Register |
| 0xed10 | SCR | System Control Register |
| 0xed14 | CCR | Configuration and Control Register |
| 0xed1c | SHPR2 | System Handler Priority Register 2 |
| 0xed20 | SHPR3 | System Handler Priority Register 3 |
| 0xed24 | SHCSR | System Handler Control and State Register |
| 0xed90 | MPU_TYPE | MPU Type Register |
| 0xed94 | MPU_CTRL | MPU Control Register |
| 0xed98 | MPU_RNR | MPU Region Number Register |
| 0xed9c | MPU_RBAR | MPU Region Base Address Register |
| 0xeda0 | MPU_RASR | MPU Region Attribute and Size Register |
M0PLUS: SYST_CSR Register
Offset: 0xe010
Description
Use the SysTick Control and Status Register to enable the SysTick features.
Table 88. SYST_CSR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:17 | Reserved. | - | - |
| 16 | COUNTFLAG: Returns 1 if timer counted to 0 since last time this was read. Clears on read by application or debugger. | RO | 0x0 |
| 15:3 | Reserved. | - | - |
| 2 | CLKSOURCE:
SysTick clock source. Always reads as one if SYST_CALIB reports NOREF. Selects the SysTick timer clock source: 0 = External reference clock. 1 = Processor clock. | RW | 0x0 |
| 1 | TICKINT:
Enables SysTick exception request: 0 = Counting down to zero does not assert the SysTick exception request. 1 = Counting down to zero to asserts the SysTick exception request. | RW | 0x0 |
| 0 | ENABLE:
Enable SysTick counter: 0 = Counter disabled. 1 = Counter enabled. | RW | 0x0 |
MOPLUS: SYST_RVR Register
Offset: 0xe014
Description
Use the SysTick Reload Value Register to specify the start value to load into the current value register when the counter reaches 0. It can be any value between 0 and 0x00FFFFFF. A start value of 0 is possible, but has no effect because the SysTick interrupt and COUNTFLAG are activated when counting from 1 to 0. The reset value of this register is UNKNOWN.
To generate a multi-shot timer with a period of N processor clock cycles, use a RELOAD value of N-1. For example, if the SysTick interrupt is required every 100 clock pulses, set RELOAD to 99.
Table 89. SYST_RVR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:24 | Reserved. | - | - |
| 23:0 | RELOAD: Value to load into the SysTick Current Value Register when the counter reaches 0. | RW | 0x000000 |
MOPLUS: SYST_CVR Register
Offset: 0xe018
Description
Use the SysTick Current Value Register to find the current value in the register. The reset value of this register is UNKNOWN.
Table 90. SYST_CVR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:24 | Reserved. | - | - |
| Bits | Description | Type | Reset |
|---|---|---|---|
| 23:0 | CURRENT: Reads return the current value of the SysTick counter. This register is write-clear. Writing to it with any value clears the register to 0. Clearing this register also clears the COUNTFLAG bit of the SysTick Control and Status Register. | RW | 0x000000 |
M0PLUS: SYST_CALIB Register
Offset: 0xe01c
Description
Use the SysTick Calibration Value Register to enable software to scale to any required speed using divide and multiply.
Table 91. SYST_CALIB Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31 | NOREF: If reads as 1, the Reference clock is not provided - the CLKSOURCE bit of the SysTick Control and Status register will be forced to 1 and cannot be cleared to 0. | RO | 0x0 |
| 30 | SKEW: If reads as 1, the calibration value for 10ms is inexact (due to clock frequency). | RO | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:0 | TENMS: An optional Reload value to be used for 10ms (100Hz) timing, subject to system clock skew errors. If the value reads as 0, the calibration value is not known. | RO | 0x000000 |
M0PLUS: NVIC_ISER Register
Offset: 0xe100
Description
Use the Interrupt Set-Enable Register to enable interrupts and determine which interrupts are currently enabled. If a pending interrupt is enabled, the NVIC activates the interrupt based on its priority. If an interrupt is not enabled, asserting its interrupt signal changes the interrupt state to pending, but the NVIC never activates the interrupt, regardless of its priority.
Table 92. NVIC_ISER Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:0 | SETENA:
Interrupt set-enable bits. Write: 0 = No effect. 1 = Enable interrupt. Read: 0 = Interrupt disabled. 1 = Interrupt enabled. | RW | 0x00000000 |
M0PLUS: NVIC_ICER Register
Offset: 0xe180
Description
Use the Interrupt Clear-Enable Registers to disable interrupts and determine which interrupts are currently enabled.
Table 93. NVIC_ICER Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:0 | CLRENA:
Interrupt clear-enable bits. Write: 0 = No effect. 1 = Disable interrupt. Read: 0 = Interrupt disabled. 1 = Interrupt enabled. | RW | 0x00000000 |
M0PLUS: NVIC_ISPR Register
Offset: 0xe200
Description
The NVIC_ISPR forces interrupts into the pending state, and shows which interrupts are pending.
Table 94. NVIC_ISPR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:0 | SETPEND:
Interrupt set-pending bits. Write: 0 = No effect. 1 = Changes interrupt state to pending. Read: 0 = Interrupt is not pending. 1 = Interrupt is pending. Note: Writing 1 to the NVIC_ISPR bit corresponding to: An interrupt that is pending has no effect. A disabled interrupt sets the state of that interrupt to pending. | RW | 0x00000000 |
M0PLUS: NVIC_ICPR Register
Offset: 0xe280
Description
Use the Interrupt Clear-Pending Register to clear pending interrupts and determine which interrupts are currently pending.
Table 95. NVIC_ICPR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:0 | CLRPEND:
Interrupt clear-pending bits. Write: 0 = No effect. 1 = Removes pending state and interrupt. Read: 0 = Interrupt is not pending. 1 = Interrupt is pending. | RW | 0x00000000 |
M0PLUS: NVIC_IPR0 Register
Offset: 0xe400
Description
Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.
Note: Writing 1 to an NVIC_ICPR bit does not affect the active state of the corresponding interrupt.
These registers are only word-accessible
Table 96. NVIC_IPR0 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | IP_3 : Priority of interrupt 3 | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | IP_2 : Priority of interrupt 2 | RW | 0x0 |
| 21:16 | Reserved. | - | - |
| 15:14 | IP_1 : Priority of interrupt 1 | RW | 0x0 |
| 13:8 | Reserved. | - | - |
| 7:6 | IP_0 : Priority of interrupt 0 | RW | 0x0 |
| 5:0 | Reserved. | - | - |
M0PLUS: NVIC_IPR1 Register
Offset: 0xe404
Description
Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.
Table 97. NVIC_IPR1 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | IP_7 : Priority of interrupt 7 | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | IP_6 : Priority of interrupt 6 | RW | 0x0 |
| 21:16 | Reserved. | - | - |
| 15:14 | IP_5 : Priority of interrupt 5 | RW | 0x0 |
| 13:8 | Reserved. | - | - |
| 7:6 | IP_4 : Priority of interrupt 4 | RW | 0x0 |
| 5:0 | Reserved. | - | - |
M0PLUS: NVIC_IPR2 Register
Offset: 0xe408
Description
Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.
Table 98. NVIC_IPR2 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | IP_11 : Priority of interrupt 11 | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | IP_10 : Priority of interrupt 10 | RW | 0x0 |
| 21:16 | Reserved. | - | - |
| 15:14 | IP_9 : Priority of interrupt 9 | RW | 0x0 |
| 13:8 | Reserved. | - | - |
| Bits | Description | Type | Reset |
|---|---|---|---|
| 7:6 | IP_8 : Priority of interrupt 8 | RW | 0x0 |
| 5:0 | Reserved. | - | - |
M0PLUS: NVIC_IPR3 Register
Offset: 0xe40c
Description
Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.
Table 99. NVIC_IPR3 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | IP_15 : Priority of interrupt 15 | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | IP_14 : Priority of interrupt 14 | RW | 0x0 |
| 21:16 | Reserved. | - | - |
| 15:14 | IP_13 : Priority of interrupt 13 | RW | 0x0 |
| 13:8 | Reserved. | - | - |
| 7:6 | IP_12 : Priority of interrupt 12 | RW | 0x0 |
| 5:0 | Reserved. | - | - |
M0PLUS: NVIC_IPR4 Register
Offset: 0xe410
Description
Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.
Table 100. NVIC_IPR4 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | IP_19 : Priority of interrupt 19 | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | IP_18 : Priority of interrupt 18 | RW | 0x0 |
| 21:16 | Reserved. | - | - |
| 15:14 | IP_17 : Priority of interrupt 17 | RW | 0x0 |
| 13:8 | Reserved. | - | - |
| 7:6 | IP_16 : Priority of interrupt 16 | RW | 0x0 |
| 5:0 | Reserved. | - | - |
M0PLUS: NVIC_IPR5 Register
Offset: 0xe414
Description
Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.
Table 101. NVIC_IPR5 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | IP_23: Priority of interrupt 23 | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | IP_22: Priority of interrupt 22 | RW | 0x0 |
| 21:16 | Reserved. | - | - |
| 15:14 | IP_21: Priority of interrupt 21 | RW | 0x0 |
| 13:8 | Reserved. | - | - |
| 7:6 | IP_20: Priority of interrupt 20 | RW | 0x0 |
| 5:0 | Reserved. | - | - |
M0PLUS: NVIC_IPR6 Register
Offset: 0xe418
Description
Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.
Table 102. NVIC_IPR6 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | IP_27: Priority of interrupt 27 | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | IP_26: Priority of interrupt 26 | RW | 0x0 |
| 21:16 | Reserved. | - | - |
| 15:14 | IP_25: Priority of interrupt 25 | RW | 0x0 |
| 13:8 | Reserved. | - | - |
| 7:6 | IP_24: Priority of interrupt 24 | RW | 0x0 |
| 5:0 | Reserved. | - | - |
M0PLUS: NVIC_IPR7 Register
Offset: 0xe41c
Description
Use the Interrupt Priority Registers to assign a priority from 0 to 3 to each of the available interrupts. 0 is the highest priority, and 3 is the lowest.
Table 103. NVIC_IPR7 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | IP_31: Priority of interrupt 31 | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | IP_30: Priority of interrupt 30 | RW | 0x0 |
| 21:16 | Reserved. | - | - |
| Bits 14:10 9:5 4:0 Bits | Description SHIFT Description | MASK_MSB : The most-significant bit allowed to pass by the mask (inclusive) MASK_LSB : The least-significant bit allowed to pass by the mask (inclusive) : Logical right-shift applied to accumulator before masking | Type RW RW RW Type | Reset 0x00 0x00 0x00 Reset |
|---|---|---|---|---|
| 13:8 | Reserved. | - | - | |
| 7:6 | IP_28 | : Priority of interrupt 28 | RW | 0x0 |
| 5:0 | Reserved. | - | - | |
| Table 104. CPUID Bits | Description | Type | Reset | |
| Register 31:24 | IMPLEMENTER | : Implementor code: 0x41 = ARM | RO | 0x41 |
| 23:20 | VARIANT | : Major revision number n in the rnpm revision status: | RO | 0x0 |
| 19:16 | ARCHITECTURE | 0x0 = Revision 0. : Constant that defines the architecture of the processor: | RO | 0xc |
| 15:4 | PARTNO | 0xC = ARMv6-M architecture. : Number of processor within family: 0xC60 = Cortex-M0+ | RO | 0xc60 |
| 3:0 | REVISION | : Minor revision number m in the rnpm revision status: 0x1 = Patch 1. | RO | 0x1 |
| Table 105. ICSR Bits | Description | Type | Reset | |
| Register 31 | NMIPENDSET | : Setting this bit will activate an NMI. Since NMI is the highest priority exception, it will activate as soon as it is registered. | RW | 0x0 |
M0PLUS: CPUID Register
Offset: 0xed00
Description
Read the CPU ID Base Register to determine: the ID number of the processor core, the version number of the processor core, the implementation details of the processor core.
Table 104. CPUID Register
M0PLUS: ICSR Register
Offset: 0xed04
Description
Use the Interrupt Control State Register to set a pending Non-Maskable Interrupt (NMI), set or clear a pending PendSV, set or clear a pending SysTick, check for pending exceptions, check the vector number of the highest priority pended exception, check the vector number of the active exception.
Table 105. ICSR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 30:29 | Reserved. | - | - |
| 28 | PENDSVSET
: PendSV set-pending bit. Write: 0 = No effect. 1 = Changes PendSV exception state to pending. Read: 0 = PendSV exception is not pending. 1 = PendSV exception is pending. Writing 1 to this bit is the only way to set the PendSV exception state to pending. | RW | 0x0 |
| 27 | PENDSVCLR
: PendSV clear-pending bit. Write: 0 = No effect. 1 = Removes the pending state from the PendSV exception. | RW | 0x0 |
| 26 | PENDSTSET
: SysTick exception set-pending bit. Write: 0 = No effect. 1 = Changes SysTick exception state to pending. Read: 0 = SysTick exception is not pending. 1 = SysTick exception is pending. | RW | 0x0 |
| 25 | PENDSTCLR
: SysTick exception clear-pending bit. Write: 0 = No effect. 1 = Removes the pending state from the SysTick exception. This bit is WO. On a register read its value is Unknown. | RW | 0x0 |
| 24 | Reserved. | - | - |
| 23 | ISRPREEMPT : The system can only access this bit when the core is halted. It indicates that a pending interrupt is to be taken in the next running cycle. If C_MASKINTS is clear in the Debug Halting Control and Status Register, the interrupt is serviced. | RO | 0x0 |
| 22 | ISRPENDING : External interrupt pending flag | RO | 0x0 |
| 21 | Reserved. | - | - |
| 20:12 | VECTPENDING : Indicates the exception number for the highest priority pending exception: 0 = no pending exceptions. Non zero = The pending state includes the effect of memory-mapped enable and mask registers. It does not include the PRIMASK special-purpose register qualifier. | RO | 0x000 |
| 11:9 | Reserved. | - | - |
| 8:0 | VECTACTIVE : Active exception number field. Reset clears the VECTACTIVE field. | RO | 0x000 |
M0PLUS: VTOR Register
Offset: 0xed08
Description
The VTOR holds the vector table offset address.
Table 106. VTOR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | TBLOFF : Bits [31:8] of the indicate the vector table offset address. | RW | 0x000000 |
| 7:0 | Reserved. | - | - |
M0PLUS: AIRCR Register
Offset: 0xed0c
Description
Use the Application Interrupt and Reset Control Register to: determine data endianness, clear all active state information from debug halt mode, request a system reset.
Table 107. AIRCR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:16 | VECTKEY
: Register key: Reads as Unknown On writes, write 0x05FA to VECTKEY, otherwise the write is ignored. | RW | 0x0000 |
| 15 | ENDIANESS
: Data endianness implemented: 0 = Little-endian. | RO | 0x0 |
| 14:3 | Reserved. | - | - |
| 2 | SYSRESETREQ : Writing 1 to this bit causes the SYSRESETREQ signal to the outer system to be asserted to request a reset. The intention is to force a large system reset of all major components except for debug. The C_HALT bit in the DHCSR is cleared as a result of the system reset requested. The debugger does not lose contact with the device. | RW | 0x0 |
| 1 | VECTCLRACTIVE : Clears all active state information for fixed and configurable exceptions. This bit: is self-clearing, can only be set by the DAP when the core is halted. When set: clears all active exception status of the processor, forces a return to Thread mode, forces an IPSR of 0. A debugger must re-initialize the stack. | RW | 0x0 |
| 0 | Reserved. | - | - |
M0PLUS: SCR Register
Offset: 0xed10
Description
System Control Register. Use the System Control Register for power-management functions: signal to the system when the processor can enter a low power state, control how the processor enters and exits low power states.
Table 108. SCR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:5 | Reserved. | - | - |
| Bits | Description | Type | Reset |
|---|---|---|---|
| 4 | SEVONPEND
: Send Event on Pending bit: 0 = Only enabled interrupts or events can wakeup the processor, disabled interrupts are excluded. 1 = Enabled events and all interrupts, including disabled interrupts, can wakeup the processor. When an event or interrupt becomes pending, the event signal wakes up the processor from WFE. If the processor is not waiting for an event, the event is registered and affects the next WFE. The processor also wakes up on execution of an SEV instruction or an external event. | RW | 0x0 |
| 3 | Reserved. | - | - |
| 2 | SLEEPDEEP
: Controls whether the processor uses sleep or deep sleep as its low power mode: 0 = Sleep. 1 = Deep sleep. | RW | 0x0 |
| 1 | SLEEPONEXIT
: Indicates 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 ISR to Thread mode. Setting this bit to 1 enables an interrupt driven application to avoid returning to an empty main application. | RW | 0x0 |
| 0 | Reserved. | - | - |
M0PLUS: CCR Register
Offset: 0xed14
Description
The Configuration and Control Register permanently enables stack alignment and causes unaligned accesses to result in a Hard Fault.
Table 109. CCR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:10 | Reserved. | - | - |
| 9 | STKALIGN : Always reads as one, indicates 8-byte stack alignment on exception entry. On exception entry, the processor uses bit[9] of the stacked PSR to indicate the stack alignment. On return from the exception it uses this stacked bit to restore the correct stack alignment. | RO | 0x0 |
| 8:4 | Reserved. | - | - |
| 3 | UNALIGN_TRP : Always reads as one, indicates that all unaligned accesses generate a HardFault. | RO | 0x0 |
| 2:0 | Reserved. | - | - |
M0PLUS: SHPR2 Register
Offset: 0xed1c
Description
System handlers are a special class of exception handler that can have their priority set to any of the priority levels.
Use the System Handler Priority Register 2 to set the priority of SVCall.
Table 110. SHPR2 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | PRI_11 : Priority of system handler 11, SVCall | RW | 0x0 |
| 29:0 | Reserved. | - | - |
M0PLUS: SHPR3 Register
Offset: 0xed20
Description
System handlers are a special class of exception handler that can have their priority set to any of the priority levels. Use the System Handler Priority Register 3 to set the priority of PendSV and SysTick.
Table 111. SHPR3 Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:30 | PRI_15 : Priority of system handler 15, SysTick | RW | 0x0 |
| 29:24 | Reserved. | - | - |
| 23:22 | PRI_14 : Priority of system handler 14, PendSV | RW | 0x0 |
| 21:0 | Reserved. | - | - |
M0PLUS: SHCSR Register
Offset: 0xed24
Description
Use the System Handler Control and State Register to determine or clear the pending status of SVCall.
Table 112. SHCSR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:16 | Reserved. | - | - |
| 15 | SVCALLPENDE : Reads as 1 if SVCall is Pending. Write 1 to set pending SVCall, write 0 to clear pending SVCall. | RW | 0x0 |
| 14:0 | Reserved. | - | - |
M0PLUS: MPU_TYPE Register
Offset: 0xed90
Description
Read the MPU Type Register to determine if the processor implements an MPU, and how many regions the MPU supports.
Table 113. MPU_TYPE Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:24 | Reserved. | - | - |
| 23:16 | IREGION : Instruction region. Reads as zero as ARMv6-M only supports a unified MPU. | RO | 0x00 |
| 15:8 | DREGION : Number of regions supported by the MPU. | RO | 0x08 |
| 7:1 | Reserved. | - | - |
| Bits | Description | Type | Reset |
|---|---|---|---|
| 0 | SEPARATE : Indicates support for separate instruction and data address maps. Reads as 0 as ARMv6-M only supports a unified MPU. | RO | 0x0 |
M0PLUS: MPU_CTRL Register
Offset: 0xed94
Description
Use the MPU Control Register to enable and disable the MPU, and to control whether the default memory map is enabled as a background region for privileged accesses, and whether the MPU is enabled for HardFaults and NMIs.
Table 114. MPU_CTRL Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:3 | Reserved. | - | - |
| 2 | PRIVDEFENA
: Controls whether the default memory map is enabled as a background region for privileged accesses. This bit is ignored when ENABLE is clear. 0 = If the MPU is enabled, disables use of the default memory map. Any memory access to a location not covered by any enabled region causes a fault. 1 = If the MPU is enabled, enables use of the default memory map as a background region for privileged software accesses. When enabled, the background region acts as if it is region number -1. Any region that is defined and enabled has priority over this default map. | RW | 0x0 |
| 1 | HFNMIENA
: Controls the use of the MPU for HardFaults and NMIs. Setting this bit when ENABLE is clear results in UNPREDICTABLE behaviour. When the MPU is enabled: 0 = MPU is disabled during HardFault and NMI handlers, regardless of the value of the ENABLE bit. 1 = the MPU is enabled during HardFault and NMI handlers. | RW | 0x0 |
| 0 | ENABLE
: Enables the MPU. If the MPU is disabled, privileged and unprivileged accesses use the default memory map. 0 = MPU disabled. 1 = MPU enabled. | RW | 0x0 |
M0PLUS: MPU_RNR Register
Offset: 0xed98
Description
Use the MPU Region Number Register to select the region currently accessed by MPU_RBAR and MPU_RASR.
Table 115. MPU_RNR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:4 | Reserved. | - | - |
| 3:0 | REGION
: Indicates the MPU region referenced by the MPU_RBAR and MPU_RASR registers. The MPU supports 8 memory regions, so the permitted values of this field are 0-7. | RW | 0x0 |
M0PLUS: MPU_RBAR Register
Offset: 0xed9c
DescriptionRead the MPU Region Base Address Register to determine the base address of the region identified by MPU_RNR. Write to update the base address of said region or that of a specified region, with whose number MPU_RNR will also be updated.
Table 116. MPU_RBAR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:8 | ADDR: Base address of the region. | RW | 0x000000 |
| 7:5 | Reserved. | - | - |
| 4 | VALID:
On writes, indicates whether the write must update the base address of the region identified by the REGION field, updating the MPU_RNR to indicate this new region. Write: 0 = MPU_RNR not changed, and the processor: Updates the base address for the region specified in the MPU_RNR. Ignores the value of the REGION field. 1 = The processor: Updates the value of the MPU_RNR to the value of the REGION field. Updates the base address for the region specified in the REGION field. Always reads as zero. | RW | 0x0 |
| 3:0 | REGION: On writes, specifies the number of the region whose base address to update provided VALID is set written as 1. On reads, returns bits [3:0] of MPU_RNR. | RW | 0x0 |
Offset: 0xeda0
DescriptionUse the MPU Region Attribute and Size Register to define the size, access behaviour and memory type of the region identified by MPU_RNR, and enable that region.
Table 117. MPU_RASR Register
| Bits | Description | Type | Reset |
|---|---|---|---|
| 31:16 | ATTRS:
The MPU Region Attribute field. Use to define the region attribute control. 28 = XN: Instruction access disable bit: 0 = Instruction fetches enabled. 1 = Instruction fetches disabled. 26:24 = AP: Access permission field 18 = S: Shareable bit 17 = C: Cacheable bit 16 = B: Bufferable bit | RW | 0x0000 |
| 15:8 | SRD: Subregion Disable. For regions of 256 bytes or larger, each bit of this field controls whether one of the eight equal subregions is enabled. | RW | 0x00 |
| 7:6 | Reserved. | - | - |
| 5:1 | SIZE: Indicates the region size. Region size in bytes = \( 2^{(SIZE+1)} \) . The minimum permitted value is 7 (b00111) = 256Bytes | RW | 0x00 |
| 0 | ENABLE: Enables the region. | RW | 0x0 |