2803x 如何测量CLA时间,想测试下cLA使用率,不知道如何测试?
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.
你好,可以利用一路PWM的计数器测量CLA中程序运行时间,在开始和结束分别开启和暂停计数器。具体的请参加CLA相关文档。
#define READ_CLOCK(X) __meallow();\
EPwm3Regs.TBCTL.bit.CTRMODE = TB_FREEZE;\
X = EPwm1Regs.TBCTR;\
__medis();
#define RESTART_CLOCK __meallow();\
EPwm3Regs.TBCTL.bit.CTRMODE = TB_FREEZE;\
EPwm3Regs.TBCTR = 0;\
EPwm3Regs.TBCTL.bit.CTRMODE = TB_COUNT_UP;\
__medis();