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.

CCS/TM4C1294NCPDT: How to measure time of execution for a particular function in CCS

Part Number: TM4C1294NCPDT

Tool/software: Code Composer Studio

Hello,

I am using Code Composer Studios 7.4.0.

I wanted to measure time of execution for various functions inside code during debugging.

I couldn't find any options/ways to do the same.

Is there a way to do the above? and if there is could you please guide me how to?

  • Use of the Forum Search Box (atop this forum page) - quickly/easily/massively reveals this technique:   (surely warrants your 'future' use...)

    • Just prior to your specified 'Function Call' - Set a GPIO bit
    • Upon completion of that function's execution - Clear that bit
    • Use of a scope is the (usual) means to capture and measure that function's duration
    • Minus a scope - you can employ an MCU's Timer (set to Edge Time Mode) - to capture the 'Rise' of that GPIO bit - and via a 2nd (Sync'ed) Timer (again - Edge Time Mode - for coding ease) capture the 'Fall' of that GPIO bit.   The 'delta' between the two meets your expressed (code execution time) requirement...

    OR ... with a 'Pro IDE' (such as IAR or Keil) - the time between 2 breakpoints (first one set at your function's beginning - second set one instruction beyond function's end) is, 'Automatically Captured & Displayed!'      

    'FREE' too often - yields other - (more onerous) and ongoing (forever) costs...   PRO IDEs - each/every day - prove & reinforce their (real) value!

  • Another method is to use a "breakpoint counter" as shown in Lab 2 of this tutorial.
    downloads.ti.com/.../