ARM® Cortex®‑M3 Processor Technical Reference Manual Cortex M3

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 122

DownloadARM® Cortex®‑M3 Processor Technical Reference Manual Cortex-M3
Open PDF In BrowserView PDF
ARM® Cortex®-M3 Processor
Revision: r2p1

Technical Reference Manual

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
ARM 100165_0201_00_en

ARM® Cortex®-M3 Processor

ARM® Cortex®-M3 Processor
Technical Reference Manual
Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Release Information

Document History
Issue

Date

Confidentiality Change

A

15 December 2005 Confidential

B

13 January 2006

Non-Confidential Confidentiality status amended

C

10 May 2006

Non-Confidential First Release for r1p0

D

27 September 2006 Non-Confidential First Release for r1p1

E

13 June 2007

Non-Confidential Minor update with no technical changes

F

11 April 2008

Confidential

G

26 June 2008

Non-Confidential First Release for r2p0

H

26 February 2010

Non-Confidential Second Release for r2p0

I

07 July 2010

Non-Confidential First Release for r2p1

0201-00 24 February 2015

First Release

Limited release for SC300 r0p0

Non-Confidential Document source updated to comply with DITA standards.
Document number changed to 100165. DITA-XML.

Non-Confidential Proprietary Notice
This document is protected by copyright and other related rights and the practice or implementation of the information contained in
this document may be protected by one or more patents or pending patent applications. No part of this document may be
reproduced in any form by any means without the express prior written permission of ARM. No license, express or implied, by
estoppel or otherwise to any intellectual property rights is granted by this document unless specifically stated.
Your access to the information in this document is conditional upon your acceptance that you will not use or permit others to use
the information for the purposes of determining whether implementations infringe any third party patents.
THIS DOCUMENT IS PROVIDED “AS IS”. ARM PROVIDES NO REPRESENTATIONS AND NO WARRANTIES,
EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTABILITY, SATISFACTORY QUALITY, NON-INFRINGEMENT OR FITNESS FOR A PARTICULAR
PURPOSE WITH RESPECT TO THE DOCUMENT. For the avoidance of doubt, ARM makes no representation with respect to,
and has undertaken no analysis to identify or understand the scope and content of, third party patents, copyrights, trade secrets, or
other rights.
This document may include technical inaccuracies or typographical errors.
TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL ARM BE LIABLE FOR ANY DAMAGES,
INCLUDING WITHOUT LIMITATION ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR
CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING
OUT OF ANY USE OF THIS DOCUMENT, EVEN IF ARM HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
This document consists solely of commercial items. You shall be responsible for ensuring that any use, duplication or disclosure of
this document complies fully with any relevant export laws and regulations to assure that this document or any portion thereof is
not exported, directly or indirectly, in violation of such export laws. Use of the word “partner” in reference to ARM’s customers is
not intended to create or refer to any partnership relationship with any other company. ARM may make changes to this document at
any time and without notice.
If any of the provisions contained in these terms conflict with any of the provisions of any signed written agreement covering this
document with ARM, then the signed written agreement prevails over and supersedes the conflicting provisions of these terms.
This document may be translated into other languages for convenience, and you agree that if there is any conflict between the
English version of this document and any translation, the terms of the English version of the Agreement shall prevail.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

2

ARM® Cortex®-M3 Processor
Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM Limited or its affiliates in the EU and/or
elsewhere. All rights reserved. Other brands and names mentioned in this document may be the trademarks of their respective
owners. Please follow ARM’s trademark usage guidelines at http://www.arm.com/about/trademark-usage-guidelines.php
Copyright © [2005-2008, 2010, 2015], ARM Limited or its affiliates. All rights reserved.
ARM Limited. Company 02557590 registered in England.
110 Fulbourn Road, Cambridge, England CB1 9NJ.
LES-PRE-20349
Confidentiality Status
This document is Non-Confidential. The right to use, copy and disclose this document may be subject to license restrictions in
accordance with the terms of the agreement entered into by ARM and the party that ARM delivered this document to.
Unrestricted Access is an ARM internal classification.
Product Status
The information in this document is Final, that is for a developed product.
Web Address
http://www.arm.com

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

3

Contents
ARM® Cortex®-M3 Processor Technical Reference
Manual

Preface
About this book ...................................................... ...................................................... 7
Feedback .................................................................................................................... 10

Chapter 1

Introduction
1.1
1.2
1.3
1.4
1.5
1.6

Chapter 2

Functional Description
2.1
2.2
2.3

Chapter 3

About the functions .................................................................................................. 2-22
Processor features list .............................................. .............................................. 2-23
Interfaces ........................................................ ........................................................ 2-25

Programmers Model
3.1
3.2
3.3
3.4

ARM 100165_0201_00_en

About the processor ................................................ ................................................ 1-12
Processor features list .............................................. .............................................. 1-13
External interfaces ................................................. ................................................. 1-14
Optional implementation components .................................. .................................. 1-15
Product documentation ............................................................................................ 1-16
Product revisions .................................................. .................................................. 1-19

About the programmers’ model ....................................... ....................................... 3-29
Modes of operation and execution ..................................... ..................................... 3-30
Instruction set summary ............................................. ............................................. 3-31
Processor memory model ........................................................................................ 3-37

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

4

Chapter 4

3.5

Write buffer .............................................................................................................. 3-40

3.6
3.7
3.8
3.9

