ARM CORTEX PROCESSOR
Gaurav Verma
A i P fAssistant Professor
Department of Electronics and Communication Engineering
Jaypee Institute of Information and TechnologyJ yp gy
Sector-62, Noida, Uttar Pradesh, India.
il @jii i ii k @ il
1
Email: gaurav.verma@jiit.ac.in, gaurav.iitkg@gmail.com
WHY CORTEX?
G t f ffi i ll i k t b d ith tGreater performance efficiency: allowing more work to be done without
increasing the frequency or power requirements.
Low power consumption: enabling longer battery life, especially criticalLow power consumption: enabling longer battery life, especially critical
in portable products including wireless networking applications.
Enhanced determinism: guaranteeing that critical tasks and interruptsg g p
are serviced as quickly as possible and in a known number of cycles.
Ease of use: providing easier programmability and debugging for the
b f b d b bgrowing number of 8-bit and 16-bit users migrating to 32 bits.
Lower cost solutions: reducing 32-bit-based system costs close to those
of legacy 8 bit and 16 bit devices and enabling low end 32 bitof legacy 8-bit and 16-bit devices and enabling low-end, 32-bit
microcontrollers to be priced at less than US$1 for the first time.
Wide choice of development tools: from low-cost or free compilers to
2
f p p
full-featured development suites from many development tool
vendors
My Processor belongs to which
architecturearchitecture
3
ARM Architecture road map
4
Processor vs MCU
Focus todayy
5
CORTEX M3 CORE
6
CORTEX M3
7
Features of ARM CORTEX M3 Processor
Harvard bus architectureHarvard bus architecture
–3-stage pipeline with branch speculation
Configurable nested vectored interrupt controller (NVIC)
Wake-up Interrupt Controller (WIC)
–Enables ultra low-power standby operation
Extended configurability of debug and trace capabilitiesg y g p
–More flexibility for meeting specific market requirements
Optional components for specific market reqs.
M P t ti U it (MPU)–Memory Protection Unit (MPU)
–EmbeddedTrace Macrocell™(ETM™)
Support for fault robust implementations via configurable observation
interface
–EC61508 standard SIL3 certification
Physical IP support
8
y pp
–Power Management Kit™(PMK) + low-power standard cell libraries and
memories enable0.18μm Ultra-Low Leakage (ULL) process
ARM Cortex Pipeline
H d h S I D b blHarvard architecture- Separate Instruction & Data buses, enable
parallel fetch & store, Advanced 3-Stage Pipeline Includes Branch
Forwarding & Speculation,AdditionalWrite-Back via Bus Matrix.Forwarding & Speculation,AdditionalWrite Back via Bus Matrix.
9
10
CPU Registers
• There are 16 registers, which are of 32 bit wide.
• Register R0-R12 are general purpose registers.
• Register R13 is used as the stack pointer• Register R13 is used as the stack pointer.
• There are two stacks i.e. main stack and process stack depends
upon in which mode the processor is working.
• R14 is the link register, which is used to store the return address
of procedure call. For nested calls the compiler will
automatically store the R14 on the stack.
• R15 is the normal program counter.
11
Program Status Register: XPSR
12
APSRAPSR
13
IPSR
14
EPSR
15
EPSR
16
CPU Operating Modes
17
18
Thumb-2 Instruction Set
19
Thumb-2 Instruction Set
20
Memory Map
21
Memory Map Continue..
22
Memory Map Continue..y p
23
Unaligned Memory Accessg y
24
Bit Bandingg
25
26
27
28
Accessing of Bit Band & Alias Regiong g
29
Read ModifyWriteVs Bit Bandingy g
30
SystemTimer (SysTick)Syste e (Sys c )
31
SysTick Control & Status Registery g
32
SysTick ReloadValue Registery g
33
SysTick CurrentValue Register
SysTick Usage
34
ARM7 vs ARM CORTEX INTERRUPTARM7 vs ARM CORTEX INTERRUPT
HANDLING
35
Features Description of NVIC
N d V d I C ll (NVIC) d h hNested Vectored Interrupt Controller (NVIC) integrated with the
processor for low latency
Configurable number 1 to 240 of external interrupts–Configurable number, 1 to 240, of external interrupts
–Configurable number, 3 to 8, of bits of priority.
–Dynamic reprioritization of interruptsDynamic reprioritization of interrupts.
–Priority grouping. This allows selection of pre-empting
interrupt levels and non pre-empting interrupt levelsp p p g p
–Support for tail-chaining, and late arrival, of interrupts. This
enables back-to-back interrupt processing without the
overhead of state saving and restoration between interrupts
–Processor state automatically saved on interrupt entry, and
restored on interrupt exit with no instruction overhead
36
restored on interrupt exit, with no instruction overhead.
37
NVIC Operation Exception Entry & Exitp p y
38
Interrupt PreemptionInterrupt Preemption
39
Tail Chaining
40
Tail Chainingg
41
Late Arrival
42
NVIC Configuration & Use
43
NVIC Configuration & Use
44
45
46
System Handler Priority Register 1
47
System Handler Priority Register 2
System Handler Priority Register 3
48
NVIC Registers
49
Interrupt Set Enable Registers
50
Interrupt Clear Enable Registers
51
Interrupt Set Pending Registers
52
Interrupt Clear Pending Registers
53
Interrupt Active Bit Registers
54
Interrupt Priority Registers
55
Interrupt Priority Registers
56
Application Interrupt and Reset Control Register
57
58
59
Usage and application
60
SoftwareTrigger Interrupt Registers
61
Level Sensitive and Pulse Interrupts
62
Hardware & Software Control
63
Hardware & Software Control
64
Entering Low Power Modes
65
Entering Low Power Modes
66

ARM CORTEX M3 PPT