How to measure control law execution time in Launchxl-F28379D?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
채택된 답변
Venkatesh Chilapur
2019년 3월 20일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!