Exclusive monitor .................................................. .................................................. 3-41
Bit-banding ....................................................... ....................................................... 3-42
Processor core register summary ............................................................................ 3-44
Exceptions ....................................................... ....................................................... 3-46

System Control
4.1
4.2
4.3
4.4

Chapter 5

About the TPIU .................................................................................................... 11-104
TPIU functional description .................................................................................. 11-105
TPIU programmers model ......................................... ......................................... 11-107

Revisions
A.1

ARM 100165_0201_00_en

About the ETM ................................................... ................................................... 10-81
ETM functional description .................................................................................... 10-82
ETM Programmers model .......................................... .......................................... 10-88

Trace Port Interface Unit
11.1
11.2
11.3

Appendix A

ITM functional description ........................................................................................ 9-77
ITM programmers’ model ............................................ ............................................ 9-78
ITM Trace Privilege Register, ITM_TPR .................................................................. 9-79

Embedded Trace Macrocell
10.1
10.2
10.3

Chapter 11

DWT functional description ...................................................................................... 8-73
DWT Programmers’ model ...................................................................................... 8-74

Instrumentation Trace Macrocell Unit
9.1
9.2
9.3

Chapter 10

Debug configuration ................................................ ................................................ 7-63
AHB-AP debug access port .......................................... .......................................... 7-67
Flash Patch and Breakpoint Unit (FPB) ................................. ................................. 7-70

Data Watchpoint and Trace Unit
8.1
8.2

Chapter 9

NVIC functional description .......................................... .......................................... 6-59
NVIC programmers’ model ...................................................................................... 6-60

Debug
7.1
7.2
7.3

Chapter 8

About the MPU ........................................................................................................ 5-55
MPU functional description ...................................................................................... 5-56
MPU programmers model table ....................................... ....................................... 5-57

Nested Vectored Interrupt Controller
6.1
6.2

Chapter 7

4-49
4-51
4-52
4-53

Memory Protection Unit
5.1
5.2
5.3

Chapter 6

System control registers ..........................................................................................
Auxiliary Control Register, ACTLR ..........................................................................
CPUID Base Register, CPUID ........................................ ........................................
Auxiliary Fault Status Register, AFSR .................................. ..................................

Revisions .................................................. .................................................. Appx-A-117

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

5

Preface

This preface introduces the ARM® Cortex®-M3 Processor Technical Reference Manual.
It contains the following:
• About this book on page 7.
• Feedback on page 10.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

6

Preface
About this book

About this book
This book contains documentation for the Cortex-M3 processor, describing the programmers model,
instructions, registers, memory map, cache and debug support. Components include ETM, MPU, NVIC,
FPB, DWT, ITM, AHB, and TPIU.
Product revision status
The rmpn identifier indicates the revision status of the product described in this book, for example, r1p2,
where:
rm Identifies the major revision of the product, for example, r1.
pn Identifies the minor revision or modification status of the product, for example, p2.
Intended audience
This manual is written to help system designers, system integrators, verification engineers, and software
programmers who are implementing a System-on-Chip (SoC) device based on the Cortex®-M3 processor.
Using this book
This book is organized into the following chapters:
Chapter 1 Introduction
This chapter introduces the processor and processor instruction set.
Chapter 2 Functional Description
This chapter introduces the processor and its external interfaces.
Chapter 3 Programmers Model
This chapter describes the processor programmers model.
Chapter 4 System Control
This chapter provides a summary of the system control registers whose implementation is specific
to the Cortex-M3 processor.
Chapter 5 Memory Protection Unit
This chapter describes the processor Memory Protection Unit (MPU).
Chapter 6 Nested Vectored Interrupt Controller
This chapter describes the Nested Vectored Interrupt Controller (NVIC). The NVIC provides
configurable interrupt handling abilities to the processor, facilitates low- latency exception and
interrupt handling, and controls power management.
Chapter 7 Debug
This chapter describes how to debug and test software running on the processor.
Chapter 8 Data Watchpoint and Trace Unit
This chapter describes the Data Watchpoint and Trace (DWT) unit.
Chapter 9 Instrumentation Trace Macrocell Unit
This chapter describes the Instrumentation Trace Macrocell (ITM) unit.
Chapter 10 Embedded Trace Macrocell
This chapter describes the Embedded Trace Macrocell (ETM).
Chapter 11 Trace Port Interface Unit
This chapter describes the Trace Port Interface Unit (TPIU) specific to this processor.
Appendix A Revisions
The technical changes between released issues of this book.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

7

Preface
About this book

Glossary
The ARM Glossary is a list of terms used in ARM documentation, together with definitions for those
terms. The ARM Glossary does not contain terms that are industry standard unless the ARM meaning
differs from the generally accepted meaning.
See the ARM Glossary for more information.
Typographic conventions
italic
Introduces special terminology, denotes cross-references, and citations.
bold
Highlights interface elements, such as menu names. Denotes signal names. Also used for terms
in descriptive lists, where appropriate.
monospace

Denotes text that you can enter at the keyboard, such as commands, file and program names,
and source code.
monospace

Denotes a permitted abbreviation for a command or option. You can enter the underlined text
instead of the full command or option name.
monospace italic

Denotes arguments to monospace text where the argument is to be replaced by a specific value.
monospace bold

Denotes language keywords when used outside example code.


Encloses replaceable terms for assembler syntax where they appear in code or code fragments.
For example:
MRC p15, 0 , , , 
SMALL CAPITALS

