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.
TMS320F28069: CLA task duration calculation
Q: How can I calculate how much time a CLA task takes to execute? or How do I profile a CLA task? What overhead should be included?
Lori HeustessC2000 Software Engineering
Using a timer:
One method is to use a free running timer to capture the number of cycles the task execution took. The CLA has access to the PWM timers. As an example you could capture the number of cycles in C as follows:
In C this would look something like:
ct1 = EPwm1Regs.TBCTR;
<<< code to be measured here >>>>
ct2 = EPwm1Regs.TBCTR;
delta_ct = ct2 - ct1;
Using a GPIO pin:
On some devices, the CLA has direct access to GPIO pins. In this case, instead of reading a timer, the CLA could toggle a pin before and after the code to be measured. Monitor the pin using an oscilloscope to measure the delta in time. Refer to the TRM for your specific device.
There will be some overhead due to triggering the CLA task and notifying the C28x that it has completed. In order to test this overhead, you could use a timer on the C28x to time the start and stop of the CLA task.
Also refer to the discussion on this post: https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/738758
Click here for more CLA FAQs and resources.
We are glad that we were able to resolve this issue, and will now proceed to close this thread.
If you have further questions related to this thread, you may click "Ask a related question" below. The newly created question will be automatically linked to this question.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.