How to measure control law execution time in Launchxl-F28379D?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Enric Vidal Idiarte
le 13 Mar 2019
Commenté : Enric Vidal Idiarte
le 21 Mar 2019
Dear Sir or Madam,
I have implemented a digital control law in a Launchxl-F28379D using the Embeded Code Support for TI C2000 ProcessorsSimuli.
The control law is implemented inside an IRQ trigger function block between the AD and and the DA block.
How can I measure the execution time of this control law? I have used codertarget.profile.getData( ), but this gave me the exectution time for AD an DA but not in between.
In code composer source code we usually add a GPIO bit activation after getting AD value and GPIO bit deactivation after control law computation. This allows oscilloscope measurement. But I don't know how to do something simular in Simulink.
Can you help me?
Thanks in advance
With best regards.
Enric
codertarget.profile.getData('f28379D_AD_int')
0 commentaires
Réponse acceptée
Venkatesh Chilapur
le 20 Mar 2019
Hi Enric,
Attached is the model which helps you to achieve the same in simulink w.r.t GPIO bit activation and deactivation. Few points to note: The subsystem which contains the algorithm for which we need to measure the execution time, needs to be defined as atomic. The GPIO pin Set and Clear operation are part of the 'System Outputs' block which will place the GPIO pin Set and Clear lines of code around the algorithm code that helps one to measure the execution time by measuring the GPIO ON time using a digital scope.
Hope this helps,
Regards,
Venkatesh C
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!