Used in body text for a few terms that have specific technical meanings, that are defined in the
ARM glossary. For example, IMPLEMENTATION DEFINED, IMPLEMENTATION SPECIFIC, UNKNOWN, and
UNPREDICTABLE.
Timing diagrams
The following figure explains the components used in timing diagrams. Variations, when they occur,
have clear labels. You must not assume any timing information that is not explicit in the diagrams.
Shaded bus and signal areas are undefined, so the bus or signal can assume any value within the shaded
area at that time. The actual level is unimportant and does not affect normal operation.
Clock
HIGH to LOW
Transient
HIGH/LOW to HIGH
Bus stable
Bus to high impedance
Bus change
High impedance to stable bus

Figure 1 Key to timing diagram conventions

Signals
The signal conventions are:
ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

8

Preface
About this book

Signal level
The level of an asserted signal depends on whether the signal is active-HIGH or active-LOW.
Asserted means:
• HIGH for active-HIGH signals.
• LOW for active-LOW signals.
Lower-case n
At the start or end of a signal name denotes an active-LOW signal.
Additional reading
This book contains information that is specific to this product. See the following documents for other
relevant information.
ARM publications
• ARMv7-M Architecture Reference Manual (ARM DDI 0403).
• ARM® Cortex-M3 Integration and Implementation Manual (ARM DII 0240).
• ARM AMBA® 3 AHB-Lite Protocol (v1.0) (ARM IHI 0033).
• ARM AMBA 3 APB Protocol Specification (ARM IHI 0024).
• AMBA 3 ATB Protocol Specification (ARM IHI 0032).
• ARM CoreSight™ Components Technical Reference Manual (ARM DDI 0314).
• ARM Debug Interface v5 Architecture Specification (ARM IHI 0031).
• ARM Embedded Trace Macrocell Architecture Specification (ARM IHI 0014).
Other publications
This section lists relevant documents published by third parties:
• IEEE Standard Test Access Port and Boundary-Scan Architecture 1149.1-2001 (JTAG).

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

9

Preface
Feedback

Feedback
Feedback on this product
If you have any comments or suggestions about this product, contact your supplier and give:
• The product name.
• The product revision or version.
• An explanation with as much information as you can provide. Include symptoms and diagnostic
procedures if appropriate.
Feedback on content
If you have comments on content then send an e-mail to errata@arm.com. Give:
• The title.
• The number ARM 100165_0201_00_en.
• The page number(s) to which your comments refer.
• A concise explanation of your comments.
ARM also welcomes general suggestions for additions and improvements.
Note
ARM tests the PDF only in Adobe Acrobat and Acrobat Reader, and cannot guarantee the quality of the
represented document when used with any other PDF reader.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

10

Chapter 1
Introduction

This chapter introduces the processor and processor instruction set.
It contains the following sections:
• 1.1 About the processor on page 1-12.
• 1.2 Processor features list on page 1-13.
• 1.3 External interfaces on page 1-14.
• 1.4 Optional implementation components on page 1-15.
• 1.5 Product documentation on page 1-16.
• 1.6 Product revisions on page 1-19.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-11

1 Introduction
1.1 About the processor

1.1

About the processor
The Cortex-M3 is a low-power processor that features low gate count, low interrupt latency, and lowcost debug. It is intended for deeply embedded applications that require optimal interrupt response
features.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-12

1 Introduction
1.2 Processor features list

1.2

Processor features list
The processor includes a core, a Nested Vectored Interrupt Controller (NVIC), high-performance bus
interfaces, and other features.
The processor incorporates the following features:
• A processor core.
• 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:
— Implement breakpoints and code patches.
— Implement watchpoints, tracing, and system profiling.
— Support printf() style debugging.
— Bridge to a Trace Port Analyzer (TPA).
• An optional Memory Protection Unit (MPU).

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-13

1 Introduction
1.3 External interfaces

1.3

External interfaces
The processor incorporates three external bus interfaces, an ETM interface that allows the connection of
an Embedded Trace Macrocell, an AHB Trace Macrocell interface that enables simple connection of an
ETM to the processor, and an Advanced High-performance Bus Access Port (AHB-AP) interface for
debug accesses.
The processor incorporates the following external interfaces:
• Multiple memory and device bus interfaces.
• ETM interface.
• Trace port interface.
• Debug port interface.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-14

1 Introduction
1.4 Optional implementation components

1.4

Optional implementation components
You can configure your processor implementation to include optional components. For example, a
Memory Protection Unit (MPU), Flash Patch and Breakpoint (FPB), and Data Watchpoint and Trace
Unit (DWT).
The full list of Cortex-M3 optional implementation components is:
• Memory Protection Unit (MPU).
• Flash Patch and Breakpoint (FPB).
• Data Watchpoint and Trace Unit (DWT).
• Instrumentation Trace Macrocell Unit (ITM).
• Embedded Trace Macrocell (ETM).
• Advanced High-performance Bus Access Port (AHB-AP).
• AHB Trace Macrocell interface (HTM interface).
• Trace Port Interface Unit (TPIU).
• Wake-up Interrupt Controller (WIC).
• Debug Port Debug Port AHB-AP interface.
• Constant AHB control.
Note
You can only configure trace functionality in the following combinations:
• No trace functionality.
• ITM and DWT.
• ITM, DWT, and ETM.
• ITM, DWT, ETM, and HTM.
You can configure the debug features provided in the DWT independently.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-15

