DDI0489B Cortex m7 TRM
DDI0489B Cortex m7 TRM
® ®
Revision r0p2
Change history
Proprietary Notice
Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM® in the EU and other countries,
except as otherwise stated below in this proprietary notice. Other brands and names mentioned herein may be the
trademarks of their respective owners.
Neither the whole nor any part of the information contained in, or the product described in, this document may be
adapted or reproduced in any material form except with the prior written permission of the copyright holder.
The product described in this document is subject to continuous developments and improvements. All particulars of the
product and its use contained in this document are given by ARM in good faith. However, all warranties implied or
expressed, including but not limited to implied warranties of merchantability, or fitness for purpose, are excluded.
This document is intended only to assist the reader in the use of the product. ARM shall not be liable for any loss or
damage arising from the use of any information in this document, or any error or omission in such information, or any
incorrect use of the product.
Where the term ARM is used it means “ARM or any of its subsidiaries as appropriate”.
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.
Product Status
Web Address
http://www.arm.com
Preface
About this book ........................................................................................................... vi
Feedback ..................................................................................................................... x
Chapter 1 Introduction
1.1 About the Cortex-M7 processor ............................................................................... 1-2
1.2 Component blocks ................................................................................................... 1-6
1.3 Interfaces ............................................................................................................... 1-10
1.4 Supported standards ............................................................................................. 1-12
1.5 Design process ...................................................................................................... 1-13
1.6 Documentation ....................................................................................................... 1-14
1.7 Product revisions ................................................................................................... 1-15
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. iii
ID120914 Non-Confidential
Contents
Chapter 4 Initialization
4.1 About Initialization .................................................................................................... 4-2
Chapter 9 Debug
9.1 About debug ............................................................................................................ 9-2
9.2 About the AHBD interface ........................................................................................ 9-7
9.3 About the FPB ......................................................................................................... 9-8
Appendix A Revisions
This preface introduces the Cortex-M7 Processor Technical Reference Manual (TRM). It
contains the following sections:
• About this book on page vi.
• Feedback on page x.
The rnpn identifier indicates the revision status of the product described in this manual, where:
rn Identifies the major revision of the product.
pn Identifies the minor revision or modification status of the product.
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-M7 processor.
Chapter 1 Introduction
Read this for a description of the components of the processor, and of the product
documentation.
Chapter 4 Initialization
Read this for a description of how to initialize the processor.
Chapter 9 Debug
Read this for information about debugging and testing the processor.
Appendix A Revisions
Read this for a description of the technical changes between released issues of 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.
Conventions
Typographical conventions
Style Purpose
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.
<and> Encloses replaceable terms for assembler syntax where they appear in code or code fragments. For example:
LDRSB<cond> <Rt>, [<Rn>, #<offset>]
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.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. vii
ID120914 Non-Confidential
Preface
Timing diagrams
The figure named Key to timing diagram conventions 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 change
Timing diagrams sometimes show single-bit signals as HIGH and LOW at the same time and
they look similar to the bus change shown in Key to timing diagram conventions. If a timing
diagram shows a single-bit signal in this way then its value does not affect the accompanying
description.
Signals
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.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. viii
ID120914 Non-Confidential
Preface
Additional reading
ARM publications
This book contains information that is specific to this product. See the following documents for
other relevant information:
• ARM® AMBA® AXI and ACE Protocol Specification (ARM IHI 0022).
• ARM® Embedded Trace Macrocell Architecture Specification ETMv4 (ARM IHI 0064).
Other publications
Feedback
ARM welcomes feedback on this product and its documentation.
If you have any comments or suggestions about this product, contact your supplier and give:
• An explanation with as much information as you can provide. Include symptoms and
diagnostic procedures if appropriate.
Feedback on content
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 DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-1
ID120914 Non-Confidential
Introduction
The processor has an optional Memory Protection Unit (MPU) that you can configure to protect
regions of memory. Error Correcting Code (ECC) functionality for error detection and
correction, is included in the data and instruction caches when implemented. The TCM
interfaces support the implementation of external ECC to provide improved reliability and to
address safety-related applications.
The Cortex-M7 processor includes optional floating-point arithmetic functionality, with support
for single and double-precision arithmetic. See Chapter 8 Floating Point Unit.
The processor is intended for high-performance, deeply embedded applications that require fast
interrupt response features.
DMAC
AHBS
Cortex-M7 processor
ITCM DTCM AHBP AXIM
1.1.1 Features
• DSP extensions.
• The ARMv7-M Thumb instruction set, defined in the ARM®v7-M Architecture Reference
Manual.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-2
ID120914 Non-Confidential
Introduction
• Automatic processor state saving and restoration for low-latency Interrupt Service
Routine (ISR) entry and exit.
• Support for an optional ETM. See the ARM® CoreSight™ ETM-M7 Technical Reference
Manual for more information.
• A memory system, which includes an optional MPU and Harvard data and instruction
cache with ECC.
1.1.2 Interfaces
Cortex-M7 Processor
Cross Trigger Interface
Interrupts
Peripherals AHBP
ATB Instruction
D0TCM
Memory D1TCM
ATB Data
ITCM
MBIST
AXIM
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-3
ID120914 Non-Confidential
Introduction
The Cortex-M7 processor has configurable options that you can configure during the
implementation and integration stages to match your functional requirements.
Table 1-1 shows the configurable options at build time of the processor.
4KB-16MB (powers of 2). The Data TCM is split equally into two TCMs,
D0TCM, and D1TCM.
Number bits of interrupt Between three and eight bits of interrupt priority, between 8 and 256 levels of Implementation
priority priority.
Debug watchpoints and Reduced set. Two data watchpoints comparators and four breakpoint comparators. Implementation
breakpoints
Full set. Four data watchpoints comparators and eight breakpoint comparators.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-4
ID120914 Non-Confidential
Introduction
Reset All Registers Only required registers that must be initialized are reset in the RTL. Implementation
All registers are reset in the RTL excluding those in the ETM, if included.
All registers are reset in the RTL including those in the ETM, if included.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-5
ID120914 Non-Confidential
Introduction
Table 1-1 on page 1-4 shows the configurable options at implementation time of the processor.
Cortex-M7 Processor
PFU FPB
External
PPB
‡ FPU
‡ MPU
‡ CTI Cross
Trigger
Interrupts NVIC DPU Interface
‡ WIC
‡ ETM ATB Data
Peripherals AHBP
‡ DCU and
‡ ICU and
BIU D-cache
Memory I-cache RAM
RAM
system
‡ Optional
AXIM
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-6
ID120914 Non-Confidential
Introduction
• Parallelized integer register file with six read ports and four write ports for large-scale
dual-issue.
• Single MAC pipeline capable of 32x32-bit + 64-bit → 64-bit with two cycle result latency
and one MAC per cycle throughput.
• 4x64-bit pre-fetch queue to decouple instruction pre-fetch from DPU pipeline operation.
• A Branch Target Address Cache (BTAC) for single-cycle turn-around of branch predictor
state and target address.
• Forwarding of flags for early resolution of direct branches in the decoder and first
execution stages of the processor pipeline.
• Dual 32-bit load channels to TCM, data cache, and AXI master (AXIM) interface for
64-bit load bandwidth and dual 32-bit load capability.
• Store buffering to increase store throughput and minimize RAM contention with data and
instruction reads.
• Separate store buffering for TCM, AHBP and AXIM for Quality of Service (QoS) and
interface-specific optimizations.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-7
ID120914 Non-Confidential
Introduction
• Combined Multiply and Accumulate instructions for increased precision (Fused MAC).
• Hardware support for denormals and all IEEE Standard 754-2008 rounding modes.
The NVIC is closely integrated with the core to achieve low-latency interrupt processing.
Features include:
• 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.
• A Bus Interface Unit (BIU) with a configurable AMBA 4 AXI interface that can support
a high-performance L2 memory system.
• A Tightly-Coupled interface Unit (TCU) with TCM interfaces that can support external
ECC logic and an AHB slave (AHBS) interface for system access to TCMs.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-8
ID120914 Non-Confidential
Introduction
• Instruction and data caches and controllers with optional Error Correction Code (ECC).
• A Memory Built-in Self Test (MBIST) interface. The interface supports MBIST operation
while the processor is running.
The optional MPU has configurable attributes for memory protection. It includes up to 16
memory regions and Sub Region Disable (SRD), enabling efficient use of memory regions. It
also has the ability to enable a background region that implements the default memory map
attributes. See Chapter 6 Memory Protection Unit for more information.
The two ROM tables enable a debugger to identify and connect to CoreSight debug
components. See Chapter 9 Debug for more information.
The optional CTI enables the debug logic and ETM to interact with each other and with other
CoreSight components. See Chapter 10 Cross Trigger Interface.
1.2.11 ETM
The optional ETM provides instruction-only or instruction and data trace capabilities when
configured. See the ARM® CoreSight™ ETM-M7 Technical Reference Manual for more
information.
• Configurable Data Watchpoint and Trace (DWT) unit for implementing watchpoints, data
tracing, and system profiling.
• Optional ITM for support of printf() style debugging, using instrumentation trace.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-9
ID120914 Non-Confidential
Introduction
1.3 Interfaces
The processor contains the following external interfaces:
• AHBP interface.
• AHBS interface.
• AHBD interface.
• External Private Peripheral Bus.
• ATB interfaces.
• TCM interface.
• Cross Trigger interface on page 1-11.
• MBIST interface on page 1-11.
• AXIM interface on page 1-11.
The AHB-Lite peripheral (AHBP) interface provides access suitable for low latency system
peripherals. It provides support for unaligned memory accesses, write buffer for buffering of
write data, and exclusive access transfers for multiprocessor systems. See AHB peripheral
interface on page 5-22 for more information.
The AHB-Lite slave (AHBS) interface enables system access to TCMs. See AHB slave interface
on page 5-30 for more information.
The AHB-Lite Debug (AHBD) interface provides debug access to the Cortex-M7 processor and
the complete memory map. See About the AHBD interface on page 9-7 for more information.
The APB External PPB (EPPB) enables access to CoreSight-compatible debug and trace
components, in the system connected to the processor.
The ATB interfaces output trace information used for debugging. The ATB interface is
compatible with the CoreSight architecture. See the ARM® CoreSight™ Architecture
Specification (v2.0) for more information.
The processor can have up to two TCM memory instances, Instruction TCM (ITCM) and Data
TCM (DTCM), each with a double word data width. Access to ITCM is through the ITCM
64-bit wide interface. Access to DTCM is through the D1TCM 32-bit wide interface and the
32-bit wide D0TCM interface. The DTCM accesses are split so that lower words always access
D0TCM and upper words always access D1TCM. The size of both TCM instances is
configurable, 4KB-16MB in powers of 2. See TCM interfaces on page 5-33 for more
information.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-10
ID120914 Non-Confidential
Introduction
The processor includes an optional Cross Trigger Interface Unit which includes an interface
suitable for connection to external CoreSight components using a Cross Trigger Matrix. See
Chapter 10 Cross Trigger Interface for more information.
The MBIST interface is used for testing the RAMs during production test. The Cortex-M7
processor also allows the RAMs to be tested using the MBIST interface during normal
execution. This is known as online MBIST.
Contact your implementation team for more information about the MBIST interface and online
MBIST.
The AXI master (AXIM) interface provides high-performance access to an external memory
system. The AXIM interface supports use of the ARM CoreLink L2C-310 Level 2 Cache
Controller. L2C-310 Exclusive cache configuration is not supported. See AXIM interface on
page 5-6 for more information.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-11
ID120914 Non-Confidential
Introduction
The Cortex-M7 processor implements the ARMv7E-M architecture profile. See the ARM®v7-M
Architecture Reference Manual.
The Cortex-M7 processor FPB implements the Flash Patch Breakpoint version 2 architecture
revision.
The processor also implements an interface for CoreSight and other debug components using
the AMBA 3 APB protocol and AMBA 3 ATB Protocol.
1.4.3 Debug
The debug features of the processor implement the ARM debug interface architecture. See the
ARM® Debug Interface v5 Architecture Specification.
When implemented, the trace features of the processor implement the ARM Embedded Trace
Macrocell (ETM)v4 architecture. See the ARM® Embedded Trace Macrocell Architecture
Specification ETMv4.
Depending on your implementation, a Cortex-M7 processor with FPU can have single-precision
only or single and double-precision floating-point data processing as defined by the FPv5
architecture, which is part of the ARMv7E-M architecture. It provides floating-point
computation functionality that is compliant with the ANSI/IEEE Std 754-2008, IEEE Standard
for Binary Floating-Point Arithmetic.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-12
ID120914 Non-Confidential
Introduction
The following definitions describe each top-level process in the design flow:
Implementation
The implementer configures and synthesizes the RTL.
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.
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 programer 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 DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-13
ID120914 Non-Confidential
Introduction
1.6 Documentation
The Cortex-M7 processor documentation can help you complete the top-level processes of
implementation, integration, and programming required to use the product correctly.
See Additional reading on page ix for more information about the books associated with the
Cortex-M7 processor.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-14
ID120914 Non-Confidential
Introduction
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 1-15
ID120914 Non-Confidential
Chapter 2
Programmers Model
This chapter describes the programmers model. It contains the following sections:
• About the programmers model on page 2-2.
• Modes of operation and execution on page 2-3.
• Instruction set summary on page 2-4.
• System address map on page 2-5.
• Exclusive monitor on page 2-7.
• Processor core registers on page 2-8.
• Exceptions on page 2-9.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-1
ID120914 Non-Confidential
Programmers Model
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-2
ID120914 Non-Confidential
Programmers Model
The processor supports two modes of operation, Thread mode and Handler mode:
• The processor enters Handler mode as a result of an exception. All code is privileged in
Handler mode.
• 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.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-3
ID120914 Non-Confidential
Programmers Model
The processor is binary compatible with the instruction sets and features implemented in other
Cortex-M profile processors. You cannot move software from the Cortex-M7 processor to:
Code designed for the Cortex-M1 processor is compatible with the Cortex-M7 processor as long
as it does not rely on bit-banding.
To ensure a smooth transition when migrating software to the Cortex-M7 processor, ARM
recommends that code designed to operate on the Cortex-M1 processor obeys the following
rules and that you configure the Configuration and Control Register (CCR) appropriately:
• Use word transfers only to access registers in the NVIC and System Control Space (SCS).
• Treat all unused SCS registers and register fields on the processor as Do-Not-Modify.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-4
ID120914 Non-Confidential
Programmers Model
Priority is always given to the processor to ensure that any debug accesses are as non-intrusive
as possible.
0xFFFFFFFF
0xE00FFFFF
PPB ROM table System
0xE00FF000
Processor ROM table
0xE00FE000 0xE0100000
Private Peripheral Bus
0xE0043000 Private peripheral bus - External
CTI 0xE0040000
0xE0042000
ETM Private peripheral bus - Internal
0xE0041000
Reserved (TPIU) 0xE0000000
0xE0040000
0xA0000000
0x60000000
Peripheral 0.5GB
0x40000000
SRAM 0.5GB
0x20000000
Code 0.5GB
0x00000000
Table 2-1 shows the processor interfaces that are addressed by the different memory map
regions.
Code Instruction fetches and data accesses are performed over the ITCM or AXIM interface.
SRAM Instruction fetches and data accesses are performed over the DTCM or AXIM interface.
Peripheral Data accesses are performed over the AHBP or AXIM interface.
Instruction fetches are performed over the AXIM interface.
External RAM Instruction fetches and data accesses are performed over the AXIM interface.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-5
ID120914 Non-Confidential
Programmers Model
External Device Instruction fetches and data accesses are performed over the AXIM interface.
Private Peripheral Bus Data accesses to registers associated with peripherals outside the processor are performed on the
External Private Peripheral Bus (EPPB) interface. See Private peripheral bus.
This memory region is Execute Never (XN), and so instruction fetches are prohibited. An MPU,
if present, cannot change this.
System System segment for vendor system peripherals. Data accesses are performed over the AHBP
interface. This memory region is XN, and so instruction fetches are prohibited. An MPU, if
present, cannot change this.
See the ARM®v7-M Architecture Reference Manual for more information about the memory
model.
• The SCS, including the MPU, the instruction and data cache, and the Nested Vectored
Interrupt Controller (NVIC).
The Cortex-M7 processor supports ARMv7 unaligned accesses, and performs all accesses as
single, unaligned accesses. They are converted into two or more aligned accesses internally and
are performed on the external interfaces of the processor.
Note
All Cortex-M7 processor external accesses are aligned.
Unaligned support is only available for load/store singles (LDR, LDRH, STR, STRH). Load/store
double already supports word aligned accesses, but does not permit other unaligned accesses,
and generates a fault if this is attempted.
Unaligned accesses that cross memory map boundaries are architecturally UNPREDICTABLE. The
processor behavior is boundary dependent. Unaligned accesses are not supported to PPB space,
and so there are no boundary crossing cases for PPB accesses.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-6
ID120914 Non-Confidential
Programmers Model
The local monitor within the processor is constructed so that it does not hold any physical
address. Instead it treats any access as matching the address of the previous LDREX instruction.
This means that the implemented Exclusives Reservation Granule (ERG) is the entire memory
address range.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-7
ID120914 Non-Confidential
Programmers Model
For more information about the processor register set, see the ARM®v7-M Architecture
Reference Manual.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-8
ID120914 Non-Confidential
Programmers Model
2.7 Exceptions
The processor and the NVIC prioritize and handle all exceptions. When handling exceptions:
• All exceptions are handled in Handler mode.
• Processor state is automatically stored to the stack on an exception, and automatically
restored from the stack at the end of the Interrupt Service Routine (ISR).
• The vector is fetched in parallel to the state saving, enabling efficient interrupt entry.
The processor supports tail-chaining that enables back-to-back interrupts without the overhead
of state saving and restoration.
You configure the number of interrupts, and levels of interrupt priority, during implementation.
Software can choose only to enable a subset of the configured number of interrupts, and can
choose how many levels of the configured priorities to use.
Note
The format of vectors in the vector table entries allows potential interworking between ARM
and Thumb instructions. On the Cortex-M7 processor this causes bit[0] of the vector value to
load into the Execution Program Status Register (EPSR) T-bit on exception entry. Because the
Cortex-M7 processor only supports Thumb, all populated vectors in the vector table entries
must have bit[0] set. Creating a table entry with bit[0] clear generates an INVSTATE fault on
the first instruction of the handler corresponding to this vector.
External read faults from either the TCM interfaces, the AXIM interface, or the AHB interfaces
generate a synchronous exception in the processor. External write faults generate an
asynchronous exception in the processor.
The processor implements advanced exception and interrupt handling, as described in the
ARM®v7-M Architecture Reference Manual.
The processor exception model has the following implementation-defined behavior in addition
to the architecturally-defined behavior:
• Exceptions on stacking from HardFault to NMI lockup at NMI priority.
• Exceptions on unstacking from NMI to HardFault lockup at HardFault priority.
To minimize interrupt latency, the processor can abandon the majority of multicycle instructions
that are executing when the interrupt is recognized. The only exception is a device or
strongly-ordered load, or a shared store exclusive operation that starts on the AXI interface. All
normal memory transactions are abandoned when an interrupt is recognized.
The processor restarts any abandoned operation on return from the interrupt. The processor also
implements the Interruptible-continuable bits allowing load and store multiples to be
interruptible and continuable. In these cases the processor resumes execution of these
instructions after the last completed transfer instead of from the start. For more information on
the Interruptible-continuable bits and key limitations on when they apply, see the ARM®v7-M
Architecture Reference Manual.
Specifically, on the Cortex-M7 processor, these instructions always restart instead of continue:
• The instruction faults.
• The instruction is inside an If-Then (IT) block.
• The instruction is a load multiple, has the base register in the list and has loaded the base
register.
• The instruction is a load multiple and is subject to an ECC error.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 2-9
ID120914 Non-Confidential
Chapter 3
System Control
This chapter describes the registers that program the processor. It contains the following
sections:
• About system control on page 3-2.
• Register summary on page 3-3.
• Register descriptions on page 3-6.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-1
ID120914 Non-Confidential
System Control
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-2
ID120914 Non-Confidential
System Control
0xE000E00C - - - Reserved
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-3
ID120914 Non-Confidential
System Control
0xE000EF54 - - - Reserved
0xE000EF70 DCCIMVAC WO Unknown Data cache clean and invalidate by address to PoC
0xE000EF7C - - - Reserved
0xE000EF80 - - - Reserved
0xE000EFA4 - - - Reserved
0xE000EFA8 CM7_ABFSR RW Unknown Auxiliary Bus Fault Status Register on page 3-15
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-4
ID120914 Non-Confidential
System Control
0xE000EFB4 IEBR1k RW -
0xE000EFBC DEBR1k RW -
0xE000EFD0 PID4 - 0x00000004 See the Component and Peripheral ID register formats in
the ARM®v7-M Architecture Reference Manual.
0xE000EFD4 PID5 - 0x00000000
0xE000EFE0 PID0 - -l
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-5
ID120914 Non-Confidential
System Control
Purpose Provides implementation defined configuration and control options for the
processor.
31 27 26 25 21 20 16 15 14 13 12 11 10 9 3 2 1 0
DISDYNADD DISFOLD
DISCRITAXIRUR Reserved
DISBTACALLOC
DISBTACREAD
DISITMATBFLUSH
DISRAMODE
FPEXCODIS
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-6
ID120914 Non-Confidential
System Control
[31:27] - Reserved.
[20:16] DISDI
0 Normal operation.
1 Nothing can be dual-issued when this instruction type is in channel 0.
[20] VFP.
[19] Integer MAC and MUL
[18] Loads to PC.
[17] Indirect branches, but not loads to PC.
[16] Direct branches.
[11] DISRAMODE Disables dynamic read allocate mode for Write-Back Write-Allocate memory regions:
0 Normal operation.
1 Dynamic disabled.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-7
ID120914 Non-Confidential
System Control
[9:3] - Reserved.
[1:0] - Reserved.
Purpose Specifies:
• The ID number of the processor core.
• The version number of the processor core.
• The implementation details of the processor core.
31 24 23 20 19 16 15 4 3 0
ARCHITECTURE
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-8
ID120914 Non-Confidential
System Control
31 30 29 27 26 24 23 3 2 0
Reserved
[31:30] - Reserved.
[23:3] - Reserved.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-9
ID120914 Non-Confidential
System Control
Purpose Provides information about the size and behavior of the instruction or data
cache selected by the CSSELR. Architecturally, there can be up to eight
levels of cache, containing instruction, data, or unified caches. This
processor contains L1 instruction and data caches only.
31 30 29 28 27 13 12 3 2 0
WA
RA
WB
WT
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-10
ID120914 Non-Confidential
System Control
The LineSize field is encoded as 2 less than log(2) of the number of words in the cache line. For
example, a value of 0x0 indicates there are four words in a cache line, that is the minimum size
for the cache. A value of 0x1 indicates there are eight words in a cache line.
Table 3-7 shows the individual bit field and complete register encodings for the CCSIDR. Use
this to determine the cache size for the L1 data or instruction cache selected by the Cache Size
Selection Register (CSSELR). See Cache Size Selection Register.
Purpose Holds the value that the processor uses to select the CSSELR to use.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-11
ID120914 Non-Confidential
System Control
31 4 3 1 0
Reserved Level
InD
[31:4] - Reserved.
31 7 6 3 2 1 0
Reserved SZ
RETEN
RMW
EN
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-12
ID120914 Non-Confidential
System Control
[31:7] - - Reserved.
[2] RETEN RW Retry phase enable. When enabled the processor guarantees to honor the retry output on the
corresponding TCM interface, re-executing the instruction which carried out the TCM access.
0 Retry phase disabled.
1 Retry phase enabled.
The reset value is derived from the INITRETRYEN pin. The retry functionality can be used together
with external logic to support error detection and correction in the TCM
[1] RMW RW Read-Modify-Write (RMW) enable. Indicates that all writes to TCM, that are not the full width of the
TCM RAM, use a RMW sequence:
0 RMW disabled.
1 RMW enabled.
The reset value is derived from the INITRMWEN pin. The RMW functionality can be used together
with external logic to support error detection and correction in the TCM.
[0] EN RW TCM enable. When a TCM is disabled all accesses are made to the AXIM interface.
0 TCM disabled.
1 TCM enabled.
The reset value is derived from the INITTCMEN pin.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-13
ID120914 Non-Confidential
System Control
31 4 3 1 0
Reserved SZ
EN
[31:4] - - Reserved.
Purpose Controls the L1 ECC and the L1 cache coherency usage model.
31 3 2 1 0
Reserved
FORCEWT
ECCDIS
SIWT
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-14
ID120914 Non-Confidential
System Control
[0] SIWT RW Shared cacheable-is-WT for data cache. Enables limited cache
coherency usage:
0 Normal Cacheable Shared locations are treated as
being Non-cacheable. Programmed inner
cacheability attributes are ignored. This is the
default mode of operation for Shared memory. The
data cache is transparent to software for these
locations and therefore no software maintenance is
required to maintain coherency.
1 Normal Cacheable shared locations are treated as
Write-Through. Programmed inner cacheability
attributes are ignored. All writes are globally visible.
Other memory agent updates are not visible to
Cortex-M7 processor software without suitable
cache maintenance.
Useful for heterogeneous MP-systems where, for
example, the Cortex-M7 processor is integrated on
the Accelerator Coherency Port (ACP) interface on
an MP-capable processor.
This bit is RAZ/WI when data cache is not configured.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-15
ID120914 Non-Confidential
System Control
31 10 9 8 7 5 4 3 2 1 0
Reserved Reserved
AXIMTYPE EPPB
AXIM
AHBP
DTCM
ITCM
[31:10] - Reserved.
[7:5] - Reserved.
Purpose Stores information about the error detected in the instruction cache during
a cache lookup.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-16
ID120914 Non-Confidential
System Control
31 30 29 18 17 16 15 2 1 0
[31:30] - RW User-defined. Error detection logic sets this field to 0b00 on a new allocation and on powerup
reset.
[29:18] - RW Reserved
Purpose Stores information about the error detected in the data cache during a
cache lookup.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-17
ID120914 Non-Confidential
System Control
31 30 29 18 17 16 15 2 1 0
[31:30] - RW User-defined. Error detection logic sets this field to 0b00 on a new allocation and on powerup
reset.
[29:18] - RW Reserved.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-18
ID120914 Non-Confidential
System Control
Purpose Controls the priority between software and AHB slave access to TCMs.
See AHBS interface arbitration on page 5-31.
31 16 15 11 10 2 1 0
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-19
ID120914 Non-Confidential
System Control
[31:16] - - Reserved.
[15:11] INITCOUNT RW Fairness counter initialization value. Use to demote access priority of the requestor selected by
the CM7_AHBSCR.CTL field. The reset value is 0b01.
Note
• For round-robin mode set INITCOUNT to 0b01 and CM7_AHBSCR.CTL to 0b00 or
0b01.
• INITCOUNT must not be set to 0b00 because the demoted requestor will then always
take priority when contention occurs, which can lead to livelock.
• INITCOUNT is not used when CM7_AHBSCR.CTL is 0b11.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 3-20
ID120914 Non-Confidential
Chapter 4
Initialization
This chapter describes how to initialize the processor and which registers to access to enable
functionality before using the processor features. It contains the following section:
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 4-1
ID120914 Non-Confidential
Initialization
Some of the requirements for initialization are optional depending on the features implemented
in the Cortex-M7 processor.
Note
The Branch predictor is always enabled in the processor, therefore CCR.BP is RAO/WI. See
ARM®v7-M Architecture Reference Manual for more information on the Configuration and
Control register.
If the processor has been implemented with a Memory Protection Unit (MPU), before you can
use it you must enable the MPU in the MPU_CTRL register. See the ARM®v7-M Architecture
Reference Manual for more information.
When setting up the MPU, and if the MPU has previously been programmed, disable unused
regions to prevent any previous region settings from affecting the new MPU setup.
If the processor has been implemented with a Floating Point Unit (FPU) you must enable it
before floating point instructions can be executed. The following code is an example of how to
enable the feature.
CPACR EQU 0xE000ED88
DSB
ISB
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 4-2
ID120914 Non-Confidential
Initialization
Note
Floating point logic is only available with the Cortex-M7 processor with FPU.
If the processor has been implemented with L1 data or instruction caches, they must be
invalidated before they are enabled in software, otherwise UNPREDICTABLE behavior can occur.
inv_loop1
MOV r1, r4
inv_loop2
LSL r3, r1, r6
LSL r8, r2, r7
ORRr 3, r3, r8
DSB
ISB
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 4-3
ID120914 Non-Confidential
Initialization
DSB
ISB
DSB
ISB
If cache error checking and correction is included in the processor it is enabled by default from
reset. The following code example can be used to disable the feature. The operation is carried
out by modifying the CM7_CACR.ECCEN bit the PPB memory region.
CM7_CACR EQU 0xE000EF9C
DSB
ISB
Care must be taken when software changes the error checking fields in the CM7_CACR. If the
fields are changed when the caches contain data, ECC information in the caches might not be
correct for the new setting, resulting in unexpected errors and data loss. Therefore the fields in
the CM7_CACR must only be changed when both caches are turned off and the entire cache
must be invalidated after the change.
The TCM interfaces can be enabled at reset in the system by an external signal on the processor.
If they are disabled at reset then the following code example can be used to enable both the
instruction and data TCM interfaces in software:
CM7_ITCMCR EQU 0xE000EF90
CM7_DTCMCR EQU 0xE000EF94
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 4-4
ID120914 Non-Confidential
Initialization
DSB
ISB
DMA into TCM The System includes a DMA device that reads data from a ROM, and
writes it to the TCMs through the AHB slave interface. This method can
be used to preload the TCM so they can be used by the processor from
reset.
If the TCM connected to the processor supports error detection and correction then the TCM
interface should be configured to support the retry and read-modify-write features. These can
be enabled at reset in the system by external signals on the processor. If they are disabled at reset
then the following code example can be used to enable them in software:
CM7_ITCMCR EQU 0xE000EF90
CM7_DTCMCR EQU 0xE000EF94
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 4-5
ID120914 Non-Confidential
Initialization
DSB
ISB
The AHBP interface can be enabled at reset in the system by an external signal on the processor.
If it is disabled at reset then the following code example can be used to enable the AHBP
interface from software:
CM7_AHBPCR EQU 0xE000EF98
DSB
ISB
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 4-6
ID120914 Non-Confidential
Chapter 5
Memory System
This chapter describes the Cortex-M7 processor memory system. It contains the following
sections:
• About the memory system on page 5-2.
• Fault handling on page 5-3.
• Memory types and memory system behavior on page 5-5.
• AXIM interface on page 5-6.
• AHB peripheral interface on page 5-22.
• AHB slave interface on page 5-30.
• TCM interfaces on page 5-33.
• L1 caches on page 5-35.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-1
ID120914 Non-Confidential
Memory System
The Cortex-M7 processor memory system can be configured during implementation and
integration. It consists of:
• Separate optional instruction and data caches.
• Multiple optional Tightly-Coupled Memory (TCM) areas.
• An AHB Slave (AHBS) interface.
• An optional Memory Protection Unit (MPU). See Chapter 6 Memory Protection Unit.
• MBIST interface.
The cache architecture is Harvard, that is, only instructions can be fetched from the instruction
cache, and only data can be read from and written to the data cache.
In parallel with each of the caches are two areas of dedicated RAM accessible to both the
instruction and data sides. These are regions of TCM.
Instruction TCM (ITCM) uses the ITCM interface and the Data TCM (DTCM) uses two
interfaces, D0TCM and D1TCM. Cortex-M7 functional diagram on page 1-6 shows this.
The ITCM interface is 64-bits wide. The DTCM is divided into two 32-bit wide interfaces,
D0TCM and D1TCM. The upper 32-bits of data is on the D1TCM interface and the lower
32-bits of the data is on the D0TCM interface.
Memory accesses to the ITCM, required for fetching instructions and for data transfer
instructions, are performed if the address is in an enabled TCM region. Remaining instruction
accesses and remaining data accesses that are not in a peripheral interface region are looked up
in the appropriate L1 cache if they are cacheable. Accesses that are not serviced by the memory
system are passed through the AXI master (AXIM) interface or the AHBP interface to the
external memory system connected to the processor.
Both instruction and data cache RAM can be configured at implementation time to have Error
Correcting Code (ECC) to protect the data stored in the memory from errors. Each TCM
interface can support external logic to the processor to report to the processor that an error has
occurred.
The processor includes support for direct access to the TCM through the AHBS interface. The
interface provides high bandwidth for DMA traffic to the memory and can be used when the
remainder of the processor is in low-power standby mode, with the internal clock disabled.
The optional MPU handles both the instruction and data memory accesses. The MPU is
responsible for protection checking, address access permissions, and memory attributes for all
accesses. Some of these attributes can be passed through the AXIM interface or AHBP interface
to the external memory system.
The memory system includes a monitor for exclusive accesses. Exclusive load and store
instructions, for example LDREX and STREX, can be used with the appropriate memory monitoring
to provide inter-process or inter-processor synchronization and semaphores. See the ARM®v7-M
Architecture Reference Manual for more information.
The processor is designed for use in chip designs that use the AMBA 4 AXI and AMBA 3
AHB-Lite protocols.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-2
ID120914 Non-Confidential
Memory System
5.2.1 Faults
MPU faults
The MPU can generate a fault for various reasons. MPU faults are always synchronous, and take
priority over external faults. If an MPU fault occurs on an access that is not in the TCM, the AXI
or AHB transactions for that access are not performed.
External faults
A memory access or instruction fetch performed through the AXIM interface can generate two
different types of error response, a slave error (SLVERR) or decode error (DECERR). These
are known as external AXI errors, because they are generated by the AXI system outside the
processor.
A memory access performed through the AHBP interface can generate a single error response.
The processor manages this in the same way as a response of SLVERR from the AXI interface.
A memory or instruction fetch access performed on the TCM interface can generate a single
error response. The processor manages this in the same way as a response of SLVERR from the
AXI interface.
Synchronous faults are generated for instruction fetches and data loads. All stores generate
asynchronous faults.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-3
ID120914 Non-Confidential
Memory System
Note
An AXI slave device in the system that cannot handle exclusive transactions returns OKAY in
response to an exclusive read. This is also treated as an external error, and the processor behaves
as if the response was SLVERR.
Debug events
The debug logic in the processor can be configured to generate breakpoints or vector capture
events on instruction fetches, and watchpoints on data accesses. If the processor is
software-configured for monitor-mode debugging, a fault is taken when one of these events
occurs, or when a BKPT instruction is executed. For more information, see Chapter 9 Debug.
See External faults on page 5-3 for more information about the differences between
synchronous and asynchronous faults.
This section describes some ways in which errors can be handled in a system. Exactly how you
program the processor to handle faults depends on the configuration of your processor and
system, and what you are trying to achieve.
If a fault exception is taken, the fault handler reads the information in the link register, Program
Status Register (PSR) in the stack, and fault status registers to determine the type of fault. Some
types of fault are fatal to the system, and others can be fixed, and program execution resumed.
For example, an MPU background MemManage might indicate a stack overflow, and be
rectified by allocating more stack and reprogramming the MPU to reflect this. Alternatively, an
asynchronous external fault might indicate that a software error meant that a store instruction
occurred to an unmapped memory address. Such a fault is fatal to the system or process because
no information is recorded about the address the error occurred on, or the instruction that caused
the fault.
Table 5-1 shows which types of fault are typically fatal because either the location of the error
is not recorded or the error is unrecoverable. Some faults that are marked as not fatal might turn
out to be fatal in some systems when the cause of the error has been determined. For example,
an MPU background MemManage fault might indicate a stack overflow, that can be rectified,
or it might indicate that, because of a bug, the software has accessed a nonexistent memory
location, that can be fatal. These cases can be distinguished by determining the location where
the error occurred.
Synchronous external Load using external memory interface AXIM, AHBP Yes No
Asynchronous external Store to Normal or Device memory using external memory AXIM, AHBP No Yes
interface
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-4
ID120914 Non-Confidential
Memory System
• By default, only Normal, Non-shareable memory regions can be cached in the RAMs.
Caching only takes place if the appropriate cache is enabled and the memory type is
cacheable. Shared cacheable memory regions can be cached if CACR.SIWT is set to 1.
• The store buffer can merge any stores to Normal memory if they are not from a store
exclusive instruction accessing a memory region marked as Shared. See Store buffer on
page 5-36 for more information.
• Only non-cached Shared exclusive transactions are marked as exclusive on the external
interface. Load and store exclusive instructions to Shared cacheable memory regions do
not result in any accesses marked as exclusive on the external interface if CACR.SIWT is
set to 1.
• Only Normal memory is considered restartable, that is, a multi-word transfer can be
abandoned part way through because of an interrupt, to be restarted after the interrupt has
been handled. See Exception handling on page 2-9 for more information about interrupt
behavior.
• For exclusive accesses to Non-shared memory only the internal exclusive monitor is
updated and checked. Exclusive accesses to Shared memory are checked using the
internal monitor and also, if necessary, using an external monitor using the external
memory interface AXIM or AHBP.
Table 5-2 summarizes the processor memory types and associated behavior.
Exclusives
Memory type Can be cached Merging Restartable
handled
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-5
ID120914 Non-Confidential
Memory System
The AXIM interface conforms to the AXI4 standard as described in the ARM® AMBA® AXI and
ACE Protocol Specification. Within the AXI standard, the AXIM interface uses a number of
extension signals to indicate inner memory attributes and the request source. See AXI extensions
on page 5-10.
The AXIM interface can run at the same frequency as the processor or at a lower synchronous
frequency.
Note
References in this section to an AXI slave refer to the AXI slave in the external system that is
connected to the processor AXIM interface.
The following sections describe the attributes of the AXIM interface, and provide information
about the types of burst generated:
• AXI attributes and transactions.
• Identifiers for AXIM interface accesses on page 5-9.
• AXI extensions on page 5-10.
• Memory system implications for AXI accesses on page 5-10.
Table 5-3 shows the AXI attributes and transactions for the AXIM interface when the processor
is configured with the L1 data cache. This is for use in a native AXI system with high memory
bandwidth and supports multiple outstanding transactions, also known as a high performance
AXIM interface.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-6
ID120914 Non-Confidential
Memory System
Read ID capability 4 -
Only a subset of all possible AXI transactions can be generated. These are:
For more information on IDs used for different transactions, see Identifiers for AXIM interface
accesses on page 5-9.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-7
ID120914 Non-Confidential
Memory System
Table 5-4 shows the AXI attributes and transactions for when the processor is not configured to
include the L1 data cache. That is, if you want to use it in a low-cost AXI system, or bridged to
AHB, that has a low-bandwidth memory system, like on an off-chip memory system.
Read ID capability 2 -
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-8
ID120914 Non-Confidential
Memory System
The following ID values are for read and write channels, and Write-Allocate memory accesses
on the AXIM interface:
WID is not a required signal for AMBA 4 AXI. It is included for compatibility with AMBA 3
AXI systems.
AXI provides information about the privilege level of an access on the ARPROT and
AWPROT signals. However, when accesses might be cached or merged together, the resulting
transaction can have both privileged and user data combined. If this happens, the Cortex-M7
processor marks the transaction as privileged, even if it was initiated by a user process.
User Non-cacheable read access User except for LDM, LDRD and POP when the L1 data cache is
implemented
Privileged Privileged
User Normal non-cacheable write Privileged, except for STREXB, STREXH, and STREX
access
Privileged Privileged
The AXIM interface requires that the slave does not return a write response until it has received
the write address.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-9
ID120914 Non-Confidential
Memory System
Note
This write response requirement is mandatory for systems using the AMBA 4 AXI protocol. It
is also required if the Cortex-M7 processor is used with an external memory system using the
AMBA 3 AXI protocol.
The AXIM interface uses the ARCACHE and AWCACHE AXI signals and the ARSHARE,
AWSHARE, ARINNER, and AWINNER extension signals to indicate the memory attributes
of the transfer, as returned by the MPU:
• ARCACHE and AWCACHE of the master interface are generated from the memory
type and outer region attributes.
• ARINNER and AWINNER are generated from the memory type and inner region
attributes.
• ARSHARE and AWSHARE are asserted for transactions to shared memory regions.
In additional to these attribute extension signals the AXIM interface includes the following
signals:
AWSPARSE The AWSPARSE is part of the write address channel signal group and
indicates the burst uses sparse byte write-strobes, that is some of the beats
of the write burst do not contain data. You can use this signal to optimize
systems that bridge the AMBA 4 AXI protocol to AHB protocol.
See the ARM® AMBA® AXI and ACE Protocol Specification for valid encodings for all the
AxCACHE and AxINNER signals.
The attributes of the memory being accessed can affect an AXI access. The memory system can
cache any Normal memory address that is marked as either:
• Cacheable, Write-Back, Read-Allocate, Write-Allocate, Non-shareable.
• Cacheable, Write-Back, Read-Allocate only, Non-shareable.
• Cacheable, Write-Through, Read-Allocate only, Non-shareable.
However, Device and Strongly-ordered memory is always Non-cacheable. Also, any unaligned
access to Device or Strongly-ordered memory generates alignment UsageFault and therefore
does not cause any AXI transfer. This means that the access examples given in this chapter never
show unaligned accesses to Device or Strongly-ordered memory.
Note
Memory regions marked as Non-Cacheable Normal should not be used to access read-sensitive
peripherals in a system. This is because read transactions to these regions from the processor
can be repeated multiple times if the originating load instruction is interrupted.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-10
ID120914 Non-Confidential
Memory System
The processor conforms to the ARM® AMBA® AXI and ACE Protocol Specification, but it does
not generate all the AXI transaction types that the specification permits. This section describes
the types of AXI transaction that the AXIM interface does not generate.
If you are designing an AXI slave to work only with the Cortex-M7 processor, and there are no
other AXI masters in your system, you can take advantage of these restrictions and the interface
attributes, described in Table 5-3 on page 5-6, to simplify the slave.
This section also contains tables that show some examples of the types of AXI burst that the
processor generates. However, because a particular type of transaction is not shown here does
not mean that the processor does not generate such a transaction.
Note
An AXI slave device connected to the AXIM interface must be capable of handling every kind
of transaction permitted by the ARM® AMBA® AXI and ACE Protocol Specification, except
where there is an explicit statement in this chapter that such a transaction is not generated. You
must not infer any additional restrictions from the example tables given.
Load and store instructions to Non-cacheable memory might not result in an AXI transfer
because the data might either be retrieved from, or merged into the internal store data buffers.
The exceptions to this are loads or stores to Strongly-ordered or Device memory. These always
result in AXI transfers. See Strongly-ordered and Device transactions on page 5-12.
Restrictions on AXI transfers on page 5-12 describes restrictions on the type of transfers that the
AXIM interface generates. If the processor is powered up, the buffered write response and read
data channel ready signals, BREADY and RREADY, are always asserted. They are deasserted
when the processor enters Dormant or Shutdown mode. You must not make any other
assumptions about the AXI handshaking signals, except that they conform to the ARM® AMBA®
AXI and ACE Protocol Specification.
The following sections give examples of transfers generated by the AXIM interface:
• Restrictions on AXI transfers on page 5-12.
• Strongly-ordered and Device transactions on page 5-12.
• Linefills on page 5-17.
• Cache line write-back (eviction) on page 5-17.
• Non-cacheable reads on page 5-17.
• Non-cacheable, Write-Back no Write-Allocate or Write-Through writes on page 5-17.
• AXI transaction splitting on page 5-18.
• Normal write merging on page 5-19.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-11
ID120914 Non-Confidential
Memory System
The AXIM interface applies the following restrictions to the AXI transactions it generates:
• No transaction ever crosses a 32-byte boundary in memory. See AXI transaction splitting
on page 5-18.
• The write address channel always issues INCR type bursts, and never WRAP or FIXED.
• If the transfer size is 8 bits or 16 bits then the burst length is always one transfer.
• The transfer size is never greater than 64 bits, because it is a 64-bit AXI bus.
• Instruction fetches, identified by ARPROT[2], are always a 64 bit transfer size, and never
locked or exclusive.
• Transactions to Device and Strongly-ordered memory are always to addresses that are
aligned for the transfer size. See Strongly-ordered and Device transactions.
• Exclusive accesses are always to addresses that are aligned for the transfer size.
• Only exclusive accesses to shared memory result in exclusive accesses on the AXIM,
identified by ARLOCK and AWLOCK. Exclusive accesses to non-shared memory are
marked as non-exclusive accesses on the bus.
A load or store instruction to or from Strongly-ordered or Device memory always generates AXI
transactions of the same size as implied by the instruction. All accesses using LDM, STM, LDRD, or
STRD instructions to Strongly-ordered or Device memory occur as 32-bit transfers.
LDRB
Table 5-6 shows the values of ARADDR, ARBURST, ARSIZE, and ARLEN for a LDRB from
bytes 0-7 in Strongly-ordered or Device memory.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-12
ID120914 Non-Confidential
Memory System
LDRH
Table 5-7 shows the values of ARADDR, ARBURST, ARSIZE, and ARLEN for a LDRH from
halfwords 0-3 in Strongly-ordered or Device memory.
Note
A load of a halfword from Strongly-ordered or Device memory addresses 0x1, 0x3, 0x5, or 0x7
generates an alignment UsageFault.
Table 5-8 shows the values of ARADDR, ARBURST, ARSIZE, and ARLEN for a LDR or an
LDM that transfers one register (an LDM1) in Strongly-ordered or Device memory.
Note
A load of a word from Strongly-ordered or Device memory addresses 0x1, 0x2, 0x3, 0x5, 0x6, or
0x7 generates an alignment UsageFault.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-13
ID120914 Non-Confidential
Memory System
Table 5-9 shows the values of ARADDR, ARBURST, ARSIZE, and ARLEN for a LDM that
transfers two registers (an LDM2) in Strongly-ordered or Device memory.
Note
A load-multiple from address 0x1, 0x2, 0x3, 0x5, 0x6, 0x7, 0x9, 0xA, 0xB, 0xD, 0xE, or 0xF generates
an alignment UsageFault.
STRB
Table 5-10 shows the values of AWADDR, AWBURST, AWSIZE, AWLEN, and WSTRB for
an STRB to Strongly-ordered or Device memory over the AXIM interface.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-14
ID120914 Non-Confidential
Memory System
STRH
Table 5-11 shows the values of AWADDR, AWBURST, AWSIZE, AWLEN, and WSTRB for
an STRH over the AXIM interface to Strongly-ordered or Device memory.
Note
A store of a halfword to Strongly-ordered or Device memory addresses 0x1, 0x3, 0x5, or 0x7
generates an alignment UsageFault.
Table 5-12 shows the values of AWADDR, AWBURST, AWSIZE, AWLEN, and WSTRB for
an STR or an STM that transfers one register (an STM1) over the AXIM interface to Strongly-ordered
or Device memory.
Note
A store of a word to Strongly-ordered or Device memory addresses 0x1, 0x2, 0x3, 0x5, 0x6, or 0x7
generates an alignment UsageFault.
Table 5-13 shows the values of AWADDR, AWBURST, AWSIZE, AWLEN, and first
WSTRB for an STM that writes five registers (an STM5) over the AXIM interface to
Strongly-ordered or Device memory.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-15
ID120914 Non-Confidential
Memory System
Note
A store-multiple to address 0x1, 0x2, 0x3, 0x5, 0x6, or 0x7 generates an alignment UsageFault.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-16
ID120914 Non-Confidential
Memory System
Linefills
Loads and instruction fetches from Normal, cacheable memory that do not hit in the cache
generate a cache linefill when the appropriate cache is enabled. Table 5-14 shows the values of
ARADDR, ARBURST, ARSIZE, and ARLEN for cache linefills.
a. These are the bottom five bits of the address of the access that cause the
linefill, that is, the address of the critical word.
When a valid and dirty cache line is evicted from the data cache, a write-back of the data must
occur. Table 5-15 shows the values of AWADDR, AWBURST, AWSIZE, and AWLEN for
cache line write-backs, over the AXIM interface.
Non-cacheable reads
Load instructions accessing Non-cacheable Normal memory generate AXI bursts that are not
necessarily the same size or length as the instruction implies. In addition, if the data to be read
is contained in the store buffer, the instruction might not generate an AXI read transaction at all.
The tables in this section give examples of the types of AXI transaction that might result from
various store instructions, accessing various addresses in Normal memory. They are provided
as examples only, and are not an exhaustive description of the AXI transactions. Depending on
the state of the processor, and the timing of the accesses, the actual bursts generated might have
a different size and length to the examples shown, even for the same instruction.
In addition, write operations to Normal memory can be merged to create more complex AXI
transactions. See Normal write merging on page 5-19 for examples.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-17
ID120914 Non-Confidential
Memory System
Table 5-16 shows possible values of AWADDR, AWBURST, AWSIZE, AWLEN, and
WSTRB for an STRH to Normal memory.
Table 5-17 shows possible values of AWADDR, AWBURST, AWSIZE, AWLEN, and
WSTRB for an STR that transfers one register to Normal memory through the AXIM interface.
The processor splits AXI bursts when it accesses addresses across a cache line boundary, that
is, a 32-byte boundary. An instruction that accesses memory across one or two 32-byte
boundaries generates two or three AXI bursts respectively. The following examples show this
behavior. They are provided as examples only, and are not an exhaustive description of the AXI
transactions. Depending on the state of the processor, and the timing of the accesses, the actual
bursts generated might have a different size and length to the examples shown, even for the same
instruction.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-18
ID120914 Non-Confidential
Memory System
For example, LDMIA R10, {R0-R5} loads six words from Non-cacheable, Normal memory. The
number of AXI transactions generated by this instruction depends on the base address, R10:
• If all six words are in the same cache line, there is a single AXI transaction. For example,
for LDMIA R10, {R0-R5} with R10 = 0x1008, the interface might generate a burst of three,
64-bit read transfers, as shown in Table 5-18.
Table 5-18 AXI transaction splitting, all six words in same cache line
• If the data comes from two cache lines, then there are two AXI transactions. For example,
for LDMIA R10, {R0-R5} with R10 = 0x1010, the interface might generate one burst of two
64-bit reads, and one burst of a single 64-bit read, as shown in Table 5-19.
Table 5-20 shows possible values of ARADDR, ARBURST, ARSIZE, and ARLEN for an LDR
to Non-cacheable Normal memory that crosses a cache line boundary.
Table 5-21 shows possible values of AWADDR, AWBURST, AWSIZE, AWLEN, and
WSTRB for an STRH to Non-cacheable Normal memory that crosses a cache line boundary.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-19
ID120914 Non-Confidential
Memory System
The store buffer can detect when it contains more than one write request to the same cache line
for Write-Through Cacheable or Non-cacheable Normal memory. This means it can combine
the data from more than one instruction into a single write burst to improve the efficiency of the
AXI interface. If the AXIM receives several write requests that do not form a single contiguous
burst it can choose to output a single burst, with the WSTRB signal low for the bytes that do
not have any data.
For write accesses to Normal memory, the store can perform writes out of order, if there are no
address dependencies. It can do this to best use its ability to merge accesses.
Table 5-22 shows the values of AWADDR, AWBURST, AWSIZE, AWLEN, and WSTRB
generated if the memory at address 0x4000 is marked as Strongly-ordered or Device type
memory.
In Example 5-1, each store instruction produces an AXI burst of the same size as the data written
by the instruction.
Table 5-23 shows a possible resulting transaction if the same memory is marked as
Non-cacheable Normal, or Write-Through Cacheable.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-20
ID120914 Non-Confidential
Memory System
In this example:
• The store buffer has merged the STRB and STRH writes into one buffer entry, and therefore
a single AXI transfer, the fourth in the burst.
• The writes, that occupy three buffer entries, have been merged into a single AXI burst of
four transfers.
• The write generated by the STR instruction has not occurred, because it was overwritten by
the STM instruction.
• The write transfers have occurred out of order with respect to the original program order.
The transactions shown in Table 5-23 on page 5-20 show this behavior. They are provided as
examples only, and are not an exhaustive description of the AXI transactions. Depending on the
state of the processor, and the timing of the accesses, the actual bursts generated might have a
different size and length to the examples shown, even for the same instruction.
If the same memory is marked as Write-Back Cacheable, and the addresses are allocated into a
cache line, no AXI write transactions occur until the cache line is evicted and performs a
write-back transaction. See Cache line write-back (eviction) on page 5-17.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-21
ID120914 Non-Confidential
Memory System
The AHBP interface is a single 32-bit wide interface that connects to an external memory
system. It is used only for data access. Instruction fetches are never performed on the interface.
The AHBP interface conforms to the AHB-Lite specification, but it does not generate all the
AHB transaction types that the specification permits. This section describes the types of AHB
transaction that the AHBP interface does not generate. If you are designing an AHB slave to
work only with the Cortex-M7 processor AHBP interface, you can take advantage of these
restrictions and the interface attributes described in the following sections to simplify the slave.
This section also contains tables that show some of the types of AHB transaction that the
processor generates. However, because a particular type of transaction is not shown here does
not mean that the processor does not generate such a transaction.
Note
An AHB slave device connected to the AHBP interface must be capable of handling every kind
of transaction permitted by the AHB specification, except where there is an explicit statement
in this chapter that such a transaction is not generated. You must not infer any additional
restrictions from the example tables given.
Restrictions on AHBP interface transfers describes restrictions on the type of transfers that the
AHBP interface generates.
The following sections give examples of transfers generated by the AHBP interface:
• Restrictions on AHBP interface transfers.
• Strongly-ordered and Device transactions on page 5-23.
• Normal reads on page 5-26.
• Normal writes on page 5-27.
The AHBP interface applies the following restrictions to the AHB transactions it generates:
• The interface only uses one transfer and all bursts are single, that is HBURSTP[2:0] is
always SINGLE.
• The transfer size is never greater than 32 bits because it is a 32-bit AHB bus.
• Transactions to Device and Strongly-ordered memory are always to addresses that are
aligned for the transfer size.
• Exclusive accesses are always to addresses that are aligned for the transfer size.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-22
ID120914 Non-Confidential
Memory System
LDRB
Table 5-24 shows the values of HADDRP[1:0], HBURSTP, and HSIZEP for an LDRB from
bytes 0-3 in Strongly-ordered or Device memory.
LDRH
Table 5-25 shows the values of HADDRP[1:0], HBURSTP, and HSIZEP for an LDRH from
halfwords 0-1 in Strongly-ordered or Device memory.
Note
A load of a halfword from Strongly-ordered or Device memory addresses 0x1 or 0x3 generates
an alignment UsageFault.
Table 5-26 shows the values of HADDRP[1:0], HBURSTP, and HSIZEP for an LDR or an LDM
that transfers one register, an LDM1, in Strongly-ordered or Device memory.
Note
A load of a word from Strongly-ordered or Device memory addresses 0x1, 0x02, 0x3, 0x5, 0x06,
or 0x7 generates an alignment UsageFault.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-23
ID120914 Non-Confidential
Memory System
Table 5-27 shows the values of HADDRP[1:0], HBURSTP, and HSIZEP for an LDM that
transfers five registers, an LDM5, in Strongly-ordered or Device memory.
Note
A load of a word from Strongly-ordered or Device memory addresses 0x1, 0x2, or 0x3 generates
an alignment UsageFault.
STRB
Table 5-28 shows the values of HADDRP[1:0], HBURSTP, and HSIZEP for an STRB from
bytes 0-3 in Strongly-ordered or Device memory.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-24
ID120914 Non-Confidential
Memory System
STRH
Table 5-29 shows the values of HADDRP[1:0], HBURSTP, and HSIZEP for an STRH from
halfwords 0-1 in Strongly-ordered or Device memory.
Note
A store of a halfword to Strongly-ordered or Device memory addresses 0x1 or 0x3 generates an
alignment UsageFault.
Table 5-30 shows the values of HADDRP[1:0], HBURSTP, and HSIZEP for an STR that
transfers one register in Strongly-ordered or Device memory.
Note
A store of a word to Strongly-ordered or Device memory addresses 0x1, 0x2, or 0x3 generates
an alignment UsageFault.
Table 5-31 shows the values of HADDRP[1:0], HBURSTP, and HSIZEP for an STM that
transfers five registers, an STM5, over the AHBP interface to Strongly-ordered or Device
memory.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-25
ID120914 Non-Confidential
Memory System
Note
A store of a word from Strongly-ordered or Device memory addresses 0x1, 0x2, 0x3, 0x5, 0x6, or
0x7 generates an alignment UsageFault.
Normal reads
Load instructions accessing Normal memory generate AHBP interface transactions that might
not be the same size or length as the instruction implies. The tables in this section give examples
of AHBP transactions that might result from various load instructions, accessing various
addresses in Normal memory. They are examples only, and are not an exhaustive description of
the AHBP transactions.
LDRH
Table 5-32 shows possible values of HADDRP[2:0], HBURSTP, and HSIZEP for an LDRH
from bytes 0 to 3 in Normal memory.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-26
ID120914 Non-Confidential
Memory System
LDR
Table 5-33 shows possible values of HADDRP[2:0], HBURSTP, and HSIZEP for an LDR from
Normal memory.
Normal writes
Store instructions accessing Normal memory generate AHBP interface transactions that might
not be the same size or length as the instruction implies. The tables in this section give examples
of AHBP transactions that might result from various store instructions, accessing various
addresses in Normal memory. They are examples only, and are not an exhaustive description of
the AHBP transactions.
STRH
Table 5-34 shows possible values of HADDRP[1:0], HBURSTP, and HSIZEP for an STRH
from bytes 0 to 3 in Normal memory.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-27
ID120914 Non-Confidential
Memory System
Table 5-35 shows possible values of HADDRP[1:0], HBURSTP, and HSIZEP for an STR to
Normal memory.
The peripheral interfaces use the internal exclusive monitor of the memory system to manage
load, store and clear exclusive instructions to non-shared memory. The internal monitor checks
exclusive accesses to shared memory and also, if necessary, any external monitor using the AHB
memory interface. You can use these instructions to construct semaphores and ensure
synchronization between different processes or processors. See the ARM®v7-M Architecture
Reference Manual for more information about how these instructions work.
Only exclusive instructions to shared memory result in exclusive accesses on the AHBP.
Exclusive accesses to non-shared memory are marked as non-exclusive accesses on the bus.
The AHBP extension signals EXREQP and EXRESPP signal exclusive request and response
for shared exclusive transactions on AHBP.
This section describes the EXREQP and EXRESPP signals and the transaction properties for
AHBP exclusive accesses:
• EXREQP is an address phase signal and is only asserted when HTRANSP indicates a
valid transaction.
• EXRESPP is a data phase signal and is only sampled on a data phase when HREADYP
is 1.
• A store exclusive is performed to a Shared memory region on the AHBP and the internal
exclusive access monitor passes. When the internal exclusive access monitor fails, no
store is performed on the AHBP.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-28
ID120914 Non-Confidential
Memory System
Table 5-36 shows the transaction properties the system must use for EXRESPP.
Transaction properties
Required EXRESPP
EXREQP Load/Store
0 Load/Store -
1 Store 1 if a system monitor is implemented that covers the access address and the exclusive check fails
0 otherwise
Software must avoid performing exclusive accesses to shared regions of memory if no global
exclusive monitor is implemented that covers the region in question. The processor treats such
accesses as an error condition and automatically takes a BusFault exception if a load is
performed with EXREQP set to 1 and receives EXRESPP set to 1. The processor ignores
EXRESPP for accesses that:
• Are performed with EXREQP set to 0. ARM recommends that the system drives
EXRESPP to 0 in these cases.
The Cortex-M7 processor uses EXREQP and EXRESPP differently from the Cortex-M3
processor and the Cortex-M4 processor, in which case you might have to update both system
hardware and software when moving to a system using the Cortex-M7 processor.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-29
ID120914 Non-Confidential
Memory System
Writes are buffered in the processor Store Queue (SQ). The SQ also buffers software writes to
to the TCM and it performs all stores in-order and without merging. Reads do not forward data
from the SQ and can be performed to the TCM out-of-order with respect to buffered writes.
The AHBS interface only supports single outstanding transactions. To minimise latency, reads
can overtake buffered writes. If there is a data dependency between a read and a buffered write,
hazarding logic stalls the read and attempts to drain the SQ until there are no longer any
dependencies. Writes continue to be performed in-order. Hazarding is performed at byte
granularity.
All AHBS accesses are treated as being the same endianness as memory. No data swizzling is
performed for reads or writes.
The AHBS interface can be used when the processor is in sleep state.
The processor does not support AHBS transactions that are directly dependent on software
memory transactions. This means that the system must not introduce any dependencies where a
software memory access cannot complete until a corresponding AHBS transaction completes.
Loopback from processor master ports onto the AHBS are not supported because this might
cause deadlock.
Note
Loopback arrangements should not be required. The processor has higher bandwidth to TCM
than the AHBS interface. This means directly transferring data to and from TCM should be
faster than through the AHBS interface.
This restriction does not preclude arrangements where software memory-mapped accesses are
used. On the AHBP for example, to request an external agent to perform transactions on the
AHBS interface. In this case do not introduce dependency in the system between the control
access that initiates the transaction and the transaction itself.
AHBS interface transactions are not capable of performing MPU lookups. Further, no
distinction is made internally between unprivileged and privileged AHBS interface accesses as
indicated on HPROTS. The system is entirely responsible for providing TCM protection
functionality for AHBS interface accesses as required.
A TCM error mechanism must be used by the external TCM interface logic to indicate back to
the AHBS interface that the access was aborted. In this case, the external TCM interface logic
should also mask writes and obfuscate read data. For more information on the TCM interface
protocol, see TCM interface protocol on page 5-34.
The AHBS interface reads that are aborted on the TCM interface return the read data supplied
with an error response on HRESPS. The AHBS interface writes are buffered and always return
an OK response speculatively. If a write is subsequently aborted on the TCM interface, the
AHBS raises an asynchronous abort to the system using the WABORTS signal.
The AHBS does not support exclusive or locked accesses and AHBS interface stores do not
affect the state of the internal exclusive access monitor. This makes it unsuitable for systems
requiring concurrency controls between the AHBS interface and software.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-30
ID120914 Non-Confidential
Memory System
For more information on the TCM data sharing models supported between software and AHBS
interface, see Usage models on page 5-4.
• Round-robin only.
• Round-robin with reduced AHBS interface bandwidth using the fairness counter.
• Round-robin with reduced AHBS interface bandwidth using the fairness counter with
execution priority set above a defined threshold.
Round-robin is used in all arbitration modes and has the following characteristics:
• Any requestor, that is software, AHBS interface, or TCM, is granted access when there is
no contention. This scheme guarantees:
— Optimal throughput for each requestor when contention is rare. In this case, the
resource usage is not evenly balanced between requestors and one requestor is more
active than the other. When contention is frequent however, the scheme used tends
towards even resource allocation between the requestors.
— Optimal average throughput across all requestors when contention is common.
See AHB Slave Control Register on page 3-19 for more information about how to use
CM7_AHBSCR.INITCOUNT.
Typically this AHBS interface bandwidth moderation feature is expected to be used for
real-time critical code that runs in a high priority ISR. To allow individual ISRs to demote
AHBS interface traffic, a threshold execution priority (TPRI) mode is provided to enable the
processor hardware to automatically do this.
See AHB Slave Control Register on page 3-19 for more information about how to use TPRI.
Note
The processor could stop executing code if the counter initialization value is 0 and the AHBS
interface fully occupies the bandwidth of a TCM or the SQ.
The system can control the AHBS interface access priority directly using the AHBSPRI input
signal on the processor. See AHB Slave Control Register on page 3-19.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-31
ID120914 Non-Confidential
Memory System
Note
• Improper programming might directly degrade overall system performance.
• For the AHBS interface to accept AHBS transactions all resets must be de-asserted.
• Changes to CM7_AHBSCR might not occur immediately because the processor must
completed existing AHBS interface traffic.
• CM7_AHBSCR settings can be overruled and should only be considered as a hint to the
processor.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-32
ID120914 Non-Confidential
Memory System
The TCM interfaces are designed to be connected to RAM, or RAM-like memory, that is,
Normal-type memory. The processor can issue speculative read accesses on these interfaces,
and interrupt store instructions that have issued some but not all of their write accesses.
Therefore, both read and write accesses through the TCM interfaces can be repeated. This
means that the TCM interfaces are generally not suitable for read- or write-sensitive devices
such as FIFOs. ROM can be connected to the TCM interfaces, but normally only if ECC is not
used. If the access is speculative, the processor ignores any error or retry signaled on any of the
TCM interfaces.
The TCM interfaces also have wait and error signals to support slow memories and external
error detection and correction. For more information, see TCM interface protocol on page 5-34.
The Prefetch Unit (PFU) can read data using any of the TCM interfaces. The Load Store Unit
(LSU) and the AHBS interface can each read and write data using the TCM interfaces.
Each TCM interface has a fixed base address, see System address map on page 2-5.
Accesses to the TCMs from the LSU and PFU are checked against the MPU for access
permission. Memory access attributes and permissions are not exported on this interface. Any
unaligned access to Device or Strongly Ordered memory generates an alignment UsageFault.
Reads that generate an MPU fault or alignment UsageFault are broadcast on the TCM interface,
but the data is not used and the associated load instruction does not update any processor
registers, ensuring protection is maintained. Writes that generate an MPU fault or alignment
UsageFault are never broadcast on the TCM interface.
The size of each TCM interface is configured during integration. The TCM sizes are:
• 0KB.
• 4KB.
• 8KB.
• 16KB.
• 32KB.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-33
ID120914 Non-Confidential
Memory System
• 64KB.
• 128KB.
• 256KB.
• 512KB.
• 1MB.
• 2MB.
• 4MB.
• 8MB.
• 16MB.
The DTCM has two interfaces D0TCM and D1TCM. This means the size of the RAM attached
each interface is half the total size of the DTCM.
The size of the TCM interfaces is visible to software in the TCM Control Registers, see
Instruction and Data Tightly-Coupled Memory Control Registers on page 3-12. Memory
requests to addresses above the implemented TCM size are sent to the AXIM interface.
Each TCM interface receives requests from the LSU, PFU, and AHBS. In most cases, the LSU
has the highest priority, followed by the PFU, with the AHBS interface having lowest priority.
Each TCM interface operates independently to read and write data to and from the memory
attached to it. Information about which memory location is to be accessed is passed on the
appropriate TCM interface along with write data. In addition, the TCM interface provides
information about whether the access results from an instruction fetch from the PFU, a data
access from the LSU, or a DMA transfer from the AHBS interface.
Read data is read back from the TCM interface. In addition, the TCM memory controller can
indicate that the processor must wait one or more cycles before reading the response, or signal
that an error has occurred and must be faulted. For more information about TCM errors, see
Faults on page 5-3.
If the TCM memory controller supports ECC error detection and correction it can indicate to the
processor that an access must be retried to return the corrected data. The TCM retry
functionality must be enabled in the processor to support external TCM error correction by
setting the ITCMCR.RETEN or DTCMCR.RETEN bit to 1. See Instruction and Data
Tightly-Coupled Memory Control Registers on page 3-12.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-34
ID120914 Non-Confidential
Memory System
5.8 L1 caches
This section describes the behavior of the optional L1 caches in the Cortex-M7 processor
memory system.
The memory system is configured during implementation and can include instruction and data
caches of varying sizes. You can configure whether each cache controller is included and, if it
is, configure the size of each cache independently. The cached instructions or data are fetched
from external memory using the AXIM interface. The cache controllers use RAMs that are
integrated into the Cortex-M7 processor during implementation.
Any access that is not for a TCM or the AHBP interface is handled by the appropriate cache
controller. If the access is to Non-shared cacheable memory, and the cache is enabled, a lookup
is performed in the cache and, if found in the cache, that is, a cache hit, the data is fetched from
or written into the cache. When the cache is not enabled and for Non-cacheable or Shared
memory the accesses are performed using the AXIM interface.
Both caches allocate a memory location to a cache line on a cache miss because of a read, that
is, all cacheable locations are Read-Allocate. In addition, the data cache can allocate on a write
access if the memory location is marked as Write-Allocate. When a cache line is allocated, the
appropriate memory is fetched into a linefill buffer by the AXIM interface before being written
to the cache. The linefill buffers always fetch the requested data first, return it, and fetch the rest
of the cache line. This enables the data read without waiting for the linefill to complete and is
known as critical word first and non-blocking behavior. If subsequent instructions require data
from the same cache line, this can also be returned when it has been fetched without waiting for
the linefill to complete, that is, the caches also support streaming. If an error is reported to the
AXIM interface for a linefill, the linefill does not update the cache RAMs.
A synchronous fault is generated if the faulting data is used by a non-speculative read in the
processor. An asynchronous fault is generated by a line-fill when an external fault occurs if write
data from an address configured as Write-Back has been merged into the line from the store
buffer. See Store buffer on page 5-36.
The data cache is four-way set-associative, the instruction cache is two-way set-associative.
Both caches use a line-length of 32-bytes. If all the cache lines in a set are valid, to allocate a
different address to the cache, the cache controller must evict a line from the cache.
Writes accesses that hit in the data cache are written into the cache RAMs. If the memory
location is marked as Write-Through, the write is also performed on the AXIM interface, so that
the data stored in the RAM remains coherent with the external memory system. If the memory
is Write-Back, the cache line is marked as dirty, and the write is only performed on the AXIM
interface when the line is evicted. When a dirty cache line is evicted, the data is passed to the
write buffer in the AXIM interface to be written to the external memory system.
The cache controllers also manage the cache maintenance operations described in Cache
maintenance operations on page 5-37.
Each cache can also be configured with ECC. If ECC is implemented and enabled, then the tags
associated with each line, and data read from the cache are checked whenever a lookup is
performed in the cache and, if possible, the data is corrected before being used in the processor.
A full description of ECC error checking and correction is beyond the scope of this document.
Contact ARM if you require more information.
For more information on the general rules about memory attributes and behavior, see the
ARM®v7-M Architecture Reference Manual.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-35
ID120914 Non-Confidential
Memory System
To prevent this, the Cortex-M7 Bus Interface Unit (BIU) includes logic to detect when a full
cache line has been written by the core before the linefill has completed. If this situation is
detected on three consecutive linefills, it switches into dynamic read allocate mode. When in
dynamic read allocate mode, loads behave as normal and can still cause linefills, and writes still
lookup in the cache but, if they miss, they write out to external memory rather than starting a
linefill.
The BIU continues in dynamic read allocate mode until it detects either a cacheable write burst
to external memory that is not a full cache line, or there is a load to the same line as is currently
being written to external memory.
Dynamic read allocate mode can be disabled by setting the ACTLR.DISRAMODE to 1. See
Auxiliary Control Register on page 3-6.
The memory system includes a store buffer to hold data before it is written to the cache RAMs
or passed to the AXIM interface. The store buffer has four entries. Each entry can contain up to
64 bits of data and a 32-bit address. All write requests from the data-side that are not to a TCM
or the AHBP interface are stored in the store buffer.
The store buffer has merging capabilities. If a previous write access has updated an entry, other
write accesses on the same line can merge into this entry. Merging is only possible for stores to
Normal memory.
Merging is possible between several entries that can be linked together if the data inside the
different entries belong to the same cache line.
• AXIM interface:
— For Non-cacheable, Write-Through Cacheable, Write-Back no Write-Allocate
Cacheable stores that miss in the data cache, a write access is performed on the
AXIM interface.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-36
ID120914 Non-Confidential
Memory System
— For Write-Back, Write-Allocate stores that miss in the data cache, a linefill is started
using either of the two linefill buffers. When the linefill data is returned from the
external memory system, the data in the store buffer is merged into the linefill buffer
and subsequently written into the cache.
• All bytes in the entry have been written. This might result from merging.
• The entry is Non-cacheable or Write-Through and has been waiting for merge data for too
long.
The store buffer is drained of all stores to Strongly-ordered or Device memory before a load is
performed from Strongly-ordered or Device memory.
All cache maintenance operations are executed by writing to registers in the memory mapped
System Control Space (SCS) region of the internal PPB memory space. The operations
supported for the data cache are:
• Invalidate by address.
• Invalidate by Set/Way combination.
• Clean by address.
• Clean by Set/Way combination.
• Clean and Invalidate by address.
• Clean and Invalidate by Set/Way combination.
After you enable or disable the instruction cache, you must issue an ISB instruction to flush the
pipeline. This ensures that all subsequent instruction fetches see the effect of enabling or
disabling the instruction cache.
After reset, you must invalidate each cache before enabling it.
When disabling the data cache, you must clean the entire cache to ensure that any dirty data is
flushed to external memory.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-37
ID120914 Non-Confidential
Memory System
Before enabling the data cache, you must invalidate the entire data cache because external
memory might have changed from when the cache was disabled.
Before enabling the instruction cache, you must invalidate the entire instruction cache if
external memory might have changed since the cache was disabled.
See Chapter 4 Initialization for example code suitable for initializing and enabling the
instruction and data caches.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 5-38
ID120914 Non-Confidential
Chapter 6
Memory Protection Unit
This chapter describes the Memory Protection Unit (MPU). It contains the following sections:
• About the MPU on page 6-2.
• MPU functional description on page 6-3.
• MPU programmers model on page 6-4.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 6-1
ID120914 Non-Confidential
Memory Protection Unit
• Access permissions.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 6-2
ID120914 Non-Confidential
Memory Protection Unit
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 6-3
ID120914 Non-Confidential
Memory Protection Unit
Note
The MPU registers support aligned word accesses only. Byte and halfword accesses are
UNPREDICTABLE.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 6-4
ID120914 Non-Confidential
Chapter 7
Nested Vectored Interrupt Controller
This chapter describes the Nested Vectored Interrupt Controller (NVIC). It contains the
following sections:
• About the NVIC on page 7-2.
• NVIC functional description on page 7-3.
• NVIC programmers model on page 7-4.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 7-1
ID120914 Non-Confidential
Nested Vectored Interrupt Controller
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 7-2
ID120914 Non-Confidential
Nested Vectored Interrupt Controller
You can only fully access the NVIC from privileged mode, but you can cause interrupts to enter
a pending state in user mode if you enable the Configuration and Control Register. Any other
user mode access causes a bus fault.
You can access all NVIC registers using only word accesses. For more information on NVIC
registers accessibility and their usage constraints, see the ARM®v7-M Architecture Reference
Manual.
Your implementation can include a Wake-up Interrupt Controller (WIC). This enables the
processor and NVIC to be put into a very low-power sleep mode leaving the WIC to identify
and prioritize interrupts. When the WIC is used, you must enable SLEEPDEEP in the System
Control Register.
The processor fully implements the Wait For Interrupt (WFI), Wait For Event (WFE), and the Send
Event (SEV) instructions. In addition, the processor also supports the use of SLEEPONEXIT, that
causes the processor core to enter sleep mode when it returns from an exception handler to
Thread mode. See the ARM®v7-M Architecture Reference Manual for more information.
The processor supports both level and pulse interrupts. A level interrupt is held asserted until it
is cleared by the ISR accessing the device. A pulse interrupt is a variant of an edge model. You
must ensure that the pulse is sampled on the rising edge of the processor clock, FCLK, instead
of being asynchronous.
For level interrupts, if the signal is not deasserted before the return from the interrupt routine,
the interrupt again enters the pending state and re-activates. This is particularly useful for FIFO
and buffer-based devices because it ensures that they drain either by a single ISR or by repeated
invocations, with no extra work. This means that the device holds the signal in assert until the
device is empty.
A pulse interrupt can be reasserted during the ISR so that the interrupt can be in the pending
state and active at the same time. If another pulse arrives while the interrupt is still pending, the
interrupt remains pending and the ISR runs only once.
Pulse interrupts are mostly used for external signals and for rate or repeat signals.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 7-3
ID120914 Non-Confidential
Nested Vectored Interrupt Controller
Purpose Shows the number of interrupt lines that the NVIC supports.
31 4 3 0
Reserved
INTLINESNUM
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 7-4
ID120914 Non-Confidential
Nested Vectored Interrupt Controller
[31:4] - Reserved.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 7-5
ID120914 Non-Confidential
Chapter 8
Floating Point Unit
This chapter describes the Floating Point Unit (FPU). It contains the following sections:
• About the FPU on page 8-2.
• FPU functional description on page 8-3.
• FPU programmers model on page 8-5.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 8-1
ID120914 Non-Confidential
Floating Point Unit
• 16 double-precision registers. This is the same as for FPv4 and there are no additional
registers.
Table 8-1 shows the ISA supported for the different configurations of the Cortex-M7 processor.
It provides floating-point computation functionality that is compliant with the ANSI/IEEE Std
754-2008, IEEE Standard for Binary Floating-Point Arithmetic, referred to as the IEEE 754
standard.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 8-2
ID120914 Non-Confidential
Floating Point Unit
The FPU fully supports single-precision and double-precision add, subtract, multiply, divide,
multiply and accumulate, and square root operations. It also provides conversions between
fixed-point and floating-point data formats, and floating-point constant instructions.
The FPU provides an extension register file containing 32 single-precision registers. These can
be viewed as:
• Sixteen 64-bit doubleword registers, D0-D15.
• Thirty-two 32-bit single-word registers, S0-S31.
• A combination of registers from these views.
For more information about the FPU, see the ARM®v7-M Architecture Reference Manual.
The modes of operation are controlled using the Floating-Point Status and Control Register,
FPSCR. For more information about the FPSCR see the ARMv7-M Architecture Reference
Manual.
Full-compliance mode
In full-compliance mode, the FPU processes all operations according to the IEEE 754 standard
in hardware.
Flush-to-zero mode
Setting the FPSCR.FZ bit enables flush-to-zero mode. In this mode, the FPU treats all
subnormal input operands of arithmetic operations as zeros in the operation. Exceptions that
result from a zero operand are signaled appropriately. VABS, VNEG, and VMOV are not considered
arithmetic operations and are not affected by flush-to-zero mode. A result that is tiny, as
described in the IEEE 754 standard, where the destination precision is smaller in magnitude than
the minimum normal value before rounding, is replaced with a zero. The FPSCR.IDC bit
indicates when an input flush occurs. The FPSCR.UFC bit indicates when a result flush occurs.
Setting the FPSCR.DN bit enables default NaN mode. In this mode, the result of any arithmetic
data processing operation that involves an input NaN, or that generates a NaN result, returns the
default NaN. Propagation of the fraction bits is maintained only by VABS, VNEG, and VMOV
operations. All other arithmetic operations ignore any information in the fraction bits of an input
NaN.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 8-3
ID120914 Non-Confidential
Floating Point Unit
When Default NaN (DN) and Flush-to-Zero (FZ) modes are disabled, FPv5 functionality is
compliant with the IEEE 754 standard in hardware. No support code is required to achieve this
compliance.
See the ARM®v7-M Architecture Reference Manual for information about FP architecture
compliance with the IEEE 754 standard.
8.2.3 Exceptions
The FPU sets the cumulative exception status flag in the FPSCR register as required for each
instruction, in accordance with the FPv5 architecture. The FPU does not support exception
traps. The processor also has six output pins, FPIXC, FPUFC, FPOFC, FPDZC, FPIDC, and
FPIOC, that each reflect the status of one of the cumulative exception flags.
The processor can reduce the exception latency by using lazy stacking. This means that the
processor reserves space on the stack for the FP state, but does not save that state information
to the stack until it is required to do so. See the ARM®v7-M Architecture Reference Manual for
more information.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 8-4
ID120914 Non-Confidential
Floating Point Unit
0x10110221b
0x12000011b
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 8-5
ID120914 Non-Confidential
Chapter 9
Debug
This chapter describes how to debug and test software running on the processor. It contains the
following sections:
• About debug on page 9-2.
• About the AHBD interface on page 9-7.
• About the FPB on page 9-8.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-1
ID120914 Non-Confidential
Debug
For processors that implement debug, ARM recommends that a debugger identify and connect
to the debug components using the CoreSight debug infrastructure.
Figure 9-1 shows the recommended flow that a debugger can follow to discover the components
in the CoreSight debug infrastructure. In this case a debugger reads the peripheral and
component ID registers for each CoreSight component in the CoreSight system.
Pointers
‡ Optional component
To identify the Cortex-M7 processor within the CoreSight system, ARM recommends that a
debugger perform the following actions:
1. Locate and identify the Cortex-M7 Processor ROM table using its CoreSight
identification. See Table 9-2 on page 9-4 for more information.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-2
ID120914 Non-Confidential
Debug
2. Follow the pointer in the Cortex-M7 Processor ROM table to the Cortex-M7 PPB ROM
table. From the PPB ROM table pointers the following components can be identified:
a. System Control Space (SCS).
b. Breakpoint unit (FPB).
c. Data Watchpoint and Trace unit (DWT).
d. Instrumentation Trace Macrocell unit (IMT).
See Table 9-4 on page 9-5 for more information.
When a debugger identifies the SCS from its CoreSight identification, it can identify the
processor and its revision number from the CPUID register in the SCS at address 0xE000ED00.
A debugger cannot rely on the Cortex-M7 Processor ROM table being the first ROM table
encountered. One or more system ROM tables are required between the access port and the
processor ROM table if other CoreSight components are in the system. If a system ROM table
is present, this can include a unique identifier for the implementation.
Table 9-1 shows the processor ROM table identification registers and values for debugger
detection. This permits debuggers to identify the processor.
0xE00FEFD0 Peripheral ID4 0x00000004 Component and Peripheral ID register formats in the
ARM®v7-M Architecture Reference Manual
0xE00FEFD4 Peripheral ID5 0x00000000
These values for the Peripheral ID registers identify this as the Cortex-M7 Processor ROM
table. The Component ID registers identify this as a CoreSight ROM table.
Note
The Cortex-M7 Processor ROM table only supports word-size transactions.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-3
ID120914 Non-Confidential
Debug
Table 9-2 shows the CoreSight components that the Cortex-M7 Processor ROM table points to.
0xE00FE000 Cortex-M7 PPB ROM Table 0x00001003 See Cortex-M7 PPB ROM table identification and entries
0xE00FE004 ETM 0xFFF43003a See the ARM® CoreSight™ ETM-M7 Technical Reference Manual
0xE00FE00C Reserved 0x1FF02002 See the ARM® CoreSight™ Architecture Specification (v2.0)
The Cortex-M7 Processor ROM table entries point to the debug components of the processor.
The offset for each entry is the offset of that component from the ROM table base address,
0xE00FE000.
See the ARM® CoreSight™ Architecture Specification (v2.0) for more information about the
ROM table ID and component registers, and access types.
Table 9-3 shows the Cortex-M7 PPB ROM table identification registers and values for debugger
detection. This permits debuggers to identify the CoreSight components on the PPB in the
processor and their debug capabilities.
0xE00FFFD0 Peripheral ID4 0x00000004 Component and Peripheral ID register formats in the
ARM®v7-M Architecture Reference Manual
0xE00FFFD4 Peripheral ID5 0x00000000
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-4
ID120914 Non-Confidential
Debug
These values for the Peripheral ID registers identify this as the Cortex-M7 PPB ROM table. The
Component ID registers identify this as a CoreSight ROM table.
Note
The Cortex-M7 PPB ROM table only supports word size transactions.
Table 9-4 shows the CoreSight components that the Cortex-M7 PPB ROM table points to. The
values depend on the implemented debug configuration.
0xE00FF010 Reserved (TPIU) 0xFFF41002 Not present, TPIU not implemented inside
Cortex-M7.
0xE00FF018 End marker 0x00000000 See DAP accessible ROM table in the ARM®v7-M
Architecture Reference Manual.
0xE00FFFCC SYSTEM ACCESS 0x00000001
The Cortex-M7 PPB ROM table entries point to the debug components of the processor. The
offset for each entry is the offset of that component from the ROM table base address,
0xE00FF000.
See the ARM®v7-M Architecture Reference Manual and the ARM® CoreSight™ Architecture
Specification (v2.0) for more information about the ROM table ID and component registers, and
their addresses and access types.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-5
ID120914 Non-Confidential
Debug
Table 9-5 shows the SCS CoreSight identification registers and values for debugger detection.
Final debugger identification of the Cortex-M7 processor is through the CPUID register in the
SCS. See CPUID Base Register on page 3-8.
See the ARM®v7-M Architecture Reference Manual and the ARM® CoreSight™ Architecture
Specification (v2.0) for more information about the ROM table ID and component registers, and
their addresses and access types.
Table 9-6 shows the debug registers. Each of these registers is 32 bits wide and is described in
the ARM®v7-M Architecture Reference Manual.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-6
ID120914 Non-Confidential
Debug
• A view of memory that is consistent with that observed by load/store instructions acting
on the processor.
AHBD interface accesses are only in little-endian format. The processor ensures data is
presented in the correct big- or little-endian format to the system. This is transparent to the
debugger.
Note
• The instruction cache is not accessible to a debugger. Therefore debugger accesses to
cacheable, executable regions of memory might not be coherent with the instructions
visible to the instruction side of the processor.
• The data cache must be enabled by setting the CCR.DC to 1 to read and write data to the
cache. If CCR.DC is set to 0 all debug requests to memory regions outside the TCM and
peripheral address space will access only the external memory on AXIM even if the debug
request is marked as cacheable on the AHBD interface.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-7
ID120914 Non-Confidential
Debug
The FPB can be configured during implementation to provide either four or eight instruction
comparators. You can configure each comparator individually to return a BKPT instruction to the
processor on a match, to provide hardware breakpoint capability.
The FPB does not support Flash patching. The FP_REMAP register is not implemented and is
RAZ/WI.
The FPB contains both a global enable and individual enables for each of the comparators
implemented. If the comparison for an entry matches, the address is remapped to a BKPT
instruction if that feature is enabled.
If the FPB supports only four breakpoints then only comparators 0-3 are used, and comparators
4-7 are implemented as RAZ/WI.
Table 9-7 shows the FPB registers. Depending on the implementation of your processor, some
of these registers might not be present. Any register that is configured as not present reads as
zero.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-8
ID120914 Non-Confidential
Debug
All FPB registers are described in the ARM®v7-M Architecture Reference Manual.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 9-9
ID120914 Non-Confidential
Chapter 10
Cross Trigger Interface
This chapter describes the Cortex-M7 Cross Trigger Interface (CTI). It contains the following
sections:
• About the CTI on page 10-2.
• Cortex-M7 CTI functional description on page 10-3.
• CTI programmers model on page 10-5.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 10-1
ID120914 Non-Confidential
Cross Trigger Interface
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 10-2
ID120914 Non-Confidential
Cross Trigger Interface
Table 10-1 shows how the CTI trigger inputs are connected to the Cortex-M7 processor.
Table 10-2 shows how the CTI trigger outputs are connected to the processor and ETM.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 10-3
ID120914 Non-Confidential
Cross Trigger Interface
CTITRIGOUT[2] Interrupt request 1 CTI to system Acknowledged by writing to the CTIINTACK register in ISR
CTITRIGOUT[0] Processor debug request CTI to processor Acknowledged by the debugger writing to the CTIINTACK
register
Note
• After the processor is halted using CTI Trigger Output 0, the Processor Debug Request
signal remains asserted. The debugger must write to CTIINTACK to clear the halting
request before restarting the processor.
• After asserting an interrupt using the CTI Trigger Output 1 or 2, the Interrupt Service
Routine (ISR) must clear the interrupt request by writing to the CTI Interrupt
Acknowledge, CTIINTACK.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 10-4
ID120914 Non-Confidential
Cross Trigger Interface
Address Reset
Register name Type Description
offset value
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 10-5
ID120914 Non-Confidential
Cross Trigger Interface
Address Reset
Register name Type Description
offset value
0xFD4 - - - Reserved
0xFD8 - - - Reserved
0xFDC - - - Reserved
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 10-6
ID120914 Non-Confidential
Chapter 11
Data Watchpoint and Trace Unit
This chapter describes the Data Watchpoint and Trace (DWT) unit. It contains the following
sections:
• About the DWT on page 11-2.
• DWT functional description on page 11-3.
• DWT programmers model on page 11-4.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 11-1
ID120914 Non-Confidential
Data Watchpoint and Trace Unit
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 11-2
ID120914 Non-Confidential
Data Watchpoint and Trace Unit
The first comparator, DWT_COMP0, can also compare against the clock cycle counter,
CYCCNT. You can also use the second comparator, DWT_COMP1, as a data comparator.
A reduced DWT contains two comparators that you can use as a watchpoint or as a trigger. The
comparators support data matching.
Note
An event is generated each time a counter overflows.
You can configure the DWT to generate PC samples at defined intervals, and to generate
interrupt event information.
The DWT provides periodic requests for protocol synchronization to the ITM.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 11-3
ID120914 Non-Confidential
Data Watchpoint and Trace Unit
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 11-4
ID120914 Non-Confidential
Data Watchpoint and Trace Unit
Note
• Cycle matching functionality is only available in comparator 0.
• Data value is only sampled for accesses that do not produce an MPU or bus fault. The PC
is sampled irrespective of any faults. The PC is only sampled for the first address of a
burst.
• ARM does not recommend PC match for watchpoints because watchpoints are
asynchronous to the event which causes them. It mainly guards and triggers the ETM.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 11-5
ID120914 Non-Confidential
Chapter 12
Instrumentation Trace Macrocell Unit
This chapter describes the Instrumentation Trace Macrocell (ITM) unit. It contains the
following sections:
• About the ITM on page 12-2.
• ITM functional description on page 12-3.
• ITM programmers model on page 12-4.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 12-1
ID120914 Non-Confidential
Instrumentation Trace Macrocell Unit
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 12-2
ID120914 Non-Confidential
Instrumentation Trace Macrocell Unit
Software trace Software can write directly to ITM stimulus registers to generate packets.
Hardware trace The DWT generates these packets, and the ITM outputs them.
Time stamping Timestamps are generated relative to packets. The ITM contains a 21-bit
counter to generate the timestamp. The processor clock output clocks the
counter.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 12-3
ID120914 Non-Confidential
Instrumentation Trace Macrocell Unit
Depending on the implementation of your processor, the ITM registers might not be present.
Any register that is configured as not present reads as zero.
Note
• You must enable TRCENA of the Debug Exception and Monitor Control Register before
you program or use the ITM.
• If the ITM stream requires synchronization packets, you must configure the
synchronization packet rate in the DWT.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 12-4
ID120914 Non-Confidential
Instrumentation Trace Macrocell Unit
Note
ITM registers are fully accessible in privileged mode. In user mode, all registers can be read,
but only the Stimulus Registers and Trace Enable Registers can be written, and only when the
corresponding Trace Privilege Register bit is set. Invalid user mode writes to the ITM registers
are discarded.
Purpose Enables an operating system to control the stimulus ports that are
accessible by user code.
Usage constraints You can only write to this register in privileged mode.
31 4 3 0
Reserved
PRIVMASK
[31:4] - Reserved.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 12-5
ID120914 Non-Confidential
Chapter 13
Fault detection and handling
This chapter describes the fault detection and handling features of the Cortex-M7 processor. It
contains the following sections:
• About fault detection and handling on page 13-2.
• Cache RAM protection on page 13-3.
• Logic protection on page 13-6.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 13-1
ID120914 Non-Confidential
Fault detection and handling
When the system-on-chip reports a failure, the logging and status must provide all the required
information to identify the source of the failure. The intention is to detect and correct the errors
as much as possible, and identify them to the system.
For Error Correcting Code (ECC) on RAM, all errors explicitly seen must be reported, so that
the error propagation is minimized.
The processor uses Single Error Correction and Double Error Detection (SEC-DED) ECCs to
detect and correct errors in the RAMs. A finite number of hard, that is, permanent errors can be
detected and corrected with continued normal operation using dedicated error registers.
A monitor external to the processor is responsible for analyzing the notified error and marking
the corrupted entries as reusable if it has been proven to be a soft error. This analysis can be
performed by reading and writing the RAM directly through the processor MBIST interface.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 13-2
ID120914 Non-Confidential
Fault detection and handling
Detecting errors
The Cortex-M7 processor uses ECC to detect errors in the cache RAMs.
The Cortex-M7 processor can recover from a RAM error detected in the cache by using clean
and invalidate and retry. When an error is detected, as shown in Table 13-1 on page 13-4, the
corresponding index/way is cleaned and invalidated. When the clean and invalidate operation
completed, the requester retries its access. The ECC can also be used to correct single-bit errors
in the RAM.
Instruction cache
In the instruction cache, lines are always clean so that invalidating the line is
sufficient. The retried access then fetches the correct value from external
memory.
Data cache In the data cache, the cache line can be dirty. The correction of the RAM contents
is done as part of the clean and invalidate operation for caches. This takes place
in the write buffer and the corrected data is written back to external memory. The
retried access then reads the correct value from external memory. If the data
cannot be corrected then the error is non-recoverable.
General behavior
If hard, or permanent, errors occur on the RAMs, the clean, invalidate and retry
scheme might cause a deadlock, and the access is continuously replayed. To
prevent this, error bank registers are provided to mask the faulty locations as
unusable and invalid. There are two banks for each side of the memory system.
When an error is detected, the location is pushed in the bank, which masks the
corresponding valid bit of the location when reading and when allocating a new
line. The line is therefore no longer used unless the entry is reset. Because of
implementation details, there is a short period of time during which the line is still
seen by the system, but is removed from the allocation pool.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 13-3
ID120914 Non-Confidential
Fault detection and handling
The depth of the error bank determines how many errors can be supported by the
system. When this limit is reached, the system might livelock. The processor
provides information to the system indicating the number of corrupted locations
to monitor the error bank status before it becomes full. This is a condition that can
cause a potential deadlock. This information is reported on several pins signaling
the use of the error bank, that is, showing if the error bank is empty or at least one
error has been encountered.
Both the instruction and data side use the same algorithm to select the bank to update:
• If both banks are valid, or both banks are non-valid, and both are not locked then a
round-robin counter updated on each allocation selects the bank to fill.
• If there is one locked bank then the other bank is always allocated, whether or not it is
already valid.
Table 13-1 shows how the different types of RAM are protected.
RAM type Protection Recoverable error Non-recoverable error Hard error support
Data tag RAM SEC-DED ECC Error seen as single bit Error seen as a multiple bit Up to two hard errors
errors error
Data cache data RAM SEC-DED ECC Error seen as single bit Error seen as a multiple bit
errors error on dirty lines
Instruction cache data RAM SEC-DED ECC Any error on the data Nonea
stored in the RAM
a. The instruction cache is never dirty so cache RAM errors are always recoverable by invalidating the cache and retrying the instruction.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 13-4
ID120914 Non-Confidential
Fault detection and handling
Table 13-2 shows the RAM configuration with or without ECC when the processor is
implemented with 4KB instruction and data cache.
In an error-free system, the major performance impact is the cost of the read-modify-write
scheme for non-full stores in the data side. If a store buffer slot does not contain at least a full
32-bit word, it must read the word to be able to compute the check bits. This can occur because
software only writes to an area of memory with byte or halfword store instructions. The data can
then be written in the RAM. This additional read can have a negative impact on performance
because it prevents the slot from being used for another write.
The buffering and outstanding capabilities of the memory system mask part of the additional
read, and it is negligible for most codes. However, it is recommended that you use as few
cacheable STRB and STRH instructions as possible to reduce the performance impact.
Note
There might be a frequency impact because XOR trees are added on the data returned from the
RAMs.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 13-5
ID120914 Non-Confidential
Fault detection and handling
The outputs of the two processors are compared on each cycle to detect any error. The outputs
of the first processor are delayed so they can be synchronized with the second processor. This
mechanism relies on the fact that any error occurring in the processor is eventually visible on
the outputs of the processor, or is inherently a safe failure.
On detection of an error in one processor, both processors are reset before executing a code
sequence, to put them in the same initial state. They can then restart execution from a previously
taken snapshot.
The processor provides a template of the logic required for the comparison of the two
processors.
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. 13-6
ID120914 Non-Confidential
Appendix A
Revisions
This appendix describes the technical changes between released issues of this book.
First release - -
ARM®v7-M Architecture Reference Manual, issue E.b, ARM architecture on page 1-12 r0p2
defines Flash Patch Breakpoint version 2 onwards
Implementation options table updated Table 1-1 on page 1-4 All revisions
Data Process Unit changed to Data Processing Unit Data Processing Unit on page 1-7 All revisions
Single MAC pipeline description clarified Data Processing Unit on page 1-7 All revisions
Prefetch Unit features clarified Prefetch Unit on page 1-7 All revisions
ETM block description clarified Cross Trigger Interface Unit on page 1-9 All revisions
TCM interface description clarified TCM interface on page 1-10 All revisions
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. A-1
ID120914 Non-Confidential
Revisions
MBIST interface description clarified MBIST interface on page 1-11 All revisions
Binary compatibility with other Cortex processors Binary compatibility with other Cortex processors on All revisions
section updated page 2-4
Exclusive monitor description clarified Exclusive monitor on page 2-7 All revisions
Private peripheral bus section updated Private peripheral bus on page 2-6 All revisions
Exception handling section updated Exception handling on page 2-9 All revisions
System control registers table updated Table 3-1 on page 3-3 r0p2
ACTLR bit assignments table updated Table 3-3 on page 3-7 r0p2
CLIDR bit assignments table updated Table 3-5 on page 3-9 r0p2
CCSIDR bit assignments figure clarified CCSIDR bit assignments on page 3-10 All revisions
AHBP Control Register clarified AHBP Control Register on page 3-13 All revisions
CACR[1] name and function updated Table 3-11 on page 3-15 r0p2
Changed RAZ to RAO in Note About Initialization on page 4-2 All revisions
Changed AHBP peripheral interface to AHBP About the memory system on page 5-2 All revisions
interface
Changed AHBP peripheral port to AHBP port Fault handling on page 5-3 All revisions
Write ID capability description clarified Table 5-3 on page 5-6 All revisions
ARADDR value for address 0x1D updated Table 5-20 on page 5-19 All revisions
TCM attributes and permissions section updated TCM attributes and permissions on page 5-33 r0p1 and
r0p2
Store buffer behavior clarified Store buffer on page 5-36 All revisions
Low power modes section updated Low power modes on page 7-3 All revisions
Processor ROM table identification values addresses Table 9-1 on page 9-3 All revisions
updated
Processor ROM table components table updated Table 9-2 on page 9-4 All revisions
FPB register summary table updated Table 9-7 on page 9-8 All revisions
DWT register summary table updated Table 11-1 on page 11-4 All revisions
Error bank register behavior section added Protection method on page 13-3 All revisions
ARM DDI 0489B Copyright © 2014 ARM. All rights reserved. A-2
ID120914 Non-Confidential