Keil Logo

Trace

The Trace dialog defines generation and capturing of trace events via theSerial Wire Trace Output (SWO) pin. ULINKplus delivers trace information in real-time to the host PC.

Note

  • While the debugger is running the Status Bar indicates the trace capturing operation.

Target Driver Setup - Trace

General settings define system clock frequency and overall trace capturing.

Core Clock
The processor core clock frequency that the debugger uses to calculate timings for trace capturing and displays (even when trace is disabled) and to configure the debug units trace capture UART device. It should be be set to the system clock frequency that your target application uses in active state.
Trace Enable
Enable this option to capture trace via the SWO pin.

Trace Port defines the trace port parameters. To use this feature, Port must be set to SW (Serial Wire) in the Debug dialog.

Serial Wire Output – UART/NRZ
ULINKplus only supports this trace output method.
SWO Clock Prescaler
Defines the prescaler setting for the SWO clock divider. Increase this to reduce Hardware Buffer Overrun errors. Decrease this to reduce Trace Data Overflow errors.
Autodetect
Enable this option to configure the highest possible SWO clock rate ULINKplus will run at for the given Core Clock.
SWO Clock
Displays the actual configured SWO clock rate.

Timestamps control timing information created within the trace stream.

Enable
Activate timestamps that are appended to trace packets.
Prescaler
Granularity of the timestamps (Core Clock divided by the Prescaler); set to 1 for best accuracy.

Note

  • Enable timestamps for correct timing information (for example in the System Analyzer).
  • Increase the Prescaler value if trace capture errors are shown in the Status Bar .
  • PC Sampling timestamps are reconstructed for the given period and timestamps will be shown for them even if the Enable option is not selected.

PC Sampling controls generation of program counter (PC) values within the trace stream.

Prescaler
Frequency of periodic PC values (Core Clock divided by Prescaler).
Periodic
Enables PC values at regular intervals.
Period
Displays the timing of the PC sampling interval.
on Data R/W Sample
Generate PC values for memory read/write trace capturing. Enable this option to show the program location that caused the memory accesses.

Note

  • Disable Periodic PC sampling or increase the Prescaler value if trace capture errors are shown in the Status Bar .

Trace Events enable the trace capturing of exceptions, interrupts, and Event Counters.

CPI: Cycles per Instruction
Indicates additional wait states during program execution: this counter increments on each additional cycle required to execute instructions (for example stalls caused by the memory system).
EXC: Exception Overhead
This counter increments on each cycle associated with exception stack operations (entry, return, preemption) and other exception-related processes.
SLEEP: Sleep Cycles
This counter increments on each cycle associated with power saving, whether initiated by a WFI or WFE instruction, or by the sleep-on-exit functionality.
LSU: Load Store Unit Cycles
This counter increments on each additional cycle required to execute a multi-cycle load-store instruction.
FOLD: Folded Instructions
This counter increments on any instruction that executes in zero cycles (for example, an IT instruction is folded and does not use any cycles).
EXCTRC: Exception Tracing
Include information about exception and interrupt execution in the trace stream. The Trace Exceptions window shows statistics and System Analyzer Viewer timing information.

Note

  • Disable some options if trace capture errors are shown in the Status Bar .

ITM Stimulus Ports control trace events generated with the Instrumentation Trace Macrocell (ITM).

Enable
Enable an ITM port with individual check-boxes or type a value into the field.
  • Enable Port 0 to view data in the serial window Debug (printf) Viewer.
  • Enable Port 31 to view RTX events in Kernel Awareness windows.
Privilege
Define access rights for a group of 8 ITM ports.
  • Enable an ITM port to protect access in thread mode (privilege mode can always access ITM ports).
  • Disable to allow access in any mode.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.