Configure Time stamp
In this topic:
•Set Assume source to be to tsu_rel.
•Keep default TSUPRSCL set to 1.
•tsu_rel_en is set on EVT23 Event State.
•tsu_rel_sync is set to EVT8 Event Edge.
MCDS does not generate time stamp messages by default. To get the time stamp information as part of the trace record, the MCDS needs to be configured.
The trace time stamp information is implemented on a CPU (MCDS) tick level. You need to determine the MCDS tick period in order to get the correct time information. This method relies on the assumption that the CPU clock doesn’t change during the active trace session. Time cannot be measured properly when tracing program code is changing the CPU clock. |
Set Time stamps. |
a.Set Assume source to be to tsu_rel.
b.Keep default TSUPRSCL set to 1.
c.Reference clock set to Main PLL.
The value of 1 for TSUPRSCL activates the tsu_tc_trig output every second reference clock cycle. Increasing the value would yield higher time resolution.
Read out the MCDS cycle duration in the AURIX/Clocks plugin. |
Enter the MCDS cycle duration in the Cycle duration filed in Hardware | CPU Options | Analyzer. |
Configure MCX. |
MCX need to be configured additionally to MCDS to generate time stamps for the trace Trigger/Qualifier operation mode. The most convenient option is to use Trace Wizard. Time stamps generation will be configured regardless of the specific trigger and/or qualifier setting. Using Wizard for example to configure Trigger immediately and record Program Flow, MCX settings look like this:
Configure Event. |
•EVT8 is set to tsu_tc_trig Trigger.
•EVT23 is set to cnt_trig_15 Trigger.
Configure Action. |
•tsu_rel_en is set on EVT23 Event State.
•tsu_rel_sync is set to EVT8 Event Edge.
Configure trace_done. |
trace_done Action set to ALWAYS yields recording everything from the trace start on.
Set Cycle duration in the Hardware | CPU Options | Analyzer dialog, before using the trace time stamp information. The trace time stamp information is implemented on a CPU tick level only. You need to find out the CPU cycle period of your target application and enter that value in the dialog. This type of time stamps doesn’t provide accurate trace time information for applications where the microcontroller frequency is not constant during the trace session. |