This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am using the hardware trace analyzer and noticed that the time measured in the PC Trace / Trace Viewer is about 8 times slower than the actual observed time. Upon examining the Viewing Diagnostics (Page 29 of SPRUHM7B) the CPU clock rate does not match the target frequency.
Our target device frequency is 300 MHz while the Trace Viewer is only picking up 36.8516MHz.
How do I configure the Trace Viewer to match my target device frequency?
Additional Information
host OS: Windows 7 64-bit
CCS version: 6.1.1
device: TMS570LC4357
debug probe: XDS560v2 Pro Trace
Hey Mark,
I have been calculating the run time using the cycles column and my device frequency of 300MHz which yields better results. However, I am also concerned that the slow trace frequency will miss lines of the code that are executed during the trace.
For example, when I run a trace analysis, there will be a message " INFO: Trace data contains 3105 gaps or data errors" . The specific number differs each execution but this message is consistent with all traces run.
With an increased number of pins the number of data errors is decreased but not eliminated.
Judy,
The decreased amount of gaps with increased pins makes sense. I'm assuming you are running the standard PC trace from Tools->Hardware Trace Analyzer->PC Trace. Just in case, if you are using Custom PC Trace, enabling data trace would increase the bandwidth required for trace (setting is under Hardware Configuration->Type->What to Trace). You may also try setting the "Stall CPU to prevent data loss" option under Receiver->Receiver Settings->Advanced Options, however, this may be too intrusive.
It doesn't look like there are any gel files to support changing the export clock (specifically the TPIU export). From your original post, the export is low compared to the CPU clock (300 MHz CPU / 36.8516MHz trace). In testing a similar device, I'm seeing 39MHz CPU and 79MHz trace.
It might be worthwhile to look into what the clock source for the TPIU is (see section 5.22.8.1 of http://www.ti.com/lit/ds/spns195a/spns195a.pdf). In the meantime, I can ask around to see if anyone has gels to easily configure the TPIU for this device.
Thanks,
Mark
Judy,
Since the increased pin count reduces the amount of gaps in the data, I'm inclined to think the issue is that the device is not exporting data fast enough to the pro trace. Can you attach the output of a trace log (http://processors.wiki.ti.com/index.php/Emulation_FAQ#How_can_I_turn_on_Logging_for_Trace_for_TI_support.3F) here?
Also, it would be helpful if you could provide a .tdf file (you can generate by clicking the save icon in the Trace Viewer) and an object file in which the gaps are observed. Having the .tdf and object file will help determine the cause of the gaps in case the issue is not bandwidth related.
Thanks,
Mark
Hey Mark,
I generated the log files and csv instead of tdf with the 19-pin option. I deleted the function names for confidential purposes but it should still be pretty clear.
The information in CCS says, that there are 608 gaps - in the csv file there are 608 'FIFO overflow' messages in 'Trace Status' column. So it seems that FIFO overflow is the reason.
Thanks! TraceProblems.zip
Judy,
It is pretty clear that the issue here is bandwidth. Apart from using a different trace export clock, I don't think there will be a way to remove all gaps for cycle accurate trace for your device. Another option might be to disable cycle accurate trace in the receiver settings shown below. This will make all timing information useless but should give enough bandwidth to get a sequence of PC data without any gaps. Hope this helps.
Thanks,
Mark
Hi Judy,
I ran some fairly extensive testing with several applications and receiver settings and was unable to find anything incorrect with the ETM programming. The gaps that I had observed in my previous test case were due to data trace being enabled. With data trace disabled, I see no gaps at 19 pins for the RM48L592. Unfortunately, I think this leaves the bandwidth limitation as the culprit in your case.
Thanks,
Mark
Mark,
I'm struggling with the same problem and wonder if changing ETM clock from VCLK to ETMTRACECLKIN will help. However, to change clock source I have to unlock TPIU via the CoreSight key (as described in SPNU563). Could you explain how to unlock TPIU via the CoreSight key?
Thank you,
Piotr