Unit-4 MCES
Unit-4 MCES
Features:
A Nested Vectored Interrupt Controller (NVIC) closely integrated
with the processor core to achieve low latency interrupt processing.
Multiple high-performance bus interfaces.
A low-cost debug solution with the optional ability to:
o Implement breakpoints and code patches.
o Implement watchpoints, tracing, and system profiling.
o Support printf() style debugging.
o Bridge to a Trace Port Analyzer (TPA).
An optional Memory Protection Unit (MPU).
Memory
Access
Instructions
Offset,
Pre-Index,
and
Post-Index
IA, IB,
DA, DB
!
General
Data
Processing
Instructions
If S is
specified,
these
instructions
update the
N, Z, C & V
flags
according to
the result.
V.Vijayaraghavan, Assistant Professor-ECE, VFSTR, Guntur
ARM Cortex-M3….. Instruction Set
Multiply and Divide Instructions
Saturating Instructions
60 + 30 → 90.
60 + 43 → 100. (not the expected 103.)
(60 + 43) − (75 + 75) → 0. (not the expected −47.) (100 − 100 → 0.)
10 × 11 → 100. (not the expected 110.)
99 × 99 → 100. (not the expected 9801.)
30 × (5 − 1) → 100. (not the expected 120.) (30 × 4 → 100.)
(30 × 5) − (30 × 1) → 70. (not the expected 120. not the previous 100.) (100
− 30 → 70.)
LDR <Rd>, [<Rn>, <Rm>] Load memory word from base register address + register offset
LDRB <Rd>, [<Rn>, <Rm>] Load memory byte [7:0] from register address + register offset
LDRH <Rd>, [<Rn>, <Rm>] Load halfword [15:0] from register address + register offset
LDRSB <Rd>, [<Rn>, <Rm>] Load signed byte [7:0] from register address + register offset
LDRSH <Rd>, [<Rn>, <Rm>] Load signed halfword [15:0] from register address + register offset
STRB <Rd>, [<Rn>, <Rm>] Store register byte [7:0] to register address
STRH <Rd>, [<Rn>, <Rm>] Store register halfword [15:0] to register address + register offset
STMIA <Rn>!, <registers> Store multiple register words to sequential memory locations
ADC <Rd>, <Rm> Add register value and C flag to register value
ADD <Rd>, PC, #<im_8> * 4 Add 4* (immediate 8-bit value) with PC to register
ADD <Rd>, SP, #<im_8> * 4 Add 4* (immediate 8-bit value) with SP to register
SUB <Rd>, #<immed_8> Subtract immediate 8-bit value from register value
SBC <Rd>, <Rm> Subtract register value and C flag from register value
MOV <Rd>, <Rm> Move high or low register value to high or low register
Arnold S. Berger, An introduction to Processes, Tools and Techniques, CMP books, 2005.
Frank Vahid and Tony Givargis, Embedded System Design: A Unified Hardware/Software
Introduction, John Wiley & Sons, Student edition, 2006.