Keil™, An ARM® Company

ULINK®2 User's Guide

Trace Configuration

The Trace dialog tab controls the real-time trace operations.

Cortex-M Target Driver Setup - Trace Tab

Core Clock

Cortex-M Target Driver Setup - Trace Enable The Core Clock setting defines the clock frequency at which the CPU will be running when trace information is captured. The Core Clock must be set properly to obtain:

  • Time values in the µVision Status Bar, register window, and other places.
  • Trace information via the SWO (Serial Wire Output) when Trace Enable is selected.

Note

  • Some applications start from reset with a lower CPU Core Clock (e.g. devices with on-chip oscillators) and switch to a higher clock in the startup code.

    For applications that change the CPU Core Clock, you may stop program execution before the clock switch and modify the Core Clock setting to match the new clock rate. To update the Core Clock, you may use either the dialog Debug — Target Settings or assign the value to the VTREG CORE_CLK.

Trace Enable

Setting the Trace Enable checkbox enables the target system to capture real-time Trace data. The following configuration settings determine what information will be captured:

Trace and ITM Stimulus Ports

The following configure the Trace and ITM Ports:

  • Trace Port configures the port used for Trace Information.
  • ITM Stimulus Ports can be used from the program code to obtain debugging or program-specific information from the target device.

Timestamps, PC Sampling and Trace Events

The following settings determine what Trace information will be captured:

  • Timestamps allows to send time information for trace events.
  • PC Sampling enables Program Counter information which indicates the program location that triggered the trace event.
  • Trace Events obtains information on specific CPU events.