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:

2.4.1.1. Interfaces

The interfaces included in the processor for external access include:

2.4.1.2. Configuration

Each processor is configured with the following features:

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

Functional block diagram of the Cortex-M0+ subsystem. The diagram shows the internal components of the Cortex-M0+ subsystem, including the PMU, RESET CTRL, Cortex M0+ Core, MPU, Bus Interface, NVIC, WIC, Breakpoint and watchpoint unit, Debugger interface, and DAP. External inputs include Clock, Reset, and Interrupts. External outputs include AHB-Lite Master, Single cycle IO Port, and Serial Wire Debug. The diagram illustrates the interconnections between these blocks, such as the PMU and RESET CTRL receiving Clock and Reset signals, and the Cortex M0+ Core connected to the MPU and Bus Interface.
Functional block diagram of the Cortex-M0+ subsystem. The diagram shows the internal components of the Cortex-M0+ subsystem, including the PMU, RESET CTRL, Cortex M0+ Core, MPU, Bus Interface, NVIC, WIC, Breakpoint and watchpoint unit, Debugger interface, and DAP. External inputs include Clock, Reset, and Interrupts. External outputs include AHB-Lite Master, Single cycle IO Port, and Serial Wire Debug. The diagram illustrates the interconnections between these blocks, such as the PMU and RESET CTRL receiving Clock and Reset signals, and the Cortex M0+ Core connected to the MPU and Bus Interface.

2.4.2.2. Features

The M0+ features:

2.4.2.3. NVIC features

The Nested Vectored Interrupt Controller (NVIC) features are:

i NOTE

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:

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:

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.

NOTE

Instructions 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:

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.

NOTE

Code 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:

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:

WFE wake up events

The following events are WFE wake up events:

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:

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:

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:

Note

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.

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:

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

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:

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

