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.

[参考译文] CCS/MSP430FR5969:使用 MSP430fr5969电路板测量函数执行时间。

Guru**** 2551130 points
Other Parts Discussed in Thread: MSP430FR5969

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/609913/ccs-msp430fr5969-measuring-function-execution-time-with-msp430fr5969-board

器件型号:MSP430FR5969

工具/软件:Code Composer Studio

你好。

我想测量 MSP430FR5969电路板上运行的函数执行时间。

我想在该板中使用计时器、  

是否有任何有关使用计时器测量函数执行时间的示例?

或者是否有任何工具可以测量它?

最棒的  

Mirae

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好、Mirae、
    Code Composer Studio 正在对时钟周期进行计数。 您可以在函数之前和之后设置断点、以检查函数需要多少个时钟周期。 通过将时钟周期与 MCLK 周期时间相乘、可以得出执行时间。

    此致、
    托比亚斯
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    [引用用户="Tobias Oschmann ]Hi Mirae、
    Code Composer Studio 正在对时钟周期进行计数。 您可以在函数之前和之后设置断点、以检查函数需要多少个时钟周期。 执行时间通过将时钟周期与 MCLK 周期时间相乘得出。

    是的、但是如果我记住正确、e2e 上会报告几次、CCS 报告的时钟周期是错误的。 总之、任何人都可以对 F5xx 执行这个简单的测试...

    RRA.b @R5 ;3. RRA.b @R5    ;3.
    NOP ;1. RRA.b @R5    ;3
       RRA.b @R5    ;3. RRA.b @R5    ;3
       nop ;1. RRA.b @R5    ;3
       RRA.b @R5    ;3. RRA.b @R5    ;3
       nop ;1. RRA.b @R5    ;3
       RRA.b @R5    ;3. NOP ;1
       nop ;1. NOP ;1
       RRA.b @R5    ;3. NOP ;1
       nop ;1. NOP ;1
       RRA.b @R5    ;3. NOP ;1
       nop ;1. NOP ;1-----
    --------------
    周期总数24周期总数27 

    而在 FRAM 器件上、周期数是科幻小说(只需用两个 NOP 替换 JMP +2、就不对齐了)。 我的建议是使用计时器。