5.1.1. Operation of a TCD

A TCD has at its centre a large circular buffer. Trace is written into this buffer as it is generated. Trace capture does not stop when the buffer becomes full, but instead overwrites old trace.

A TCD is sensitive to two special signals, that the ETB or TPIU generate:

A TPIU indicates these signals to a TPA as follows:


The trigger is an input to the trace sink, connected to a CTI. If there is more than one trace sink, each can receive a different condition as its trigger. Most trace sources, for example an ETM or HTM, can output a trigger signal. Usually, the CTIs are configured to send a trigger to all trace sinks when any trace source outputs its trigger signal.

When a trigger is detected, the TCD counts a programmable number of trace records before it stops trace capture. After this point, it ignores any more trace. By setting the appropriate number of programmable trace records, you can select a window of trace to capture around the trigger condition. Figure 5.2 shows this context.

Figure 5.2. Use of the trigger to set a trace window

To view this graphic, your browser must support the SVG format. Either install a browser with native support, or install an appropriate plugin such as Adobe SVG Viewer.

You can configure the trigger to output when the system detects a bug. The window of trace indicates the behavior of the system before and after the bug occurred.

You can use the trigger count in a number of ways:

  • Set the trigger count to a small value. This gives a window of trace mostly before the trigger occurred, capturing the software bug under investigation.

  • Set the trigger count to a value slightly smaller than the size of the buffer. This gives a window of trace mostly after the trigger occurred.

  • Set the trigger count to roughly half the size of the buffer. This gives a window of trace before and after the trigger occurred.

When trace capture has stopped, the development tools download the trace from the TCD.

Trace disabled

Trace disabled indicates to the TCD that there is no trace to capture. It ensures that the values of the trace port pins are only captured when trace data is available.

Usually the ETB, ETR or TPIU waits until there is sufficient trace to use all the pins of the trace port before any trace is captured in the on-chip memory or output over the Trace Port. For example, if only one byte of trace is available in a system that implements a 16-bit Trace Port, no trace is output until a second byte of trace is available.

Copyright © 2004, 2007, 2010 ARM Limited. All rights reserved.ARM DGI 0012D