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.

TMS320F2802: TMS320F20802 TMS320F2806

Part Number: TMS320F2806TMS320F2802

We are trying to measure the time taken by a particular function in our code. However, this function is a critical test function and is executed before the timers and interrupts on the controller are configured and initialized. Configuring/enabling any interrupts would cause the stack to be modified and would disturb the working of the function and cause it to give incorrect results. Is there any mechanism such as a free running timer that we can use to measure the time without having to configure any interrupts or timers?

We would like to do the following:

Initialize or start free running timer

Read the timer value t1

Execute function

Read the timer value t2

Any solution provided for the above needs to be applicable to both F2802 and F2806 controllers.

  • Hi Lokesh,

    Have you considered toggling a gpio at the beginning and end of the function and observing the delta in time between the toggle using an oscilloscope. This wont be exact, but we do not have any free running timers. Without configuring timers or interrupts this is the closet option I see. 

    Best Regards,

    Marlyn