The ARM Cortex-M3 Processor Architecture Part-1
The ARM Cortex-M3 Processor Architecture Part-1
Architecture Part-1
Cortex-M3 Processor
Cortex-M3 Registers
ARM Holdings
The company designs ARM-based processors;
Does not manufacture, but licenses designs to semiconductor partners who add their
own Intellectual Property (IP) on top of ARM’s IP, fabricate and sell to customers;
Also offer other IP apart from processors, such as physical IPs, interconnect IPs,
graphics cores, and development tools.
IP libraries SoC
Cortex-A9 Cortex-R5 Cortex-M3 ARM
ROM RAM
processor
ARM7 ARM9 ARM11
System bus ARM-based
DRAM ctrl FLASH ctrl SRAM ctrl SoC
Peripherals
AXI bus AHB bus APB bus
Smaller code
Lower silicon costs
Ease of use
Faster software development and reuse
Embedded applications
Smart metering, human interface devices, automotive and industrial control systems,
white goods, consumer products and medical instrumentation
As of Dec 2013
As of Dec 2013
ARM University Program
Copyright © ARM Ltd 2013 8
ARM Cortex-M Series Family
ARM Core Hardware Hardware Saturated DSP Floating
Processor Thumb® Thumb®-2
Architecture Architecture Multiply Divide Math Extensions Point
Von 1 or 32
Cortex-M0 ARMv6-M Most Subset No No No No
Neumann cycle
Von 1 or 32
Cortex-M0+ ARMv6-M Most Subset No No No No
Neumann cycle
Von 3 or 33
Cortex-M1 ARMv6-M Most Subset No No No No
Neumann cycle
Cortex-M4 ARMv7E-M Harvard Entire Entire 1 cycle Yes Yes Yes Optional
Enhanced Determinism
The critical tasks and interrupt routines can be served quickly in a known number of
cycles
Lower Cost
Reduced 32-bit-based system cost, close to those legacy 8-bit and 16-bit devices (e.g.
can be priced at less than $1)
Instruction set
Include the entire Thumb®-1 (16-bit) and Thumb®-2 (16/ 32-bit) instruction sets
3-stage pipeline
Performance efficiency
1.25 – 1.89 DMIPS/MHz (Dhrystone Million Instructions Per Second / MHz)
Supported Interrupts
Non-maskable Interrupt (NMI) + 1 to 240 physical interrupts
8 to 256 interrupt priority levels
Trace interface
Interrupt Controller
Register
Instruction
Instruction
Fetch unit
Nested Vector
decoder
bank
Debug
(NVIC) ALU
Subsystem
Bus interconnect
Time
Debug subsystem
Handles debug control, program breakpoints, and data watchpoints
When a debug event occurs, it can put the processor core in a halted state, where
developers can analyse the status of the processor at that point, such as register
values and flags
Cortex-M3 registers
Register bank
Sixteen 32-bit registers (thirteen are used for general-purpose);
Special registers
R5
General purpose
R6
register
R7
R8
R9
R10 High
Registers
R11
R12 MSP
Stack Pointer (SP) R13(banked) Main Stack Pointer
Special registers Program Status Registers (PSR) x PSR APSR EPSR IPSR
PRIMASK Application Execution Interrupt
PSR PSR PSR
Interrupt mask register FAULTMASK
BASEPRI
Stack definition CONTROL
Current PC Current LR
PC LR
1. Save current Main Main
PC to LR Program Program
Code region
Code region
LR
address in LR to
return to the
2. Load PC with main program
the starting
address of the
subroutine subroutine
subroutine Current PC
PC
APSR NZ CV Q Reserved
IPSR
ISR number – current executing interrupt service routine number
EPSR
T: Thumb state – always one since Cortex-M3 only supports the Thumb state (more on
processor states in the next module)
IC/IT: Interrupt-Continuable Instruction (ICI) bit, IF-THEN instruction status bit
1-bit FAULTMASK
Set to one will block all the interrupts apart from NMI
1-bit BASEPRI
Set to one will block all interrupts of the same or lower level (only allow for interrupts with
higher priorities)
PRIMASK
PRIMASK Reserved
FAULTMASK
FAULTMASK Reserved
BASEPRI
BASEPRI Reserved
CONTROL Reserved
Reference2
ARM v7-M Architecture Reference Manual:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0403c/index.html
Reference3
Cortex-M3 Technical Reference Manual:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337i/index.html
Reference4
Cortex-M3 Devices Generic User Guide:
http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/DUI0552A_cortex_m3_dgug.pdf