Ti C2000 DSP CCS代码执行时间测试

Ti C2000 DSP CCS代码执行时间测试

方法一:时钟计数

I’m assuming you want to measure the execution time of a function, ISR, or other part of your code. In CCS, you can use the clock to do this. In the Debug perspective, select “Run -> Clock” and check “Enable”. You should see the clock in the lower right corner of CCS. Then set break-points at the start and end of the code you want to time and run to the first. Double-click on the clock to reset it, and run to the second. The clock will record the number of CPU cycles since it was last reset.

该方法具体流程:https://downloads.ti.com/ccs/esd/documents/ccs_counting_cycles.html

方法二:GPIO输出

If the code cannot be stopped but you still want to know the timings, the best way to proceed is to toggle an I/O pin at the start and end of the code you want to time, and physically monitor the pin using an oscilloscope. There are “gpio_toggle” code example for the device you are using in C2000Ware at: C:\ti\c2000\C2000Ware_1_00_06_00\device_support\f2837xd\examples\cpu1\gpio_toggle\cpu01

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/572764/tms320f28027f-estimation-of-the-execution-time-of-a-program?keyMatch=PROGRAM+EXECUTION+TIME&_ticdt=MTY5MjI1OTU1NnwwMTdlZGNhOTAzYmYwMDA4YjI4YmU4YWZkYTM5MGQwNmUwMDhlMDY2MDA5Nzh8R0ExLjMuMzY2MTAzNjU5LjE2NDQzNzk1NzI

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/765892/ccs-launchxl-f28379d-how-to-measure-program-execution-time-on-f28379-board-on-code-composer-studio?keyMatch=PROGRAM+EXECUTION+TIME&_ticdt=MTY5MjI1OTk0MHwwMTdlZGNhOTAzYmYwMDA4YjI4YmU4YWZkYTM5MGQwNmUwMDhlMDY2MDA5Nzh8R0ExLjMuMzY2MTAzNjU5LjE2NDQzNzk1NzI

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值