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.

TMS320F28P650DK: CLA Task execution time measurement

Part Number: TMS320F28P650DK

Hello Team,

At present, I am engaged in implementing the CLA on the F28P65 Evaluation board. I have managed to establish a control loop and run it using both the CPU and the CLA. When the control loop is operated using the CPU, I can determine the execution time through the Cycle count method. Is there a method to calculate the Cycle count when the task is performed using the CLA. It would be beneficial if there is an alternative method, apart from GPIO profiling, to measure the execution time of tasks in CLA.

  • Hi Ajay,

    There are many different ways you could go about this. Here are a couple options:

    • You could look at the disassembly view and count how many lines of assembly instructions are generated by the CLA code in your task. Each assembly instruction on the CLA executes in one CLA cycle, so you could use this knowledge to calculate the execution time of your task. If external functions are called in your task, account for the number of assembly lines they take as well. This approach would be easiest for a simple CLA task that only performs a few steps. Anything with loops would be difficult to calculate.
    • Another option would be to start a timer on the CPU when the CLA task is triggered, then use the CLA end of task interrupt to stop the timer, and this would give the CPU the approximate task execution time. This would be simplest if you are triggering the CLA tasks via software from the CPU. If the CLA task is peripheral triggered, you would likely have to use a peripheral interrupt on that condition to know when to start the timer.

    Best Regards,

    Delaney

  • Hi Delaney,

    Thanks for the support.

    In the second method I’m employing, the ADC EOC interrupt is utilized to initiate the CLA task, and the PWM is used to trigger the ADC SOC. Consequently, the timer’s start cannot be precisely aligned with the triggering of the CLA task. Could you propose an alternate solution or specify the exact point at which the timer should start

    Thanks in advance.

    Best Regards,

    Ajay K R

  • Hi Ajay,

    By "timer" are you referring to when you should trigger the PWM ADC SOC's? Are you asking how to coordinate the ADC SOC and EOC timing? 

    Best Regards,

    Delaney