SPRUJ53B April 2024 – September 2024 TMS320F28P550SJ , TMS320F28P559SJ-Q1
Figure 13-6 describes the device PC trace architecture. The trace module is tightly coupled with the CPU, and receives the current program counter (VPC), program address (PAB), and various qualifying signals from the CPU interface. The Trace core captures these values whenever a PC discontinuity (for example, branch operation) is detected. The PC Trace module interfaces with the Enhanced Bus Comparator Unit and System Event Counter Unit, providing the ability to select events from these units as triggers to start a trace, stop a trace, or determine the bounding conditions for a windowed trace operation.
The Trace Core qualifies trace source and destination addresses, and stores these addresses sequentially in the trace memory buffer. Additionally, the Trace Core can generate hit events every time a new trace is stored in the memory buffer; this event signal is connected to the ERAD counter block so that the number of entries in the buffer can be tracked. This counter value can in turn be used to create a STOP event at a predefined threshold.
Debugger accesses are always treated as unsecure accesses. Unlike other ERAD components, there is no concept of debug or application ownership in the PC Trace module.
The Trace Core generates a trace hit event for a discontinuity arising from a speculative instruction fetch, even if the fetched instruction does not reach the execution phase in the CPU pipeline. As a result, the BUFFER_FULL signal can be set prematurely due to a speculative prefetch. The user can always safely discard the oldest discontinuity pair present in the memory buffer when a full buffer is detected, to mitigate this scenario.