1 Introduction
1.5 Product documentation

1.5

Product documentation
The information supplied with this product includes a Technical Reference Manual, an Integration and
Implementation manual, together with design flow, architecture, and protocol information.
This section contains the following subsections:
• 1.5.1 Reference manuals on page 1-16.
• 1.5.2 Design Flow on page 1-17.
• 1.5.3 Architecture and protocol information on page 1-18.

1.5.1

Reference manuals
This product is supplied with a complete set of reference manuals that describe processor functionality,
build configuration options, and reference material that ARM partners might want to include in their own
processor user guides.
Technical Reference Manual
The Technical Reference Manual (TRM) describes the functionality and the effects of functional
options on the behavior of the Cortex-M3 processor. It is required at all stages of the design
flow. Some behavior described in the TRM might not be relevant because of the way that the
Cortex-M3 processor is implemented and integrated. If you are programming the Cortex-M3
processor then contact:
• The implementer to determine:
— The build configuration of the implementation.
— What integration, if any, was performed before implementing the processor.
• The integrator to determine the pin configuration of the SoC that you are using.
Integration and Implementation Manual
The Integration and Implementation Manual (IIM) describes:
• The available build configuration options and related issues in selecting them.
• How to configure the Register Transfer Level (RTL) with the build configuration options.
• How to integrate the processor into a SoC. This includes a description of the integration kit
and describes the pins that the integrator must tie off to configure the macrocell for the
required integration.
• How to implement the processor into your design. This includes floorplanning guidelines,
Design for Test (DFT) information, and how to perform netlist dynamic verification on the
processor.
• The processes to sign off the integration and implementation of the design.
The ARM product deliverables include reference scripts and information about using them to
implement your design.
Reference methodology documentation from your EDA tools vendor complements the IIM.
The IIM is a confidential book that is only available to licensees.
ETM-M4 Technical Reference Manual
The ETM-M4 TRM describes the functionality and behavior of the Cortex-M3 Embedded Trace
Macrocell. It is required at all stages of the design flow. Typically the ETM-M4 is integrated
with the Cortex-M3 processor prior to implementation as a single macrocell.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-16

1 Introduction
1.5 Product documentation

Cortex-M3 User Guide Reference Material
This document provides reference material that ARM partners can configure and include in a
User Guide for an ARM Cortex-M3 processor. Typically:
• Each chapter in this reference material might correspond to a section in the User Guide.
• Each top-level section in this reference material might correspond to a chapter in the User
Guide.
However, you can organize this material in any way, subject to the conditions of the license
agreement under which ARM supplied the material.
1.5.2

Design Flow
The design flow includes steps for implementation, integration, and programming. These processes must
be completed before the processor is ready for operation.
The processor is delivered as synthesizable RTL. Before it can be used in a product, it must go through
the following process:
Implementation
The implementer configures the RTL and may synthesize it to produce a hard macrocell or may
synthesize the whole design after implementation.
Integration
The integrator connects the implemented design into a SoC. This includes connecting it to a
memory system and peripherals.
Programming
The system programmer develops the software required to configure and initialize the processor,
and tests the required application software.
Each stage in the process can be performed by a different party. Implementation and integration choices
affect the behavior and features of the processor.
For MCUs, often a single design team integrates the processor before synthesizing the complete design.
Alternatively, the team can synthesize the processor on its own or partially integrated, to produce a
macrocell that is then integrated, possibly by a separate team.
The operation of the final device depends on:
Build configuration
The implementer chooses the options that affect how the RTL source files are pre-processed.
These options usually include or exclude logic that affects one or more of the area, maximum
frequency, and features of the resulting macrocell.
Configuration inputs
The integrator configures some features of the processor by tying inputs to specific values.
These configurations affect the start-up behavior before any software configuration is made.
They can also limit the options available to the software.
Software configuration
The programmer configures the processor by programming particular values into registers. This
affects the behavior of the processor.
Note
This manual refers to implementation-defined features that are applicable to build configuration options.
Reference to a feature that is included means that the appropriate build and pin configuration options are
selected. Reference to an enabled feature means one that has also been configured by software.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-17

1 Introduction
1.5 Product documentation

1.5.3

Architecture and protocol information
The processor complies with specifications for ARM and bus architecture, debug, and Embedded Trace
Macrocell.
This book complements architecture reference manuals, architecture specifications, protocol
specifications, and relevant external standards. It does not duplicate information from these sources.
ARM® architecture
The processor implements the ARMv7-M architecture profile.
For more information about the ARMv7-M architecture profile, see the ARMv7-M Architecture
Reference Manual.
Bus architecture
The processor uses the AMBA 3 APB protocol to implement an interface for CoreSight and other debug
components.
For more information about bus architecture, refer to the following manuals:
• The ARM AMBA 3 AHB-Lite Protocol (v1.0).
• The ARM AMBA 3 APB Protocol Specification.
Debug
The processor uses the ARM debug interface architecture to implement debug features.
For more information about the debug features, refer to the following manuals:
• ARM® Debug Interface v5 Architecture Specification.
• ARMv7-M Architecture Reference Manual.
Embedded Trace Macrocell
The processor uses version 3.4 of the ARM Embedded Trace Macrocell architecture to implement trace
features.
For more information about the trace features, refer to the ARM® Embedded Trace Macrocell
Architecture Specification manual.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-18

1 Introduction
1.6 Product revisions

1.6

