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.

[参考译文] RTOS/TMS570LC4357:_pmuGetEventCount_始终返回0

Guru**** 2611705 points
Other Parts Discussed in Thread: HALCOGEN

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/766318/rtos-tms570lc4357-_pmugeteventcount_-return-0-always

器件型号:TMS570LC4357
主题中讨论的其他器件:HALCOGEN

工具/软件:TI-RTOS

您好!

我想打印周期数、但以下代码返回0。

//--测量初始化;要测量用于从节点接收数据的周期数
_pmuInit_();
_pmuEnableCountersGlob_();
_pmuSetCountEvent_(pmuCOUNTER0、PMU_cycle_count);// PMU_INST_ARCH_executed
//-测量执行---
_pmuResetCounters_();
_pmuStartCounter_(pmuCOUNTER0);
uint32 cycles_PMU_start =_pmuGetEventCount_(pmuCOUNTER0);

printf ("密钥生成\n");
crypto_sign_keypair (pk、sk);

_pmuStopCounter_(pmuCOUNTER0);
uint32 cycles_PMU_end =_pmuGetEventCount_(pmuCOUNTER0);
uint32 cycles_PMU_measure = cycles_PMU_end - cycles_PMU_start;

printf ("%lu \n"、cycles_PMU_measure); 

我使用的是 TMS570LC43、我通过 halcogen 生成了系统文件。  

最棒的

Soundes。

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

    请检查 CCS 表达式中的周期(cycles_PMU_measure、cycles_PMU_end 等)
    2.请尝试%i、%d 或%1D 以获取 printf 中的格式
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    表达式窗口显示未找到标识符、而 printf 返回0。
  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好、Soundes:

    表达式窗口无法显示在另一个函数中定义或声明的变量的值。

    请在以下位置添加断点:
    uint32 cycles_PMU_measure = cycles_PMU_end - cycles_PMU_start;

    然后单步检查表达式窗口中的值