SPRACM7 December   2020 TMS320F280021 , TMS320F280021-Q1 , TMS320F280023 , TMS320F280023-Q1 , TMS320F280023C , TMS320F280025 , TMS320F280025-Q1 , TMS320F280025C , TMS320F280025C-Q1 , TMS320F280040-Q1 , TMS320F280040C-Q1 , TMS320F280041 , TMS320F280041-Q1 , TMS320F280041C , TMS320F280041C-Q1 , TMS320F280045 , TMS320F280048-Q1 , TMS320F280048C-Q1 , TMS320F280049 , TMS320F280049-Q1 , TMS320F280049C , TMS320F280049C-Q1 , TMS320F28384D , TMS320F28384D-Q1 , TMS320F28384S , TMS320F28384S-Q1 , TMS320F28386D , TMS320F28386D-Q1 , TMS320F28386S , TMS320F28386S-Q1 , TMS320F28388D , TMS320F28388S , TMS320F28P550SJ , TMS320F28P559SJ-Q1 , TMS320F28P650DH , TMS320F28P650DK , TMS320F28P650SH , TMS320F28P650SK , TMS320F28P659DK-Q1

 

  1.   1
  2.   2
    1.     3
    2.     4
    3.     5
  3.   6
    1.     7
    2.     8
    3.     9
    4.     10
  4.   11
  5.   12

Code Profiling During System Operation

Another interesting run-time example would be profiling sections of code during run-time without any software overhead. Additional features like threshold monitors and hardware based max counting, provides the necessary tool set for the embedded software engineer to realize more efficient control loops, critical to the overall system performance.

GUID-02FB445E-90F2-4EB9-95CD-2D68FF434D1A-low.gif Figure 2-2 Code Profiling

Using the code diagram in Figure 2-2 as an example, this would utilize two of the eight enhanced bus comparators to generate events (to mark the start and end of that routine/function) and a counter for profiling.

Example: C2000Ware_3_03_00_00\driverlib\<f28004x/f28002x/f2838x>\examples\erad\c28x_ctm_profile_function\erad_ex9_ctm_max_load_profile_function.c.

Some examples of what could be done with the data collected in the example above in addition to simple profiling:

  • At any given point of time, the maximum CPU cycles that were consumed by an executing code/routine is available with a single register read (MAX_COUNT).
  • A threshold register can be programmed to generate an event/interrupt when the counter exceeds a pre-defined limit. (This can act precisely as a safety mechanism if you were to complete this routine in a given time period and violating this would be critical for the transfer function).