Product revisions
This section lists the differences in functionality between product revisions.
This section contains the following subsections:
• 1.6.1 List of differences in functionality between r0p0 and r1p0 on page 1-19.
• 1.6.2 List of differences in functionality between r1p0 and r1p1 on page 1-19.
• 1.6.3 List of differences in functionality between r1p1 and r2p0 on page 1-19.
• 1.6.4 List of differences in functionality between r2p0 and r2p1 on page 1-20.

1.6.1

List of differences in functionality between r0p0 and r1p0
Summary of differences between revisions r0p0 and r1p0.
•
•
•
•
•
•
•
•
•
•
•
•
•

1.6.2

Addition of configurable data value comparison to the DWT module.
Addition of a MATCHED bit to DWT_FUNCTION.
Addition of configurable ETMFIFOFULL stalling functionality to the processor and the ETM.
Addition of SWV Mode to the ITM.
CPUID Base Register VARIANT field changed to indicate Rev1.
Cortex-M3 Rev0 Bit-band accesses in BE8 mode required access sizes to be byte. Cortex-M3 Rev1
has been changed so that BE8 bit-band accesses function with any access size.
Addition of a configuration bit called STKALIGN to ensure that all exceptions have eight-byte stack
alignment.
Addition of the Auxiliary Fault Status Register at address 0xE000ED3C. To set this register, a 32-bit
input bus called AUXFAULT has been added.
Addition of HTM support.
ICode and DCode cacheable and bufferable HPROT values permanently tied to write-through.
Addition of the SWJ-DP. This is the standard CoreSight debug port that combines JTAG-DP and
SW-DP.
Addition of DWT_PCSR Register at address 0xE000101C.
Errata fixes to the r0p0 release.

List of differences in functionality between r1p0 and r1p1
Summary of differences between revisions r1p0 and r1p1.
•
•
•
•
•

1.6.3

Data value matching for watchpoint generation has been made implementation time configurable.
Architectural clock gating in the ETM is configurable at implementation.
DAPCLKEN was required to be a static signal in r0p0 and r1p0. This requirement has been removed
for r1p1.
SLEEPING signal is now suppressed until the current outstanding instruction fetch has completed.
Errata fixes to the r1p0 release.

List of differences in functionality between r1p1 and r2p0
Summary of differences between r1p1 and r2p0.
•
•
•
•
•
•

Implementation time options have been added to select between different levels of debug and trace
support. This has replaced the previous TIEOFF_FPBEN and TIEOFF_TRCENA options.
New implementation option to enable the resetting of all registers within the processor.
Architectural clock gating inclusion is now controlled using one implementation option.
DBGRESTART input and DBGRESTARTED output have been added for use in debugging multicore systems. See the ARMv7-M Architecture Reference Manual for more information.
SLEEPHOLDREQn input and SLEEPHOLDACKn have been added to enable the extension of
SLEEPING.
The APB interface has been upgraded from v2.0 to v3.0.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-19

1 Introduction
1.6 Product revisions

•
•
•

•

•
•
•

•
1.6.4

A new output signal called INTERNALSTATE has been added that enables observation of some of
the internal state of the core if the OBSERVATION implementation option is used.
Added support for fault-robust implementations.
An Auxiliary Control Register has been added with new functionality disable bits that:
— Stop interruption of load/store multiples, divides and multiplies.
— Stop IT folding.
— Disable the write buffers in Cortex-M3 for default memory map accesses.
The STKALIGN bit reset value in the Configuration and Control Register at address 0xE000ED14 has
been inverted. The reset value is now 1, which means that the stack frame is 8-byte aligned by
default.
Addition of a Wake-up Interrupt Controller to minimize logic in the always clocked domain during
sleep.
Addition of FIXHMASTERTYPE pin to prevent debugger marking AHB transactions as core data
side if required.
Improved sequential information for data accesses. Before r2p0 HPROT for sequential data accesses
would change from SEQ to NSEQ if wait-states were inserted for the previous access. r2p0 maintains
the SEQ information.
Errata fixes to the r1p1 release.

List of differences in functionality between r2p0 and r2p1
Summary of differences between revisions r2p0 and r2p1.
•
•
•
•
•
•
•
•
•
•
•

New implementation option to ensure constant AHB control during wait-stated transfers.
New implementation option to remove the bit-banding logic.
MPUDISABLE input added to disable the MPU using hardware.
DBGEN input added as master debug enable. If de-asserted then debug is disabled.
ETM upgraded from ARM ETM architecture v3.4 to v3.5 to include global time-stamping.
The Vector Table Offset Register located at address 0xE000ED08 has been increased by two bits from
29:7 to 31:7.
ROM table identification registers have been updated.
Verilog file and module names have been modified. The top module names for Cortex-M3 and the
integration layer are now in capitals: CORTEXM3 and CORTEXM3INTEGRATION.
The ETM license define name has changed to ARM_CM3_ETM_LICENSE and is now defined in
cm3_lic_defs.v rather than in the integration level.
Watchpoints no longer occur if the transaction is aborted by the MPU.
Errata fixes to the r2p0 release.

Related references
ROM table identification and entries.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

1-20

Chapter 2
Functional Description

This chapter introduces the processor and its external interfaces.
It contains the following sections:
• 2.1 About the functions on page 2-22.
• 2.2 Processor features list on page 2-23.
• 2.3 Interfaces on page 2-25.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

2-21

2 Functional Description
2.1 About the functions

2.1

