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.
How do I get the current clock ticks? I want to be able to get delta clock ticks within my C application running on a C2000 (F28335) processor which is also utilizing DSP/BIOS 5.xxx (CCSv4).
Here is what I want to do.
void AFunc(void) {
uint32 t0,t1,dt;
t0 = what_ever_function_will_get_me_current_clock_ticks();
<BODY-OF-THE-FUNCTION-TO-BE-TIMED>
t1 = what_ever_function_will_get_me_current_clock_ticks();
dt = t1 - t0; // delta clock ticks
Thanks
Here is what I did:
InitCpuTimers(); // For this example, only initialize the Cpu Timers
StartCpuTimer0();
Then
counter0 = ReadCpuTimer0Counter();
<< function of interest >>
counter1 = ReadCpuTimer0Counter();
The difference betwwen counter1-counter0 / clock_freq is the time difference.
Sridhar