Cycle Counting on Kinetis K64F

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

Cycle Counting on Kinetis K64F

1,092 次查看
LArmstrong1985
Contributor III

Hi

I would know if there are functions to cycle counting on MCUXpresso SDK.

I have seen that ARM processors contains a special register called DWT for this purpose.

Can I use it on my fw release to time elapsed couting or is it meant for debugging only and isn't it a good practice?

Thank you very much!

标签 (1)
2 回复数

1,028 次查看
ErichStyger
Specialist I

Hi Fabio,

you can use it in the debugger (see Measuring ARM Cortex-M CPU Cycles Spent with the MCUXpresso Eclipse Registers View | MCU on Eclipse ) or in the application too (see Cycle Counting on ARM Cortex-M with DWT | MCU on Eclipse ).

For the later see McuOnEclipseLibrary/McuArmTools.c at master · ErichStyger/McuOnEclipseLibrary · GitHub  which is an implementation using the MCUXpresso SDK.

I hope this helps,

Erich

1,028 次查看
LArmstrong1985
Contributor III

Hi Erich,

thank you very much for your support and also for your great blog where

we can learn so many things!