About the functions
Block diagram of the processor, showing main functional components and interfaces.
Cortex-M3 processor
Nested
Vectored
Interrupt
Controller
(NVIC)

Interrupts and
power control

†

Wake-up
Interrupt
Controller
(WIC)

† Serial-Wire
or JTAG
Debug Port
(SW-DP or
SWJ-DP)

Serial-Wire or
JTAG Debug
Interface

†

†
Flash Patch
Breakpoint
(FPB)

†

Cortex-M3
processor core

†
Memory
Protection
Unit (MPU)

†

Data
Watchpoint
and Trace
(DWT)

†
AHB
Access Port
(AHB-AP)

ICode
AHB-Lite
instruction
interface

Bus Matrix

DCode
AHB-Lite
data
interface

System
AHB-Lite
system
interface

Embedded
Trace
Macrocell
(ETM)

†
Instrumentation
Trace Macrocell
(ITM)

Trace Port
Interface Unit
(TPIU)

Trace Port
Interface

† CoreSight
ROM table
PPB APB
debug system
interface

† Optional component

Figure 2-1 Cortex-M3 block diagram

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

2-22

2 Functional Description
2.2 Processor features list

2.2

Processor features list
The processor features list includes a low gate count processor core, an optional memory protection unit,
a low-cost debug solution, together with bus interfaces that includes three Advanced High-performance
Bus-Lite (AHB-Lite) interfaces and a Private Peripheral Bus (PPB).
The processor features list comprises:
• A low gate count processor core, with low latency interrupt processing that has:
— A subset of the Thumb instruction set, defined in the ARMv7-M Architecture Reference Manual.
— Banked Stack Pointer (SP).
— Hardware integer divide instructions, SDIV and UDIV.
— Handler and Thread modes.
— Thumb and Debug states.
— Support for interruptible-continued instructions LDM, STM, PUSH, and POP for low interrupt latency.
— Automatic processor state saving and restoration for low latency Interrupt Service Routine (ISR)
entry and exit.
— Support for ARMv6 big-endian byte-invariant or little-endian accesses.
— Support for ARMv6 unaligned accesses.
• Nested Vectored Interrupt Controller (NVIC) closely integrated with the processor core to achieve
low latency interrupt processing. Features include:
— External interrupts, configurable from 1 to 240.
— Bits of priority, configurable from 3 to 8.
— Dynamic reprioritization of interrupts.
— Priority grouping. This enables selection of preempting interrupt levels and non preempting
interrupt levels.
— 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.
— Optional Wake-up Interrupt Controller (WIC), providing ultra-low power sleep mode support.
• Memory Protection Unit (MPU). An optional MPU for memory protection, including:
— Eight memory regions.
— Sub Region Disable (SRD), enabling efficient use of memory regions.
— The ability to enable a background region that implements the default memory map attributes.
• Bus interfaces:
— Three Advanced High-performance Bus-Lite (AHB-Lite) interfaces: ICode, DCode, and System
bus interfaces.
— Private Peripheral Bus (PPB) based on Advanced Peripheral Bus (APB) interface.
— Bit-band support that includes atomic bit-band write and read operations.
— Memory access alignment.
— Write buffer for buffering of write data.
— Exclusive access transfers for multiprocessor systems.
• Low-cost debug solution that features:
— Debug access to all memory and registers in the system, including access to memory mapped
devices, access to internal core registers when the core is halted, and access to debug control
registers even while SYSRESETn is asserted.
— Serial Wire Debug Port (SW-DP) or Serial Wire JTAG Debug Port (SWJ-DP) debug access.
— Optional Flash Patch and Breakpoint (FPB) unit for implementing breakpoints and code patches.
— Optional Data Watchpoint and Trace (DWT) unit for implementing watchpoints, data tracing, and
system profiling.
— Optional Instrumentation Trace Macrocell (ITM) for support of printf() style debugging.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

2-23

2 Functional Description
2.2 Processor features list

— Optional Trace Port Interface Unit (TPIU) for bridging to a Trace Port Analyzer (TPA),
including Single Wire Output (SWO) mode.
— Optional Embedded Trace Macrocell (ETM) for instruction trace.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

2-24

2 Functional Description
2.3 Interfaces

2.3

Interfaces
The processor incorporates three external bus interfaces, an ETM interface that allows the connection of
an Embedded Trace Macrocell, an AHB Trace Macrocell interface that enables simple connection of an
ETM to the processor, and an Advanced High-performance Bus Access Port (AHB-AP) interface for
debug accesses.
This section contains the following subsections:
• 2.3.1 Bus interfaces on page 2-25.
• 2.3.2 ETM interface on page 2-26.
• 2.3.3 AHB Trace Macrocell interface on page 2-27.
• 2.3.4 Debug Port AHB-AP interface on page 2-27.

2.3.1

