![Qorivva MPC5 Series Скачать руководство пользователя страница 56](http://html1.mh-extra.com/html/qorivva/mpc5-series/mpc5-series_manual_3255432056.webp)
Qorivva MPC5xxx/SPC5xx Debugger and NEXUS Trace
56
©1989-2021 Lauterbach GmbH
Example for tracing context switches using DTM, for an operating system using the OSEK Runtime Interface
(ORTI):
Trace Context Switch using Ownership Trace Messaging (OTM)
Data trace messaging is supported by cores implementing NEXUS Class 3 or higher. If the core implements
NEXUS Class 2, then context switches can only be traced using Ownership Trace Messaging (OTM).
The processor sends an ownership trace message when the core writes to a certain SPR (special purpose
register). Depending on the core in use, one or two registers can be used to issue an OTM message, the
PID0 register and NPIDR. The active register is selected by the command
This method requires cooperation of the operating system. Some operating systems will support this feature
by default or by configuration, while other operating systems may require code instrumentation or
implementing predefined hooks.
Look for instructions in the appropriate
for further information.
Example for tracing context switches using OTM, for an operating system using the OSEK Runtime Interface
(ORTI):
Trace Based Run-time Measurement / Timestamping
In order to enable trace based time measurements, the debugger needs a timestamp for every trace
message. Depending on the target processor and trace solution in use, there are up to two kinds timestamp
available:
•
Tool generated timestamps. These timestamps are only available for off-chip tracing. For this
processor series, tool generated timestamps are available for all PowerTrace modules. One
timestamp is stored for each trace record.
•
Processor generated timestamps. If the processor/core supports generation of timestamps, then
these timestamps can be used for on-chip and off-chip tracing. One timestamp is generated for
each NEXUS trace message.
This chapter shows how the timestamps work under several scenarios, implications of using on-chip
timestamps and which processors support on-chip timestamps.
;set up TROS awareness
TASK.ORTI my_rtos.orti
;enable Data trace to current context information
Break.Set TASK.CONFIG(magic) /Write /TraceData
;set up TROS awareness
TASK.ORTI my_rtos.orti
;enable ownership trace messaging via register PID0
NEXUS.OTM PID0