EasyManua.ls Logo

ARM Cortex-M3 User Manual

ARM Cortex-M3
410 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #67 background imageLoading...
Page #67 background image
Programmer’s Model
ARM DDI 0337G Copyright © 2005-2008 ARM Limited. All rights reserved. 2-19
Unrestricted Access Non-Confidential
Load register exclusive calculates an address from a base
register value and an immediate offset, loads a word from
memory, writes it to a register
LDREX<c> <Rt>,[<Rn>{,#<imm>}]
Load register exclusive halfword calculates an address from a
base register value and an immediate offset, loads a halfword
from memory, writes it to a register
LDREXH<c> <Rt>,[<Rn>{,#<imm>}]
Load register exclusive byte calculates an address from a base
register value and an immediate offset, loads a byte from
memory, writes it to a register
LDREXB<c> <Rt>,[<Rn>{,#<imm>}]
Memory halfword [15:0] from base register address +
immediate 12-bit offset
LDRH.W <Rxf>, [<Rn>, #<offset_12>]
Memory halfword [15:0] from base register address immediate
8-bit offset, preindexed
LDRH.W <Rxf>, [<Rn>, #<+/–<offset_8>]
!
Memory halfword [15:0] from base register address immediate
8-bit offset, postindexed
LDRH.W <Rxf>. [<Rn>], #+/-<offset_8>
Memory halfword [15:0] from register address shifted left by
0, 1, 2, or 3 places
LDRH.W <Rxf>, [<Rn>, <Rm>{, LSL #<shift>}]
Memory halfword from PC address immediate 12-bit offset
LDRH.W <Rxf>, [PC, #+/–<offset_12>]
Memory signed byte [7:0] from base register address +
immediate 12-bit offset
LDRSB.W <Rxf>, [<Rn>, #<offset_12>]
Memory signed byte [7:0] from base register address
immediate 8-bit offset, postindexed
LDRSB.W <Rxf>. [<Rn>], #+/-<offset_8>
Memory signed byte [7:0] from base register address
immediate 8-bit offset, preindexed
LDRSB.W <Rxf>, [<Rn>, #<+/–<offset_8>]
!
Memory signed byte [7:0] from register address shifted left by
0, 1, 2, or 3 places
LDRSB.W <Rxf>, [<Rn>, <Rm>{, LSL #<shift>}]
Memory signed byte from PC address immediate 12-bit offset
LDRSB.W <Rxf>, [PC, #+/–<offset_12>]
Memory signed halfword [15:0] from base register address +
immediate 12-bit offset
LDRSH.W <Rxf>, [<Rn>, #<offset_12>]
Memory signed halfword [15:0] from base register address
immediate 8-bit offset, postindexed
LDRSH.W <Rxf>. [<Rn>], #+/-<offset_8>
Table 2-5 32-bit Cortex-M3 instruction summary (continued)
Operation Assembler

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the ARM Cortex-M3 and is the answer not in the manual?

ARM Cortex-M3 Specifications

General IconGeneral
ArchitectureARMv7-M
Instruction SetThumb-2
Pipeline Stages3-stage
InterruptsNested Vectored Interrupt Controller (NVIC)
Interrupt ControllerNested Vectored Interrupt Controller (NVIC)
Memory Protection UnitOptional
Power ConsumptionVaries by implementation
Max Clock SpeedUp to 100 MHz
DebuggingJTAG and Serial Wire Debug (SWD)
Operating Voltage1.8V to 3.6V
Manufacturing ProcessVaries by implementation
Core Type32-bit

Summary

Introduction

About the processor

Describes the Cortex-M3 processor's low-power features, ARMv7-M architecture, and core components.

Components, hierarchy, and implementation

Details the processor's components, hierarchy, and implementation options, including core, NVIC, bus matrix, etc.

Product revisions

Summarizes functional differences between processor releases like r0p0, r1p0, r1p1, and r2p0.

Programmer’s Model

About the programmer’s model

Explains the ARMv7-M architecture implementation, including Thumb instructions and operating states.

Registers

Details the processor's 32-bit registers, including general-purpose, stack pointers, PC, and xPSR.

Memory formats

Describes how the processor views memory and its support for little-endian and big-endian data formats.

System Control

Summary of processor registers

Lists and describes registers controlling processor functionality, including NVIC, Core Debug, and System Debug.

Core debug registers

Provides a summary of registers for core debug operations via AHB-AP or internal PPB.

System debug registers

Lists registers for Flash Patch and Breakpoint (FPB) and Data Watchpoint and Trace (DWT) units.

Memory Map

About the memory map

Shows the processor's fixed memory map, including vendor-specific regions, external RAM, and peripheral spaces.

Bit-banding

Explains the bit-band regions in SRAM and Peripheral memory, and the mapping formula for accessing bits.

Exceptions

About the exception model

Describes how the processor and NVIC prioritize and handle exceptions, including state saving and tail-chaining.

Exception types

Details various exception types like Reset, NMI, Hard Fault, Memory Management, Bus Fault, and Usage Fault.

Privilege and stacks

Explains processor support for two stacks (main/process) and privilege levels for Thread and Handler modes.

Clocking and Resets

Clocking

Describes the three functional clock inputs: FCLK, HCLK, and DAPCLK, and their domains.

Resets

Lists the processor reset inputs: PORESETn, SYSRESETn, SYSRESETREQ, and DAPRESETn.

Cortex-M3 reset modes

Shows reset signals, combinations, and applications for power-on, system, and SWJ-DP reset modes.

Power Management

About power management

Explains processor use of gated clocks and system sleep modes for power reduction.

System power management

Details supported sleep modes (Sleep-now, Sleep-on-exit, Deep-sleep) controlled by the System Control Register.

SLEEPING

Describes how the SLEEPING signal gates the HCLK clock for processor power reduction.

Nested Vectored Interrupt Controller

About the NVIC

Explains NVIC's role in low-latency exception handling, power management, and System Control Registers.

NVIC register map

Lists NVIC registers and their addresses within the System Control Space.

Interrupt Set-Enable Registers

Details enabling interrupts and determining currently enabled ones via Set-Enable Registers.

Memory Protection Unit

About the MPU

Describes MPU for memory protection, supporting regions, permissions, and attributes.

MPU programmer’s model

Summarizes and describes MPU registers, including Type, Control, and Region registers.

MPU access permissions

Explains access permission bits (TEX, C, B, AP, XN) controlling access to memory regions.

Core Debug

About core debug

Explains core debug access via debug registers through AHB-AP or internal PPB.

Core debug registers

Lists registers for debug operations, including Debug Halting Control and Status Register.

Halt mode debugging

Details halting the core using C_DEBUGEN and C_HALT bits in the Debug Halting Control and Status Register.

System Debug

About system debug

Introduces system debug components like FPB, DWT, ITM, and ETM for debug, trace, and profiling.

System debug access

Explains debug access via AHB-AP, driven by SW-DP or SWJ-DP components.

FPB

Describes the Flash Patch and Breakpoint (FPB) unit for implementing hardware breakpoints and code patches.

Bus Interface

About bus interfaces

Details the processor's four bus interfaces: ICode, DCode, System, and External Private Peripheral Bus (PPB).

ICode bus interface

Explains the ICode interface, a 32-bit AHB-Lite bus for instruction fetches and vector fetches.

DCode bus interface

Describes the DCode interface, a 32-bit AHB-Lite bus for data and debug accesses to Code memory space.

Debug Port

About the DP

Explains the Debug Port (DP) as an AHB-AP interface for debug accesses, supporting SWJ-DP or SW-DP.

Embedded Trace Macrocell

About the ETM

Introduces the Embedded Trace Macrocell (ETM) as an optional component for program execution reconstruction.

ETM resources

Lists ETM resources on Cortex-M3, including architecture version, comparators, and FIFO size.

ETM programmer’s model

Details the ETM programmer's model, APB interface, and registers like ETM Control and Configuration Code.

Embedded Trace Macrocell Interface

About the ETM interface

Explains the ETM interface for connecting an ETM to the processor for instruction trace.

CPU ETM interface port descriptions

Describes ETM interface ports like ETMIVALID, ETMIBRANCH, and ETMINTSTAT for execution sequence.

AHB Trace Macrocell Interface

About the AHB trace macrocell interface

Describes the AHB trace macrocell (HTM) interface for connecting an AHB trace macrocell for data trace.

Trace Port Interface Unit

About the TPIU

Introduces the Trace Port Interface Unit (TPIU) as a bridge for trace data from ETM/ITM to a Trace Port Analyzer.

TPIU registers

Summarizes TPIU registers including Sync Port Sizes, Async Clock Prescaler, and Formatter registers.

Formatter and Flush Status Register

Describes the Formatter and Flush Status Register for reading the status of the TPIU formatter.

Instruction Timing

About instruction timing

Explains the role of system architecture in instruction timing and factors influencing it.

Processor instruction timings

Provides cycle information for Thumb subset instructions, including data operations, branches, and load-stores.

AC Characteristics

Processor timing parameters

Details input and output port timing parameters as percentages of the processor clock cycle.

Input and output port timing parameters

Lists timing parameters for miscellaneous, low power, interrupt, AHB, PPB, debug, and ETM ports.

Signal Descriptions

Clocks

Lists and describes the clock signals: HCLK, FCLK, and DAPCLK.

Resets

Lists and describes the reset signals: PORESETn, SYSRESETn, SYSRESETREQ, and DAPRESETn.

Miscellaneous

Describes miscellaneous signals like LOCKUP, CURRPRI, HALTED, DBGRESTARTED, TXEV, TRCENA, INTERNALSTATE, BIGEND, EDBGRQ.

Revisions

Differences between issue E and issue F

Lists technical changes between issue E and issue F of the manual.

Glossary

Abort

Defines abort as a mechanism indicating an invalid memory access or invalid data return.

Advanced High-performance Bus (AHB)

Describes AHB as a bus protocol with a fixed pipeline for address/control and data phases.

Related product manuals