Bus interfaces
The Cortex-M3 processor contains three external Advanced High-performance Bus (AHB)-Lite bus
interfaces and one Advanced Peripheral Bus (APB) interface.
The processor matches the AMBA 3 specification except for maintaining control information during
waited transfers. The AMBA 3 AHB-Lite Protocol states that when the slave is requesting wait states the
master must not change the transfer type, except for the following cases:
• On an IDLE transfer, the master can change the transfer type from IDLE to NONSEQ.
• On a BUSY transfer with a fixed length burst, the master can change the transfer type from BUSY to
SEQ.
• On a BUSY transfer with an undefined length burst, the master can change the transfer type from
BUSY to any other transfer type.
The processor does not match this definition because it might change the access type from SEQ or
NONSEQ to IDLE during a waited transfer. The processor might also change the address or other
control information and therefore request an access to a new location. The original address that was
retracted might not be requested again. This cancels the outstanding transfer that has not occurred
because the previous access is wait-stated and awaiting completion. This is done so that the processor
can have a lower interrupt latency and higher performance in wait-stated systems by retracting accesses
that are no longer required.
To achieve complete compliance with the AMBA 3 specification you can implement the design with the
AHB_CONST_CTRL parameter set to 1. This ensures that when transfers are issued during a wait-stated
response they are never retracted or modified and the original transfer is honored. The consequence of
setting this parameter is that the performance of the core might decrease for wait-stated systems as a
result of the interrupt and branch latency increasing.
ICode memory interface
Instruction fetches from Code memory space 0x00000000 to 0x1FFFFFFF are performed over the 32-bit
AHB-Lite bus.
The Debugger cannot access this interface. All fetches are word-wide. The number of instructions
fetched per word depends on the code running and the alignment of the code in memory.
DCode memory interface
Data and debug accesses to Code memory space 0x00000000 to 0x1FFFFFFF are performed over the 32bit AHB-Lite bus.
Core data accesses have a higher priority than debug accesses on this bus. This means that debug
accesses are waited until core accesses have completed when there are simultaneous core and debug
access to this bus.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

2-25

2 Functional Description
2.3 Interfaces

Control logic in this interface converts unaligned data and debug accesses into two or three aligned
accesses, depending on the size and alignment of the unaligned access. This stalls any subsequent data or
debug access until the unaligned access has completed.
Note
ARM strongly recommends that any external arbitration between the ICode and DCode AHB bus
interfaces ensures that DCode has a higher priority than ICode.

System interface
Instruction fetches and data and debug accesses to address ranges 0x20000000 to 0xDFFFFFFF and
0xE0100000 to 0xFFFFFFFF are performed over the 32-bit AHB-Lite bus.
For simultaneous accesses to the 32-bit AHB-Lite bus, the arbitration order in decreasing priority is:
• Data accesses.
• Instruction and vector fetches.
• Debug.
The system bus interface contains control logic to handle unaligned accesses, FPB remapped accesses,
bit-band accesses, and pipelined instruction fetches.
Private Peripheral Bus (PPB)
Data and debug accesses to external PPB space 0xE0040000 to 0xE00FFFFF are performed over the 32bit Advanced Peripheral Bus (APB) bus.
The Trace Port Interface Unit (TPIU) and vendor specific peripherals are on the 32-bit Advanced
Peripheral Bus (APB) bus.
Core data accesses have higher priority than debug accesses, so debug accesses are waited until core
accesses have completed when there are simultaneous core and debug accesses to this bus. Only the
address bits necessary to decode the External PPB space are supported on this interface.
The External PPB (EPPB) space, 0xE0040000 up to 0xE0100000, is intended for CoreSight-compatible
debug and trace components, and has a number of irregular limitations which make it less useful for
regular system peripherals. ARM recommends that system peripherals are placed in suitable Device type
areas of the System bus address space, with use of an AHB2APB protocol converter for APB-based
devices.
Limitations of the EPPB space are:
•
•
•
•
•
•
•
2.3.2

It is accessible in privileged mode only.
It is accessed in little-endian fashion irrespective of the data endianness setting of the processor.
Accesses behave as Strongly Ordered.
No bit-band function is available.
Unaligned accesses have Unpredictable results.
Only 32-bit data accesses are supported.
It is accessible from the Debug Port and the local processor, but not from any other processor in the
system.

ETM interface
The ETM interface enables simple connection of an ETM to the processor. It provides a channel for
instruction trace to the ETM.
See the ARM Embedded Trace Macrocell Architecture Specification.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

2-26

2 Functional Description
2.3 Interfaces

2.3.3

AHB Trace Macrocell interface
The AHB Trace Macrocell (HTM) interface enables a simple connection of the AHB trace macrocell to
the processor, and provides a channel for the data trace to the HTM.
Your implementation must include this interface to use the HTM interface. You must set TRCENA to 1
in the Debug Exception and Monitor Control Register (DEMCR) before you enable the HTM port to
supply trace data. See the ARM®v7-M Architecture Reference Manual.

2.3.4

Debug Port AHB-AP interface
The processor contains an Advanced High-performance Bus Access Port (AHB-AP) interface for debug
accesses. An external Debug Port (DP) component accesses this interface.
The Cortex-M3 system supports three possible DP implementations:
• The Serial Wire JTAG Debug Port (SWJ-DP). The SWJ-DP is a standard CoreSight debug port that
combines JTAG-DP and Serial Wire Debug Port (SW-DP).
• The SW-DP. This provides a two-pin interface to the AHB-AP port.
• No DP present. If no debug functionality is present within the processor, a DP is not required.
The two DP implementations provide different mechanisms for debug access to the processor. Your
implementation must contain only one of these components.
Note
Your implementation might contain an alternative implementer-specific DP instead of SW-DP or SWJDP. See your implementer for details.
For more detailed information on the DP components, see the CoreSight™ Components Technical
Reference manual.
The DP and AP together are referred to as the Debug Access Port (DAP).
For more detailed information on the debug interface, see the ARM® Debug Interface v5 Architecture
Specification.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

