There are three modes of trace
qualification available:
- Normal mode: In this mode, trace
is enabled without any qualifiers. Trace control happens purely through software
writing to the PCTRACE_GLOBAL register. When operating PC Trace in normal mode,
The PCTRACE_LOGPC_SOFTENABLE captures the program counter value at the point
when PCTRACE_GLOBAL.EN is set to 1, and the PCTRACE_LOGPC_SOFTDISABLE register
captures the program counter value at the point PCTRACE_GLOBAL.EN is set to
0.
- Windowed Trace mode: In windowed
mode, PC Trace can be activated or stopped based on the value of a signal coming
from the Event Bus Comparator, System Event Counter, or other system events. The
WINDOWED_INP_SEL field in the PCTRACE_QUAL1 register specifies the input signal
used to qualify PC Trace operation in windowed mode. By default trace is active
when the input signal is high and inactive when the input signal is low; this
behavior can be reversed by setting the PCTRACE_QUAL1.WINDOWED_INP_INV bit
high.
- Start-Stop mode: In this mode,
one input signal starts the PC trace operation, and a different input signal
stops the trace operation. Event Bus Comparator signals, System Event Counter
signals and other system event signals can be used as inputs to start or stop
the PC Trace. The START_INP_SEL and STOP_INP_SEL fields in the PCTRACE_QUAL2
register specify the input signals used to qualify PC Trace operation in
start-stop mode. Once a start event arrives and PC trace operation begins, the
PC Trace module ignores all further start events until a stop event is received.
Trace start and stop operations are triggered on the rising edge of the input
event; this behavior can be reversed by setting the START_INP_INV and
STOP_INP_INV bits in the PCTRACE_QUAL1 register.
To set the PC Trace operation mode,
write to the TRACE_MODE bit in the PCTRACE_QUAL1 register.