Qorivva MPC5xxx/SPC5xx Debugger and NEXUS Trace
64
©1989-2021 Lauterbach GmbH
Example: Event Counter
There is also a built-in event counter which can be used to count debug/trace events or to measure the event
frequency:
Tracing Peripheral Modules / Bus Masters
Many processors support tracing of peripheral bus master trace clients, e.g. DMA or FlexRay controllers.
The clients are controlled with the
commands.
As for the core’s data trace, the amount of generated trace messages is usually too high to be sent through
the trace port and the on-chip message FIFO will overflow. Therefore it is necessary to set filters to reduce
the amount of trace messages. The MPC5xxx processor series’ peripheral bus master trace clients support
two filtering methods, explained in below examples.
Example: Filter by Address Range
The MPC5xxx peripheral bus master trace clients support two freely configurable address ranges. The client
will only generate trace messages, if the read or write address is inside one of those address ranges. The
range only applies to the selected clients. Other clients and the cores can be configured independently.
This example shows how to enable DMA trace only for a given address range:
Example: Event Controlled Trace Start and End
The MPC5xxx peripheral bus master trace clients support two freely configurable address ranges. The client
will only generate trace messages, if the read or write address is inside one of those address ranges.
;Measure the execution frequency of function sieve
Break.Set sieve /Program /BusCount
Count.Mode Frequency
Count.Gate 1.s ;measure for 1 second
Go ;run application
Count.Go ;start measurement
PRINT "sieve freq = "+FORMAT.DECIMAL(1.,Count.VALUE()/1000.)+"Hz"
Count.state ;open event counter window
;select DMA trace client
NEXUS.CLIENT1.SELECT DMA_0
;set Alpha event on address range and write access
Break.Set D:0x40001000--0x400017FF /Write /Onchip /Alpha
;Assign Alpha event to CLIENT1, function TRACEDATA
TrOnchip.Alpha TraceDataClient1