2-27

Chapter 3
Programmers Model

This chapter describes the processor programmers model.
It contains the following sections:
• 3.1 About the programmers’ model on page 3-29.
• 3.2 Modes of operation and execution on page 3-30.
• 3.3 Instruction set summary on page 3-31.
• 3.4 Processor memory model on page 3-37.
• 3.5 Write buffer on page 3-40.
• 3.6 Exclusive monitor on page 3-41.
• 3.7 Bit-banding on page 3-42.
• 3.8 Processor core register summary on page 3-44.
• 3.9 Exceptions on page 3-46.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

3-28

3 Programmers Model
3.1 About the programmers’ model

3.1

About the programmers’ model
The Cortex-M3 programmers’ model describes the processor’s implementation-defined options.
For a complete description of the programmers’ model, refer to the ARM®v7-M Architecture Reference
Manual, which also contains the ARMv7-M Thumb instructions the model uses, and their cycle counts
for the processor. In addition, other options of the programmers’ model are described in the System
Control, MPU, NVIC, FPU, Debug, DWT, ITM, and TPIU features topics.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

3-29

3 Programmers Model
3.2 Modes of operation and execution

3.2

Modes of operation and execution
The Cortex-M3 processor supports Thread and Handler operating modes, and may be run in Thumb or
Debug operating states. In addition, the processor can limit or exclude access to some resources by
executing code in privileged or unprivileged mode.
See the ARM®v7-M Architecture Reference Manual for more information about these modes of operation
and execution.
Operating modes
The conditions which cause the processor to enter Thread or Handler mode are as follows:
• The processor enters Thread mode on Reset, or as a result of an exception return. Privileged and
Unprivileged code can run in Thread mode.
• The processor enters Handler mode as a result of an exception. All code is privileged in Handler
mode.
Operating states
The processor can operate in thumb or debug state:
• Thumb state. This is normal execution running 16-bit and 32-bit halfword aligned Thumb
instructions.
• Debug State. This is the state when the processor is in halting debug.
Privileged access and user access
Handler mode is always privileged. Thread mode can be privileged or unprivileged.

ARM 100165_0201_00_en

Copyright © 2005-2008, 2010, 2015 ARM. All rights reserved.
Non-Confidential

3-30

3 Programmers Model
3.3 Instruction set summary

3.3

Instruction set summary
The processor implements the ARMv7-M Thumb instruction set, and is binary compatible with the
instruction sets and features implemented in other Cortex-M profile processors. Instructions can be
paired in a way that achieves optimum reductions in timing.
This section contains the following subsections:
• 3.3.1 Processor instructions on page 3-31.
• 3.3.2 Load/store timings on page 3-35.
• 3.3.3 Binary compatibility with other Cortex processors on page 3-36.

3.3.1

Processor instructions
The table summarizes the Cortex-M3 processor instruction set. For brevity, not all load and store
addressing modes are shown in the table. The cycle counts provided are based on a system with zero wait
states.
Within the assembler syntax, depending on the operation, the  field can be replaced with one of the
following options:
• A simple register specifier, for example Rm.
• An immediate shifted register, for example Rm, LSL #4.
• A register shifted register, for example Rm, LSL Rs.
• An immediate value, for example #0xE000E000.
For brevity, not all load and store addressing modes are shown. See the ARMv7-M Architecture
Reference Manual for more information.
The following abbreviations are used in the Cycles column:
P
The number of cycles required for a pipeline refill. This ranges from 1 to 3 depending on the
alignment and width of the target instruction, and whether the processor manages to speculate
the address early.
B
The number of cycles required to perform the barrier operation. For DSB and DMB, the minimum
number of cycles is zero. For ISB, the minimum number of cycles is equivalent to the number
required for a pipeline refill.
N
The number of registers in the register list to be loaded or stored, including PC or LR.
W
The number of cycles spent waiting for an appropriate event.
Table 3-1 Cortex-M3 instruction set summary
Operation

Description

Assembler

Cycles

Move

Register

MOV Rd, 

1

16-bit immediate

MOVW Rd, #

1

Immediate into top

MOVT Rd, #

1

To PC

MOV PC, Rm

1+P

Add

ADD Rd, Rn, 

1

Add to PC

ADD PC, PC, Rm

1+P

Add with carry

ADC Rd, Rn, 

1

Form address

ADR Rd, 

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.7
Linearized                      : No
Encryption                      : Standard V4.4 (128-bit)
User Access                     : Print, Copy, Annotate, Fill forms, Extract, Print high-res
Author                          : ARM
Create Date                     : 2015:02:24 10:31:24+00:00
Modify Date                     : 2015:02:24 10:31:24+00:00
Creator                         : AH XSL Formatter V6.1 MR4 for Linux64 : 6.1.9.14491 (2013/12/19 12:04JST)
Producer                        : Antenna House PDF Output Library 6.1.452 (Linux64)
Keywords                        : Cortex-M, Cortex-M3
Title                           : ARM® Cortex®‑M3 Processor Technical Reference Manual
Subject                         : This book contains documentation for the Cortex‑M3 processor, describing the programmers model, instructions, registers, memory map, cache and debug support. Components include ETM, MPU, NVIC, FPB, DWT, ITM, AHB, and TPIU.
Trapped                         : False
Page Count                      : 122
Page Mode                       : UseOutlines
Language                        : EN
EXIF Metadata provided by EXIF.tools

Navigation menu