OperationDescriptionAssemblerCycles
Move8-bit immediateMOVS Rd, #<imm>1
Lo to LoMOVS Rd, Rm1
Any to AnyMOV Rd, Rm1
Any to PCMOV PC, Rm2
Add3-bit immediateADDS Rd, Rn, #<imm>1
All registers LoADDS Rd, Rn, Rm1
Any to AnyADD Rd, Rd, Rm1
Any to PCADD PC, PC, Rm2
8-bit immediateADDS Rd, Rd, #<imm>1
With carryADCS Rd, Rd, Rm1
Immediate to SPADD SP, SP, #<imm>1
Form address from SPADD Rd, SP, #<imm>1
Form address from PCADR Rd, <label>1
SubtractSUBS Rd, Rn, Rm1
3-bit immediateSUBS Rd, Rn, #<imm>1
8-bit immediateSUBS Rd, Rd, #<imm>1
SubtractWith carrySBCS Rd, Rd, Rm1
Immediate from SPSUB SP, SP, #<imm>1
NegateRSBS Rd, Rn, #01
MultiplyMULS Rd, Rm, Rd1
CompareCMP Rn, Rm1
NegativeCMN Rn, Rm1
LogicalImmediateCMP Rn, #<imm>1
ANDANDS Rd, Rd, Rm1
Exclusive OREORS Rd, Rd, Rm1
ORORRS Rd, Rd, Rm1
OperationDescriptionAssemblerCycles
Bit clearBICS Rd, Rd, Rm1
Move NOTMVNS Rd, Rm1
AND testTST Rn, Rm1
ShiftLogical shift left by immediateLSLS Rd, Rm, #<shift>1
Logical shift left by registerLSLS Rd, Rd, Rs1
Logical shift right by immediateLSRS Rd, Rm, #<shift>1
Logical shift right by registerLSRS Rd, Rd, Rs1
Arithmetic shift rightASRS Rd, Rm, #<shift>1
Arithmetic shift right by registerASRS Rd, Rd, Rs1
RotateRotate right by registerRORS Rd, Rd, Rs1
LoadWord, immediate offsetLDR Rd, [Rn, #<imm>]2 or 1 a
Halfword, immediate offsetLDRH Rd, [Rn, #<imm>]2 or 1 a
Byte, immediate offsetLDRB Rd, [Rn, #<imm>]2 or 1 a
Word, register offsetLDR Rd, [Rn, Rm]2 or 1 a
Halfword, register offsetLDRH Rd, [Rn, Rm]2 or 1 a
Signed halfword, register offsetLDRSH Rd, [Rn, Rm]2 or 1 a
Byte, register offsetLDRB Rd, [Rn, Rm]2 or 1 a
Signed byte, register offsetLDRSB Rd, [Rn, Rm]2 or 1 a
PC-relativeLDR Rd, <label>2 or 1 a
SP-relativeLDR Rd, [SP, #<imm>]2 or 1 a
Multiple, excluding baseLDM Rn!, {<loreglist>}1+N b
Multiple, including baseLDM Rn, {<loreglist>}1+N b
StoreWord, immediate offsetSTR Rd, [Rn, #<imm>]2 or 1 a
Halfword, immediate offsetSTRH Rd, [Rn, #<imm>]2 or 1 a
Byte, immediate offsetSTRB Rd, [Rn, #<imm>]2 or 1 a
Word, register offsetSTR Rd, [Rn, Rm]2 or 1 a
Halfword, register offsetSTRH Rd, [Rn, Rm]2 or 1 a
Byte, register offsetSTRB Rd, [Rn, Rm]2 or 1 a
SP-relativeSTR Rd, [SP, #<imm>]2 or 1 a
MultipleSTM Rn!, {<loreglist>}1+N b
PushPushPUSH {<loreglist>}1+N b
Push with link registerPUSH {<loreglist>, LR}1+N c
PopPopPOP {<loreglist>}1+N b
Pop and returnPOP {<loreglist>, PC}3+N c
BranchConditionalB<cc> <label>1 or 2 d
UnconditionalB <label>2
OperationDescriptionAssemblerCycles
With linkBL <label>3
With exchangeBX Rm2
With link and exchangeBLX Rm2
ExtendSigned halfword to wordSXTH Rd, Rm1
Signed byte to wordSXTB Rd, Rm1
Unsigned halfwordUXTH Rd, Rm1
Unsigned byteUXTB Rd, Rm1
ReverseBytes in wordREV Rd, Rm1
Bytes in both halfwordsREV16 Rd, Rm1
Signed bottom half wordREVSH Rd, Rm1
Statechange Supervisor CallSVC #<imm>- e
Disable interruptsCPSID i1
Enable interruptsCPSIE i1
Read special registerMRS Rd, <specreg>3
Write special registerMSR <specreg>, Rn3
BreakpointBKPT #<imm>- e
HintSend-EventSEV1
Wait For EventWFE2 f
Wait For InterruptWFI2 f
YieldYIELD1 f
No operationNOP1
BarriersInstruction synchronizationISB3
Data memoryDMB3
Data synchronizationDSB3

Table Notes

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:

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 rangeCodeDataDevice
0xf0000000 - 0xffffffffNoNoYes
0xe0000000 - 0xffffffffNoNoNo a
0xa0000000 - 0xdfffffffNoNoYes
0x60000000 - 0x9fffffffYesYesNo
0x40000000 - 0x5fffffffNoNoYes
0x20000000 - 0x3fffffffYesYesNo
0x00000000 - 0x1fffffffYesYesNo

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

NameDescription
R0-R12R0-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.
NameDescription
PSR

The Program Status Register (PSR) combines:

  • • Application Program Status Register (APSR).
  • • Interrupt Program Status Register (IPSR).
  • • Execution Program Status Register (EPSR).

These registers provide different views of the PSR.

PRIMASKThe PRIMASK register prevents activation of all exceptions with configurable priority.
CONTROLThe CONTROL register controls the stack used, the code privilege level, when the processor is in Thread mode.
Note

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. Exceptions

This section describes the exception model of the processor.

2.4.3.6.1. Exception handling

The 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:

2.4.4. System control

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

NameDescription
SYST_CSRSysTick Control and Status Register
SYST_RVRSysTick Reload Value Register
SYST_CVRSysTick Current Value Register
SYST_CALIBSysTick Calibration value Register
CPUIDSee CPUID Register
ICSRInterrupt Control State Register
AIRCRApplication Interrupt and Reset Control Register
CCRConfiguration and Control Register
SHPR2System Handler Priority Register
SHPR3System Handler Priority Register
SHCSRSystem Handler Control and State Register
VTORVector table Offset Register
ACTLRAuxiliary Control Register

Note

2.4.4.1.1. CPUID Register

The CPUID contains the part number, version, and implementation information that is specific to the processor.

Important icon 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:

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

NameDescription
NVIC_ISERInterrupt Set-Enable Register.
NVIC_ICERInterrupt Clear-Enable Register.
NVIC_ISPRInterrupt Set-Pending Register.
NVIC_ICPRInterrupt Clear-Pending Register.
NVIC_IPR0 - NVIC_IPR7Interrupt 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:

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:

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

NameDescription
MPU_TYPEMPU Type Register.
MPU_CTRLMPU Control Register.
MPU_RNRMPU Region Number Register.
MPU_RBARMPU Region Base Address Register.
MPU_RASRMPU Region Attribute and Size Register.

Note

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:

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

OffsetNameInfo
0xe010SYST_CSRSysTick Control and Status Register
0xe014SYST_RVRSysTick Reload Value Register
0xe018SYST_CVRSysTick Current Value Register
0xe01cSYST_CALIBSysTick Calibration Value Register
0xe100NVIC_ISERInterrupt Set-Enable Register
0xe180NVIC_ICERInterrupt Clear-Enable Register
0xe200NVIC_ISPRInterrupt Set-Pending Register
0xe280NVIC_ICPRInterrupt Clear-Pending Register
0xe400NVIC_IPR0Interrupt Priority Register 0
0xe404NVIC_IPR1Interrupt Priority Register 1
0xe408NVIC_IPR2Interrupt Priority Register 2
0xe40cNVIC_IPR3Interrupt Priority Register 3
0xe410NVIC_IPR4Interrupt Priority Register 4
0xe414NVIC_IPR5Interrupt Priority Register 5
0xe418NVIC_IPR6Interrupt Priority Register 6
0xe41cNVIC_IPR7Interrupt Priority Register 7
0xed00CPUIDCPUID Base Register
0xed04ICSRInterrupt Control and State Register
0xed08VTORVector Table Offset Register
0xed0cAIRCRApplication Interrupt and Reset Control Register
0xed10SCRSystem Control Register
0xed14CCRConfiguration and Control Register
0xed1cSHPR2System Handler Priority Register 2
0xed20SHPR3System Handler Priority Register 3
0xed24SHCSRSystem Handler Control and State Register
0xed90MPU_TYPEMPU Type Register
0xed94MPU_CTRLMPU Control Register
0xed98MPU_RNRMPU Region Number Register
0xed9cMPU_RBARMPU Region Base Address Register
0xeda0MPU_RASRMPU 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

BitsDescriptionTypeReset
31:17Reserved.--
16COUNTFLAG: Returns 1 if timer counted to 0 since last time this was read. Clears on read by application or debugger.RO0x0
15:3Reserved.--
2CLKSOURCE: 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.
RW0x0
1TICKINT: 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.
RW0x0
0ENABLE: Enable SysTick counter:
0 = Counter disabled.
1 = Counter enabled.
RW0x0

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

BitsDescriptionTypeReset
31:24Reserved.--
23:0RELOAD: Value to load into the SysTick Current Value Register when the counter reaches 0.RW0x000000

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

BitsDescriptionTypeReset
31:24Reserved.--
BitsDescriptionTypeReset
23:0CURRENT: 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.RW0x000000

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

BitsDescriptionTypeReset
31NOREF: 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.RO0x0
30SKEW: If reads as 1, the calibration value for 10ms is inexact (due to clock frequency).RO0x0
29:24Reserved.--
23:0TENMS: 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.RO0x000000

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

BitsDescriptionTypeReset
31:0SETENA: Interrupt set-enable bits.
Write:
0 = No effect.
1 = Enable interrupt.
Read:
0 = Interrupt disabled.
1 = Interrupt enabled.
RW0x00000000

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

BitsDescriptionTypeReset
31:0CLRENA: Interrupt clear-enable bits.
Write:
0 = No effect.
1 = Disable interrupt.
Read:
0 = Interrupt disabled.
1 = Interrupt enabled.
RW0x00000000

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

BitsDescriptionTypeReset
31:0SETPEND: 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.
RW0x00000000

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

BitsDescriptionTypeReset
31:0CLRPEND: Interrupt clear-pending bits.
Write:
0 = No effect.
1 = Removes pending state and interrupt.
Read:
0 = Interrupt is not pending.
1 = Interrupt is pending.
RW0x00000000

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

BitsDescriptionTypeReset
31:30IP_3 : Priority of interrupt 3RW0x0
29:24Reserved.--
23:22IP_2 : Priority of interrupt 2RW0x0
21:16Reserved.--
15:14IP_1 : Priority of interrupt 1RW0x0
13:8Reserved.--
7:6IP_0 : Priority of interrupt 0RW0x0
5:0Reserved.--

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

BitsDescriptionTypeReset
31:30IP_7 : Priority of interrupt 7RW0x0
29:24Reserved.--
23:22IP_6 : Priority of interrupt 6RW0x0
21:16Reserved.--
15:14IP_5 : Priority of interrupt 5RW0x0
13:8Reserved.--
7:6IP_4 : Priority of interrupt 4RW0x0
5:0Reserved.--

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

BitsDescriptionTypeReset
31:30IP_11 : Priority of interrupt 11RW0x0
29:24Reserved.--
23:22IP_10 : Priority of interrupt 10RW0x0
21:16Reserved.--
15:14IP_9 : Priority of interrupt 9RW0x0
13:8Reserved.--
BitsDescriptionTypeReset
7:6IP_8 : Priority of interrupt 8RW0x0
5:0Reserved.--

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

BitsDescriptionTypeReset
31:30IP_15 : Priority of interrupt 15RW0x0
29:24Reserved.--
23:22IP_14 : Priority of interrupt 14RW0x0
21:16Reserved.--
15:14IP_13 : Priority of interrupt 13RW0x0
13:8Reserved.--
7:6IP_12 : Priority of interrupt 12RW0x0
5:0Reserved.--

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

BitsDescriptionTypeReset
31:30IP_19 : Priority of interrupt 19RW0x0
29:24Reserved.--
23:22IP_18 : Priority of interrupt 18RW0x0
21:16Reserved.--
15:14IP_17 : Priority of interrupt 17RW0x0
13:8Reserved.--
7:6IP_16 : Priority of interrupt 16RW0x0
5:0Reserved.--

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

BitsDescriptionTypeReset
31:30IP_23: Priority of interrupt 23RW0x0
29:24Reserved.--
23:22IP_22: Priority of interrupt 22RW0x0
21:16Reserved.--
15:14IP_21: Priority of interrupt 21RW0x0
13:8Reserved.--
7:6IP_20: Priority of interrupt 20RW0x0
5:0Reserved.--

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

BitsDescriptionTypeReset
31:30IP_27: Priority of interrupt 27RW0x0
29:24Reserved.--
23:22IP_26: Priority of interrupt 26RW0x0
21:16Reserved.--
15:14IP_25: Priority of interrupt 25RW0x0
13:8Reserved.--
7:6IP_24: Priority of interrupt 24RW0x0
5:0Reserved.--

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

BitsDescriptionTypeReset
31:30IP_31: Priority of interrupt 31RW0x0
29:24Reserved.--
23:22IP_30: Priority of interrupt 30RW0x0
21:16Reserved.--
Bits 14:10 9:5 4:0 BitsDescription SHIFT DescriptionMASK_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 maskingType RW RW RW TypeReset 0x00 0x00 0x00 Reset
13:8Reserved.--
7:6IP_28: Priority of interrupt 28RW0x0
5:0Reserved.--
Table 104. CPUID BitsDescriptionTypeReset
Register 31:24IMPLEMENTER: Implementor code: 0x41 = ARMRO0x41
23:20VARIANT: Major revision number n in the rnpm revision status:RO0x0
19:16ARCHITECTURE0x0 = Revision 0. : Constant that defines the architecture of the processor:RO0xc
15:4PARTNO0xC = ARMv6-M architecture. : Number of processor within family: 0xC60 = Cortex-M0+RO0xc60
3:0REVISION: Minor revision number m in the rnpm revision status: 0x1 = Patch 1.RO0x1
Table 105. ICSR BitsDescriptionTypeReset
Register 31NMIPENDSET: Setting this bit will activate an NMI. Since NMI is the highest priority exception, it will activate as soon as it is registered.RW0x0

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

BitsDescriptionTypeReset
30:29Reserved.--
28PENDSVSET : 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.
RW0x0
27PENDSVCLR : PendSV clear-pending bit.
Write:
0 = No effect.
1 = Removes the pending state from the PendSV exception.
RW0x0
26PENDSTSET : 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.
RW0x0
25PENDSTCLR : 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.
RW0x0
24Reserved.--
23ISRPREEMPT : 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.RO0x0
22ISRPENDING : External interrupt pending flagRO0x0
21Reserved.--
20:12VECTPENDING : 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.RO0x000
11:9Reserved.--
8:0VECTACTIVE : Active exception number field. Reset clears the VECTACTIVE field.RO0x000

M0PLUS: VTOR Register

Offset: 0xed08

Description

The VTOR holds the vector table offset address.

Table 106. VTOR Register

BitsDescriptionTypeReset
31:8TBLOFF : Bits [31:8] of the indicate the vector table offset address.RW0x000000
7:0Reserved.--

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

BitsDescriptionTypeReset
31:16VECTKEY : Register key:
Reads as Unknown
On writes, write 0x05FA to VECTKEY, otherwise the write is ignored.
RW0x0000
15ENDIANESS : Data endianness implemented:
0 = Little-endian.
RO0x0
14:3Reserved.--
2SYSRESETREQ : 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.RW0x0
1VECTCLRACTIVE : 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.RW0x0
0Reserved.--

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

BitsDescriptionTypeReset
31:5Reserved.--
BitsDescriptionTypeReset
4SEVONPEND : 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.
RW0x0
3Reserved.--
2SLEEPDEEP : Controls whether the processor uses sleep or deep sleep as its low power mode:
0 = Sleep.
1 = Deep sleep.
RW0x0
1SLEEPONEXIT : 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.
RW0x0
0Reserved.--

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

BitsDescriptionTypeReset
31:10Reserved.--
9STKALIGN : 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.RO0x0
8:4Reserved.--
3UNALIGN_TRP : Always reads as one, indicates that all unaligned accesses generate a HardFault.RO0x0
2:0Reserved.--

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

BitsDescriptionTypeReset
31:30PRI_11 : Priority of system handler 11, SVCallRW0x0
29:0Reserved.--

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

BitsDescriptionTypeReset
31:30PRI_15 : Priority of system handler 15, SysTickRW0x0
29:24Reserved.--
23:22PRI_14 : Priority of system handler 14, PendSVRW0x0
21:0Reserved.--

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

BitsDescriptionTypeReset
31:16Reserved.--
15SVCALLPENDE : Reads as 1 if SVCall is Pending. Write 1 to set pending SVCall, write 0 to clear pending SVCall.RW0x0
14:0Reserved.--

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

BitsDescriptionTypeReset
31:24Reserved.--
23:16IREGION : Instruction region. Reads as zero as ARMv6-M only supports a unified MPU.RO0x00
15:8DREGION : Number of regions supported by the MPU.RO0x08
7:1Reserved.--
BitsDescriptionTypeReset
0SEPARATE : Indicates support for separate instruction and data address maps. Reads as 0 as ARMv6-M only supports a unified MPU.RO0x0

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

BitsDescriptionTypeReset
31:3Reserved.--
2PRIVDEFENA : 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.
RW0x0
1HFNMIENA : 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.
RW0x0
0ENABLE : Enables the MPU. If the MPU is disabled, privileged and unprivileged accesses use the default memory map.
0 = MPU disabled.
1 = MPU enabled.
RW0x0

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

BitsDescriptionTypeReset
31:4Reserved.--
3:0REGION : 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.
RW0x0

M0PLUS: MPU_RBAR Register

Offset: 0xed9c

Description

Read 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

BitsDescriptionTypeReset
31:8ADDR: Base address of the region.RW0x000000
7:5Reserved.--
4VALID: 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.
RW0x0
3:0REGION: 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.RW0x0
M0PLUS: MPU_RASR Register

Offset: 0xeda0

Description

Use 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

BitsDescriptionTypeReset
31:16ATTRS: 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
RW0x0000
15:8SRD: Subregion Disable. For regions of 256 bytes or larger, each bit of this field controls whether one of the eight equal subregions is enabled.RW0x00
7:6Reserved.--
5:1SIZE: Indicates the region size. Region size in bytes = \( 2^{(SIZE+1)} \) . The minimum permitted value is 7 (b00111) = 256BytesRW0x00
0ENABLE: Enables the region.RW0x0