Measure code execution time on ARM Cortex-M0 using KDS

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Measure code execution time on ARM Cortex-M0 using KDS

1,854 次查看
rafaalvescomp11
Contributor II

Good night,

 

I am using the Freedom KL25Z platform and the Kinetis Design Studio (KDS) software.

How can I measure code execution time in KDS?

 

Agradeço desde já,

Rafael

0 项奖励
5 回复数

1,842 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi rafaalvescomp11,

KDS hasn't this function. You use systick to count time or use gpio and oscillator to monitor.

 

Rregards,

Jing

1,813 次查看
rafaalvescomp11
Contributor II

Good afternoon,

 

I used a Systick, configured and programmed the Systick according to the images below and the current countdown value was 2410470, how do I convert this value to the execution time?

0 项奖励

1,702 次查看
jingpan
NXP TechSupport
NXP TechSupport

Hi,

Systick clock frequency is equal to core clock frequency. For example, if the core run at 48M, the total time is 2410470/48M.

 

Regards,

Jing

0 项奖励

1,658 次查看
rafaalvescomp11
Contributor II

Hi Jing,

Dividing 2410470 by 20.97152M which is the system clock I get as a result 0.11 seconds, but wouldn't the execution time of the attached example have to be close to 5s?

 

Regards,

Rafael 

0 项奖励

1,831 次查看
rafaalvescomp11
Contributor II

Hi jingpan,

Thank you.

0 项奖励