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.

[参考译文] TMS570LS1224:性能监控单元需要多长时间才能保持准确?

Guru**** 2481465 points


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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/704758/tms570ls1224-how-much-time-is-needed-for-performance-monitoring-unit-to-be-accurate

器件型号:TMS570LS1224

您好!

当使用 PMU 测量代码执行时间时,我一直使用“HerculesTmARMRegistered安全 MCU 执行时间测量”作为参考。 我想知道的是、来自提供的 main.c 文件、特别是以下代码:

// for (loop_count=0;loop_count {
//运行基准测试代码-函数调用或代码序列
CODE_TO_BE_measored ();


何时实际需要多个环路? 代码运行的最短时间是否可以精确测量?

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

    它用于计算平均值。 循环会花费周期,而输入函数(code_TO_BE meased())也会花费周期。 您可以直接测量代码:

    for……loop

    START_PMU_
    代码

    STOP_PMU
    CYCLE [i]= STOP_CYCLE - START_CYCLE

    计算平均值。