Trace Capture
QT
RACE
-
U
SER
M
ANUAL
© 2018 PDQLogic Ltd.
QTrace User Manual Rev 1.01
Page 29
4.3
Exception trace capture
One of the most useful trace capture features is the ability to detect and display when a target
exception occurs. Being able to pin-point exactly where the exception occurred and having a history of
the function calls that lead to the event is very powerful and can save hours of debugging time.
Exception trace capture requires a trigger to be defined for the ARM Cortex-M exception handlers:
NMI
HardFault
MemManage
BusFault
UsageFault
When a trace configuration is created (see section 6, page 34), a trace capture trigger is also created for
the exception handlers. The QTrace Analyser determines the locations of the handlers from the vector
table, specified in the trace configuration, and configures a trigger to cover all instructions in the
handlers. An exception trace capture will be generated if the processor executes these instructions.
The example in Figure 32 below shows a hard fault being deliberately generated by reading from a non-
existent address. The instruction highlighted in blue attempted an invalid read and the other two views
show the corresponding offending function. Note that the entry below the blue highlighted instruction
is the first instruction of the HardFault handler.
Figure 32 Exception trace capture
Additional copy options