Hello,
I am writing a program using the RDDI API to stream trace from a DSTREAM-ST. The problem is that whenever I start up the DSTREAM-ST and then connect using RDDI from my program, the connection works fine, but once I begin tracing, the TRC_CLK light comes on and I don't get any events. However, if I connect using DS-5 first, disconnect in DS-5, close DS-5, and try to run the program again, the TRC_CLK light is green and everything works (I get events and trace data, etc.). I can then run my program as much as I want until I turn the DSTREAM-ST off again. I cannot figure out why this occurs, and none of the RDDI functions in the API mention a trace clock. How do I sync the trace clock? Any ideas?
- Akira
Hi Akira,
I have something extra to add in addition to Tonys' wisdom. He is right, you do indeed need to set up the trace links that route the trace from the Cortex-R5 ETM through the trace Funnel component. It's port 0 that you need to enable. Writing 0x301 to 0x8000B000 on the debug APB (this address is the first register of the trace funnel on the RM57 HDK and its the control register) should set the funnel up.
However, this won't enable the trace clock, because that requires an additional write to the Trace Port Interface Component (TPIU) on the target. If you have a look in the DTSL script for the target configdb entry in DS-5 all should be revealed for you.
However, are you sure your connections via RDDI immediately after power on are actually working ?
The reason I ask is that the TI devices typically have an 'ICEPick' device that restricts access to the JTAG scan chain unless some proprietary JTAG scans have been performed in order to expose/add the arm Debug Access Port to the JTAG scan chain.
If you are using DS-5 then all this is done for you, but as you are not, you need to be aware of this.
This could be another reason why your example only works after DS-5 has been used to trace the target.
I hope this helps and we look forward to hearing how you get on.