Coresight Etm - M4: Technical Reference Manual
Coresight Etm - M4: Technical Reference Manual
Coresight Etm - M4: Technical Reference Manual
™ ™
Revision: r0p1
Change history
Proprietary Notice
Words and logos marked with ® or ™ are registered trademarks or trademarks of ARM Limited 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 Limited 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
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. ii
ID070610 Non-Confidential
Contents
CoreSight ETM-M4 Technical Reference Manual
Preface
About this book ......................................................................................................... viii
Feedback ..................................................................................................................... x
Chapter 1 Introduction
1.1 About the ETM-M4 ................................................................................................... 1-2
1.2 Compliance .............................................................................................................. 1-3
1.3 Features ................................................................................................................... 1-4
1.4 Interfaces ................................................................................................................. 1-5
1.5 Configurable options ................................................................................................ 1-6
1.6 Test features ............................................................................................................ 1-7
1.7 Product documentation, design flow, and architecture ............................................ 1-8
1.8 Product revisions ................................................................................................... 1-10
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. iii
ID070610 Non-Confidential
Contents
Appendix B Revisions
Glossary
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. iv
ID070610 Non-Confidential
List of Tables
CoreSight ETM-M4 Technical Reference Manual
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. v
ID070610 Non-Confidential
List of Figures
CoreSight ETM-M4 Technical Reference Manual
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. vi
ID070610 Non-Confidential
Preface
This preface introduces the CoreSight ETM-M4 Technical Reference Manual. It contains the
following sections:
• About this book on page viii
• Feedback on page x.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. vii
ID070610 Non-Confidential
Preface
You implement the ETM-M4 macrocell with either the Cortex-M4 processor or the Cortex-M4F
processor. In this manual, in general:
• any reference to the processor applies to either the Cortex-M4 processor or the
Cortex-M4F processor, as appropriate
• any reference to the Cortex-M4 processor applies also to the Cortex-M4F processor, as
appropriate.
The context makes it clear if information applies to only one of the processor options.
The rnpn identifier indicates the revision status of the product described in this book, where:
rn Identifies the major revision of the product.
pn Identifies the minor revision or modification status of the product.
Intended audience
• Hardware and software engineers integrating the macrocell into an ASIC that includes a
Cortex™-M4 processor. You can find complementary information in the Cortex-M4
Integration Manual (ARM DII 0239).
Chapter 1 Introduction
Read this for an introduction to the functionality of the macrocell.
Appendix B Revisions
Read this for a description of the technical changes between released issues of this
book.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. viii
ID070610 Non-Confidential
Preface
Conventions
Typographical
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 bold Denotes language keywords when used outside example code.
< and > Enclose replaceable terms for assembler syntax where they appear in code
or code fragments. For example:
MRC p15, 0 <Rd>, <CRn>, <CRm>, <Opcode_2>
Further reading
ARM publications
This book contains information that is specific to this product. See the following documents for
other relevant information:
• Cortex-M4 Technical Reference Manual (ARM DDI 0439)
• Cortex-M4 Integration and Implementation Manual (ARM DII 0239)
• Embedded Trace Macrocell™ Architecture Specification (ARM IHI 0014)
• CoreSight Components Technical Reference Manual (ARM DDI 0314)
• CoreSight Architecture Specification (ARM IHI 0020)
• CoreSight Technology System Design Guide (ARM DGI 0012)
• AMBA™ 3 APB Protocol Specification (ARM IHI 0024)
• AMBA 3 ATB Protocol Specification (ARM IHI 0032).
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. ix
ID070610 Non-Confidential
Preface
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:
If you have any comments on this book, send an e-mail to errata@arm.com. Give:
• the title
• the number
• the relevant page number(s) to which your comments apply
• a concise explanation of your comments.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. x
ID070610 Non-Confidential
Chapter 1
Introduction
This chapter introduces the ETM-M4 macrocell. It contains the following sections:
• About the ETM-M4 on page 1-2
• Compliance on page 1-3
• Features on page 1-4
• Interfaces on page 1-5
• Configurable options on page 1-6
• Test features on page 1-7
• Product documentation, design flow, and architecture on page 1-8
• Product revisions on page 1-10.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-1
ID070610 Non-Confidential
Introduction
Figure 1-1 shows a typical Cortex-M4 system in a System-on-Chip (SoC) that includes a
CoreSight ETM-M4 macrocell.
Cortex-M4
processor
ITM
ATB
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-2
ID070610 Non-Confidential
Introduction
1.2 Compliance
ETM-M4 is compatible with the CoreSight architecture.
ETM-M4 implements version 3.5 of the ETM architecture, ETMv3.5. See the Embedded Trace
Macrocell Architecture Specification for more information.
For more information about architectural compliance, see Architecture and protocol information
on page 1-9.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-3
ID070610 Non-Confidential
Introduction
1.3 Features
ETM-M4 provides:
• tracing of 16-bit and 32-bit Thumb instructions
• four EmbeddedICE watchpoint inputs
• a Trace Start/Stop block with EmbeddedICE inputs
• one reduced function counter
• two external inputs
• a 24-byte FIFO queue
• global timestamping.
See the Embedded Trace Macrocell Architecture Specification for information about:
• the trace protocol
• controlling tracing using triggering and filtering resources.
See the Cortex-M4 Integration and Implementation Manual for information about the macrocell
signals.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-4
ID070610 Non-Confidential
Introduction
1.4 Interfaces
The system connections to the ETM-M4 are supported using a Cross Trigger Interface (CTI):
• 0-2 external inputs
• trigger output.
See Configurable options on page 1-6 and Interfaces on page 2-7 for more information about
the external inputs and external outputs.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-5
ID070610 Non-Confidential
Introduction
• the maximum number of external inputs, see External inputs on page 2-5
• whether the system supports the FIFOFULL mechanism for stalling the processor, see
Table 2-1 on page 2-3.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-6
ID070610 Non-Confidential
Introduction
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-7
ID070610 Non-Confidential
Introduction
See Further reading on page ix for more information about the books described in this section.
1.7.1 Documentation
The ETM-M4 is delivered as synthesizable RTL. Before it can be used in a product, it must go
through the following process:
1. Implementation. The implementer synthesizes the RTL, usually in combination with the
processor, then places and routes the netlist to produce a hard macrocell.
2. Integration. The integrator instantiates the macrocell of the combined processor and ETM
into a SoC. This includes testing its integration with the other SoC components to which
it is connected.
3. Programming. The debug software developer programs the ETM and tests any trace
software required for use with a SoC.
For more information see the Cortex-M4 Integration and Implementation Manual.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-8
ID070610 Non-Confidential
Introduction
Trace macrocell
The ETM-M4 implements the ETM architecture version 3.5. See Embedded Trace Macrocell
Architecture Specification.
This ETM-M4 complies with the Advanced Microcontroller Bus Architecture (AMBA) 3
Advanced Peripheral Bus (APB) and Advanced Trace Bus (ATB) protocols. See AMBA 3 APB
Protocol Specification and AMBA 3 ATB Protocol Specification.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-9
ID070610 Non-Confidential
Introduction
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 1-10
ID070610 Non-Confidential
Chapter 2
Functional Description
This chapter describes the interfaces, operation, clocking and resets of the macrocell. It contains
the following sections:
• About the functions on page 2-2
• Interfaces on page 2-7
• Operation on page 2-8.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 2-1
ID070610 Non-Confidential
Functional Description
ETM-M4
Cortex-M4
Trace Generation
processor
Trace Control:
ATB Trace port
DWT Counter Cortex-M4
Start/Stop block TPIU or and
Trigger generation Coresight SerialWire
CTI Programming interface system trace outputs
ITM
ATB
The Cortex-M4 system can perform low-bandwidth data tracing using the Data Watchpoint and
Trace (DWT) and Instruction Trace Macrocell (ITM) components.
The ETM trace output is compatible with the AMBA Trace Bus (ATB) protocol, irrespective of
the configuration of the trace port size and trace port mode within the ETM programmers model.
The TPIU exports trace information from the processor. An implementation can replace the
TPIU with other CoreSight trace components.
The ETM provides a trace ID register for systems that use multiple trace sources. You must
configure this register even if only a single trace source is in use.
2.1.1 Resources
Because the ETM does not generate data trace information, the lower bandwidth reduces the
requirement for complex triggering capabilities. This means that the ETM only includes a small
sub-set of the possible resources allowed by the ETM architecture.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 2-2
ID070610 Non-Confidential
Functional Description
Data comparators 0
Context ID comparators 0
Sequencer No
External inputs 2
External outputs 0
FIFOFULL Yes
Data suppression No
Dynamic port mode, including stalling No. Supported by asynchronous port mode.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 2-3
ID070610 Non-Confidential
Functional Description
Load PC first No
Fetch comparisons No
You configure the trace enable event, timestamp event, and trigger event using the same
mechanism. For each event, a 17-bit register is used to define the event. This register provides:
• Resource A, bits [6:0]
• Resource B, bits [13:7]
• a Boolean function, bits [16:14].
Table 2-2 shows the encodings used for the Boolean function.
Encoding Function
0b000 A
0b001 NOT(A)
0b010 A AND B
0b101 A OR B
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 2-4
ID070610 Non-Confidential
Functional Description
Timestamps are encoded as 48-bit natural binary numbers. A system implementation may
provide a timestamp count which can be used by several trace sources as an aid to correlating
the trace streams.
The ETM uses a fixed synchronization packet generation frequency of every 1024 bytes of trace.
The DWT provides four address comparators on the data bus that provide debug functionality.
Within the DWT unit, you can specify the functions triggered by a match, and one of these
functions is to generate an ETM match input. These inputs are presented to the ETM as
Embedded In Circuit Emulator (ICE) comparator inputs.
A single DWT resource can trigger an ETM event and also generate instrumentation trace
directly from the same event.
You can configure the four DWT comparators individually to compare with the address of the
current executing instruction to permit the ETM access to an instruction address compare
resource. These inputs are presented to the ETM as Embedded ICE comparator inputs. The
DWT provides either 1 or 4 comparators, depending on the implementation of the processor.
Note
Using a DWT comparator as an instruction address comparator reduces the number of available
data address comparisons.
See the Cortex-M4 Technical Reference Manual for more information about the DWT unit.
Two external inputs, ETMEXTIN[1:0], enable additional components to generate trigger and
enable signals for the ETM.
The start/stop block provides a single-bit resource that can be used as an input to other parts of
the resource logic, including the trace enable logic. The start/stop block can only be controlled
by using the EmbeddedICE inputs to the ETM. The DWT controls these inputs.
The start/stop block is set to the start state if any of the EmbeddedICE watchpoint inputs selected
as start resources in ETMTESSEICR go HIGH. The start/stop block is set to the stop state if any
of the EmbeddedICE watchpoint inputs selected as stop resources in ETMTESSEICR go LOW.
If bit [25] of ETMTECR1 is 1, tracing will only be enabled when the start/stop block is in the
start state.
Tracing is also only enabled when the result of evaluating the Trace Enable Event is TRUE. This
event can be set to always be TRUE by programming a value of 0x6F to ETMTEEVR. For more
information see the Embedded Trace Macrocell Architecture Specification.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 2-5
ID070610 Non-Confidential
Functional Description
2.1.7 Triggering
The ETM provides a trigger resource that can be used to identify a point within a trace run. The
generation of a trigger does not affect the tracing in any way, but the trigger will be output in the
trace stream, and can also be passed to other trace components or used to halt the processor. An
external trace port analyzer can use the trigger to determine when to start and stop capture of
trace.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 2-6
ID070610 Non-Confidential
Functional Description
2.2 Interfaces
The ETM-M4 has the following external interfaces:
ATB A 32-bit Advanced Trace Bus provides trace output from the macrocell. See the
AMBA 3 ATB Protocol Specification for more information about this interface.
APB An Advanced Peripheral Bus provides the control interface for the macrocell. See
the AMBA 3 APB Protocol Specification for more information about this
interface.
CTI Your implementation can provide a Cross Trigger Interface to manage the
interconnection of trigger and control signals between the processor core, ETM,
and TPIU. The implementation of your Cortex-M4 processor determines which
ETM functions are visible to the CTI. See Appendix A Signal Descriptions for
details of recommended CTI connections for Cortex-M4 systems.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 2-7
ID070610 Non-Confidential
Functional Description
2.3 Operation
ETM-M4 implements version 3.5 of the ARM Embedded Trace Macrocell protocol. See the
Embedded Trace Macrocell Architecture Specification.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 2-8
ID070610 Non-Confidential
Chapter 3
Programmers Model
This chapter describes the programmers model. It contains the following sections:
• About the programmers model on page 3-2
• Modes of operation and execution on page 3-3
• Register summary on page 3-4
• Register descriptions on page 3-6.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-1
ID070610 Non-Confidential
Programmers Model
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-2
ID070610 Non-Confidential
Programmers Model
The Embedded Trace Macrocell Architecture Specification describes the features of ETMv3.5.
See Features on page 1-4 for information on the trace features of the ETM-M4.
When the ETM is powered up or reset, you must program all of the registers that do not have an
architected reset state before you enable tracing. If you do not do so, the trace results are
UNPREDICTABLE.
When programming the ETM registers you must enable all the changes at the same time. To
achieve this, the Programming bit in ETMCR should be used. See Main Control Register,
ETMCR on page 3-6.
When the Programming bit is set to 0 you must not write to registers other than ETMCR,
because this can lead to UNPREDICTABLE behavior.
When setting the Programming bit, you must not change any other bits of ETMCR. You must
only change the value of bits other than the Programming bit of ETMCR when bit [1] of ETMSR
is set to 1. ARM recommends that you use a read-modify-write procedure when changing
ETMCR.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-3
ID070610 Non-Confidential
Programmers Model
0xE00411E8 ETMCCER 0x18541800 RO Configuration Code Extension Register, ETMCCER on page 3-12
0xE0041314 ETMPDSR 0x00000001 RO Device Power-Down Status Register, ETMPDSR on page 3-13
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-4
ID070610 Non-Confidential
Programmers Model
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-5
ID070610 Non-Confidential
Programmers Model
Purpose Controls general operation of the ETM, such as whether tracing is enabled.
Configurations This register is only available if the processor is configured to use the
ETM.
Attributes See the ETM register summary in Table 3-1 on page 3-4.
31 29 28 27 22 21 20 18 17 16 15 14 13 12 11 10 9 8 7 6 4 3 2 1 0
Reserved Reserved
[31:29] - RAZ
[28] Timestamp enable When set, this bit enables timestamping. An ETM reset sets this bit to 0.
[27:22] - RAZ
[20:18] - Reserved
[17:16] Port mode [1:0] These bits are implemented but have no function.
An ETM reset sets these bits to 0.
[15:14] - Reserved
[12] - Reserved
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-6
ID070610 Non-Confidential
Programmers Model
[11] ETM port selection This bit can be used to control other trace components in an implementation. The possible values
are:
0 ETMEN is LOW.
1 ETMEN is HIGH.
This bit must be set by the trace software tools to ensure that trace output is enabled from this
ETM.
An ETM reset sets this bit to 0.
[10] ETM programming This bit must be set to 1 at the start of the ETM programming sequence. Tracing is prevented while
this bit is set to 1.
On an ETM reset this bit is set to 0b1.
[9] Debug request control When set to 1 and the trigger event occurs, the ETMDBGRQ output is asserted until HALTED
is observed. This enables the ARM processor to be forced into Debug state.
An ETM reset sets this bit to 0.
[8] Branch output When set to 1 all branch addresses are output, even if the branch was because of a direct branch
instruction. Setting this bit enables reconstruction of the program flow without having access to
the memory image of the code being executed.
When this bit is set to 1, more trace data is generated, and this may affect the performance of the
trace system. Information about the execution of a branch is traced regardless of the state of this
bit.
An ETM reset sets this bit to 0.
[7] Stall processor The FIFOFULL output can be used to stall the processor to prevent overflow. The FIFOFULL
output is only enabled when the stall processor bit is set to 1. When the bit is 0 the FIFOFULL
output remains LOW at all times and the FIFO overflows if there are too many trace packets. Trace
resumes without corruption once the FIFO has drained, if overflow does occur.
An ETM reset sets this bit to 0.
For information about the interaction of this bit with the ETMFFLR register see the Embedded
Trace Macrocell Architecture Specification.
[6:4] Port size [2:0] The ETM-M4 has no influence over the external pins used for trace. These bits are implemented
but not used.
On an ETM reset these bits reset to 0b001.
[3:1] - Reserved
[0] ETM power down This bit can be used by an implementation to control if the ETM is in a low power state. This bit
must be cleared by the trace software tools at the beginning of a debug session.
When this bit is set to 1, writes to some registers and fields might be ignored. You can always write
to the following registers and fields:
• ETMCR bit [0]
• ETMLAR
• ETMCLAIMSET register
• ETMCLAIMCLR register
When the ETMCR is written with this bit set to 1, bits other than bit [0] might be ignored.
On an ETM reset this bit is set to 1.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-7
ID070610 Non-Confidential
Programmers Model
Configurations This register is only available if the processor is configured to use the
ETM.
Attributes See the ETM register summary in Table 3-1 on page 3-4.
31 30 28 27 26 25 24 23 22 20 19 17 16 15 13 12 8 7 4 3 0
ETM ID
register Reserved Number of data
present value comparators
Coprocessor and Number of memory Number of address
memory mapped map decoders comparator pairs
access supported Number of counters
Trace start/stop Sequencer present
block present Number of external inputs
Number of Context ID Number of external outputs
comparators FIFOFULL logic present
[31] ETM ID register present The value of this bit is 1, indicating that the ETMIDR, register 0x79, is present and
defines the ETM architecture version in use.
[30:28] - Reserved.
[27] Coprocessor and memory access The value of this bit is 1, indicating that memory-mapped access to registers is
supported.
[26] Trace start/stop block present The value of this bit is 1, indicating that the Trace start/stop block is present.
[25:24] Number of Context ID comparators The value of these bits is 0b00, indicating that Context ID comparators are not
implemented.
[23] FIFOFULL logic present The value of this bit is 1, indicating that FIFOFULL logic is present in the ETM.
To use FIFOFULL the system must also support the function, as indicated by bit
[8] of ETMSCR, see System Configuration Register, ETMSCR on page 3-9.
[22:20] Number of external outputs The value of these bits is 0b000, indicating that no external outputs are supported.
[19:17] Number of external inputs The value of these bits is between 0b000 and 0b010, indicating the number of
external inputs, from 0 to 2, implemented in the system.
[16] Sequencer present The value of this bit is 0, indicating that the sequencer is not implemented.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-8
ID070610 Non-Confidential
Programmers Model
[15:13] Number of counters The value of these bits is 0b001, indicating that one counter is implemented.
[12:8] Number of memory map decoders The value of these bits is 0b00000, indicating that memory map decoder inputs are
not implemented.
[7:4] Number of data value comparators The value of these bits is 0b0000, indicating that data value comparators are not
implemented.
[3:0] Number of address comparator pairs The value of these bits is 0b0000, indicating that address comparator pairs are not
implemented.
Purpose Shows the ETM features supported by the implementation of the ETM
macrocell.
Configurations This register is only available if the processor is configured to use the
ETM.
31 18 17 16 15 14 12 11 10 9 8 7 6 5 4 3 2 0
Reserved 0 0 0 0 1
No fetch comparisons
Reserved Maximum
(N -1), where N = Number of supported processors port size[2:0]
Port mode supported Reserved,
Port size supported reads as 1
Maximum port size[3] Reserved,
FIFOFULL supported reads as 0x0
[31:18] - Reserved.
[17] No Fetch comparisons The value of this bit is 1, indicating that fetch comparisons are not implemented.
[16:15] - Reserved.
[14:12] (N-1) These bits give the number of supported processors minus 1. The value of these bits is 0b000,
indicating that there is only one processor connected.
[11] Port mode supported This bit reads as 1 if the currently selected port mode is supported. This has no effect on the
TPIU trace port.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-9
ID070610 Non-Confidential
Programmers Model
[10] Port size supported This bit reads as 1 if the currently selected port size is supported. This has no effect on the
TPIU trace port.
[9] Maximum port size [3] Maximum ETM port size bit [3]. This bit is used in conjunction with bits [2:0]. Its value is 0.
This has no effect on the TPIU trace port.
[8] FIFOFULL supported The value of this bit is 1, indicating that FIFOFULL is supported. This bit is used in
conjunction with bit [23] of the ETMCCR.
[2:0] Maximum port size [2:0] Maximum ETM port size bits [2:0]. These bits are used in conjunction with bit [9]. The value
of these bits is 0b001.
Configurations This register is only available if the processor is configured to use the
ETM.
31 26 25 24 0
Reserved Reserved
[31:26] - Reserved.
[25] Trace control enable Trace start/stop enable. The possible values of this bit are:
0 Tracing is unaffected by the trace start/stop logic.
1 Tracing is controlled by the trace on and off addresses configured for the trace
start/stop logic.
The trace start/stop resource, resource 0x5F, is unaffected by the value of this bit.
[24:0] - Reserved.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-10
ID070610 Non-Confidential
Programmers Model
Purpose Holds the ETM architecture variant, and defines the programmers model
for the ETM.
Configurations This register is only available if the processor is configured to use the
ETM.
31 24 23 21 20 19 18 17 16 15 12 11 8 7 4 3 0
Implementor code
[31:24] Implementer code These bits identify ARM as the implementer of the processor. The value of these bits is
0b1000001.
[23:21] - Reserved.
[20] Branch packet encoding The value of this bit is 1, indicating that alternative branch packet encoding is implemented.
[19] Security Extensions The value of this bit is 0, indicating that the ETM behaves as if the processor is in Secure
support state at all times.
[18] 32-bit Thumb instruction The value of this bit is 1, indicating that a 32-bit Thumb instruction is traced as a single
tracing instruction.
[17] - Reserved.
[16] Load PC first The value of this bit is 0, indicating that data tracing is not supported.
[15:12] Processor family The value of these bits is 0b1111, indicating that the processor family is not identified in this
register.
[11:8] Major ETM architecture The value of these bits is 0b0010, indicating major architecture version number 3, ETMv3.
version
[7:4] Minor ETM architecture The value of these bits is 0b0101, indicating minor architecture version number 5.
version
[3:0] Implementation revision The value of these bits is 0b0000, indicating implementation revision, 0.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-11
ID070610 Non-Confidential
Programmers Model
Configurations This register is only available if the processor is configured to use the
ETM.
31 30 29 28 27 26 23 22 21 20 19 16 15 13 12 11 10 3 2 0
Extended external
input bus size
[28] Timestamp encoding Set to 1 to indicate that the timestamp is encoded as a natural binary number.
[27] Reduced function counter Set to 1 to indicate that Counter 1 is a reduced function counter.
[22] Timestamping implemented This bit is set to 1, indicating that timestamping is implemented.
[21] EmbeddedICE behavior The value of this bit is 0, indicating that the ETMEIBCR is not implemented. For more
control implemented information on EmbeddedICE behavior see the Embedded Trace Macrocell Architecture
Specification.
[20] Trace Start/Stop block uses The value of this bit is 1, indicating that the Trace Start/Stop block uses the EmbeddedICE
EmbeddedICE watchpoint watchpoint inputs.
inputs
[19:16] EmbeddedICE watchpoint The value of these bits is 0b0100, indicating that the number of EmbeddedICE watchpoint
inputs inputs implemented is four. These inputs come from the DWT.
[15:13] Instrumentation resources The value of these bits is 0b000, indicating that no Instrumentation resources are supported.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-12
ID070610 Non-Confidential
Programmers Model
[12] Data address comparisons The value of this bit is 1, indicating that data address comparisons are not supported.
[11] Readable registers The value of this bit is 1, indicating that all registers are readable.
[10:3] Extended external input bus The value of these bits is 0, indicating that the extended external input bus is not
implemented.
[2:0] Extended external input The value of these bits is 0, indicating that extended external input selectors are not
selectors implemented.
Purpose Specifies the EmbeddedICE watchpoint comparator inputs that are used to
control the start/stop resource.
Configurations This register is only available if the processor is configured to use the
ETM.
31 20 19 16 15 4 3 0
4 3 2 1 4 3 2 1
Stop resource select bits Start resource select bits
[19:16] Stop resource selection Setting any of these bits to 1 selects the corresponding EmbeddedICE watchpoint input as
a TraceEnable stop resource. Bit [16] corresponds to input 1, bit [17] corresponds to input
2, bit [18] corresponds to input 3, and bit [19] corresponds to input 4.
[3:0] Start resource selection Setting any of these bits to 1 selects the corresponding EmbeddedICE watchpoint input as
a TraceEnable start resource. Bit [0] corresponds to input 1, bit [1] corresponds to input 2,
bit [2] corresponds to input 3, and bit [3] corresponds to input 4.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-13
ID070610 Non-Confidential
Programmers Model
Configurations This register is only available if the processor is configured to use an ETM.
31 1 0
Reserved, RAZ
ETM powered up
[0] ETM powered up The value of this bit indicates whether you can access the ETM Trace Registers. The value of this
bit is always 1, indicating that the ETM Trace Registers can be accessed.
Configurations This register is only available if the processor is configured to use the
ETM.
31 5 4 3 2 1 0
Reserved
COREHALT
Reserved
EXTIN[1:0]
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-14
ID070610 Non-Confidential
Programmers Model
[31:5] - Reserved.
[4] COREHALT A read of this bit returns the value of the COREHALT input pin.
[3:2] - Reserved.
[1:0] EXTIN[1:0] A read of these bits returns the value of the EXTIN[1:0] input pins.
Usage constraints You must set bit [0] of ETMITCTRL to use this register.
Configurations This register is only available if the processor is configured to use the
ETM.
31 1 0
Reserved
[31:1] - Reserved
[0] TRIGGER output value A write to this bit sets the ETMTRIGOUT output.
Usage constraints You must set bit [0] of ETMITCTRL to use this register.
Configurations This register is only available if the processor is configured to use the
ETM.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-15
ID070610 Non-Confidential
Programmers Model
31 1 0
Reserved
[31:1] - Reserved
[0] ATREADY input value A read of this bit returns the value of the ETM ATREADYM input.
Usage constraints You must set bit [0] of ETMITCTRL to use this register.
Configurations This register is only available if the processor is configured to use the
ETM.
31 1 0
Reserved
[31:1] - Reserved
[0] ATVALID output value A write to this bit sets the value of the ETM ATVALIDM output.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. 3-16
ID070610 Non-Confidential
Appendix A
Signal Descriptions
This appendix describes the signals used in the macrocell. It contains the following sections:
• CTI signal descriptions on page A-2.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. A-1
ID070610 Non-Confidential
Signal Descriptions
Note
These tables show the ARM standard connections, but the actual connections are
implementation-defined. Check the documentation from the supplier of your device for any
changes to these connections.
Destination Destination
Trigger bit Comments
signal device
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. A-2
ID070610 Non-Confidential
Appendix B
Revisions
This appendix describes the technical changes between released issues of this book.
First release - -
No technical changes - -
Updated ETMCR bit assignment information. Table 3-2 on page 3-6 All
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. B-1
ID070610 Non-Confidential
Revisions
Updated ETM Integration Test ATB Control2 bit assignments. Figure 3-11 on page 3-16 All
Table 3-12 on page 3-16
Updated ETM Integration test ATB Control 0 bit assinments. Figure 3-12 on page 3-16 All
Table 3-13 on page 3-16
Updated CTI signal descriptions Input connections. Table A-1 on page A-2 All
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. B-2
ID070610 Non-Confidential
Glossary
This glossary describes some of the terms used in technical documents from ARM.
The AXI protocol also includes optional extensions to cover signaling for low-power operation.
AXI is targeted at high performance, high clock frequency system designs and includes a number
of features that make it very suitable for high speed sub-micron interconnect.
Advanced High-performance Bus (AHB)
A bus protocol with a fixed pipeline between address/control and data phases. It only supports a
subset of the functionality provided by the AMBA™ AXI protocol. The full AMBA AHB protocol
specification includes a number of features that are not commonly required for master and slave IP
developments and ARM recommends only a subset of the protocol is usually used. This subset is
defined as the AMBA AHB-Lite protocol.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. Glossary-1
ID070610 Non-Confidential
Glossary
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. Glossary-2
ID070610 Non-Confidential
Glossary
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. Glossary-3
ID070610 Non-Confidential
Glossary
In ARM processors, a fast context switch is caused by the selection of a non-zero PID value to
switch the context to that of the next process. A fast context switch causes each Virtual Address
for a memory access, generated by the ARM processor, to produce a Modified Virtual Address
that is sent to the rest of the memory system to be used in place of a normal Virtual Address. For
some cache control operations Virtual Addresses are passed to the memory system as data. In
these cases no address modification takes place.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. Glossary-4
ID070610 Non-Confidential
Glossary
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. Glossary-5
ID070610 Non-Confidential
Glossary
Reserved A field in a control register or instruction format is reserved if the field is to be defined by the
implementation, or produces Unpredictable results if the contents of the field are not zero. These
fields are reserved for use in future extensions of the architecture or are
implementation-specific. All reserved bits not used by the implementation must be written as 0
and read as 0.
SBO See Should Be One.
SBZ See Should Be Zero.
SBZP See Should Be Zero or Preserved.
Scan chain A scan chain is made up of serially-connected devices that implement boundary scan technology
using a standard JTAG TAP interface. Each device contains at least one TAP controller
containing shift registers that form the chain connected between TDI and TDO, through which
test data is shifted. Processors can contain several shift registers to enable you to access selected
parts of the device.
Should Be One (SBO)
Should be written as 1 (or all 1s for bit fields) by software. Writing 0 produces Unpredictable
results.
Should Be Zero (SBZ)
Should be written as 0 (or all 0s for bit fields) by software. Writing 1 produces Unpredictable
results.
Should Be Zero or Preserved (SBZP)
Should be written as 0 (or all 0s for bit fields) by software, or preserved by writing back the same
value that has been previously read from the same field on the same processor.
Synchronization primitive
The memory synchronization primitive instructions are instructions that are used to ensure
memory synchronization, that is, the LDREX, STREX, SWP, and SWPB instructions.
TAP See Test Access Port.
Test Access Port (TAP)
The collection of four mandatory and one optional terminals that form the input/output and
control interface to a JTAG boundary-scan architecture. The mandatory terminals are TDI,
TDO, TMS, and TCK. The optional terminal is TRST. This signal is mandatory in ARM cores
because it resets the debug logic.
Thumb instruction One or two halfwords that specify an operation for an ARM processor in Thumb state to
perform. Thumb instructions must be halfword-aligned. In the original Thumb ISA, all
instructions are 16-bit. The Thumb-2 extension of the ISA provides both 16-bit and 32-bit
instructions.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. Glossary-6
ID070610 Non-Confidential
Glossary
In an ETM context, means that the behavior of the ETM cannot be relied on. Such conditions
have not been validated. When applied to the programming of an event resource, only the output
of that event resource is Unpredictable.
Unpredictable ETM behavior can affect the behavior of the entire system, because the ETM is
capable of causing the core to enter debug state, and external outputs can be used for other
purposes.
Warm reset Also known as a core reset. Initializes the majority of the processor excluding the debug
controller and debug logic. This type of reset is useful if you are using the debugging features
of a processor.
Watchpoint A watchpoint is a mechanism provided by debuggers to halt program execution when the data
contained by a particular memory address is changed. Watchpoints are inserted by the
programmer to enable inspection of register contents, memory locations, and variable values
when memory is written to test that the program is operating correctly. Watchpoints are removed
after the program is successfully tested.
The ARM architecture supports word-invariant systems in ARMv3 and later versions. When
word-invariant support is selected, the behavior of load or store instructions that are given
unaligned addresses is instruction-specific, and is in general not the expected behavior for an
unaligned access. It is recommended that word-invariant systems use the endianness that
produces the desired byte addresses at all times, apart possibly from very early in their reset
handlers before they have set up the endianness, and that this early part of the reset handler must
use only aligned word memory accesses.
ARM DDI 0440C Copyright © 2009, 2010 ARM Limited. All rights reserved. Glossary-7
ID070610 Non-Confidential