Measure Code Execution Time on FRDMK32L3A6 (CortexM4F)

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

Measure Code Execution Time on FRDMK32L3A6 (CortexM4F)

跳至解决方案
1,656 次查看
Kolibri
Contributor III

Hello i want to measure code execution time of some functions in my implementation. I´m working with the Development Board FRDMK32L3A6 it has an CortexM4F on it.

I want something like:

start_Timer()

Execute code...

stop_timer()

read_timer_value()

Is there a simple way to do this?

Thanks and best regards

0 项奖励
回复
1 解答
1,653 次查看
Kolibri
Contributor III

I´ve found this https://mcuoneclipse.com/2017/01/30/cycle-counting-on-arm-cortex-m-with-dwt/  in the meanwhile and also this https://community.nxp.com/t5/S32K-Knowledge-Base/Measure-the-running-time-of-one-function-on-S32K/ta... and i´ve just tried to search for DWT in the SDK examples of my Board. I activated the Cycle Counter and everything works fine which is pretty nice.

Why stands in the Reference Manual: https://www.nxp.com/webapp/sps/download/preDownload.jsp?render=true on page 318 that the Clock Cycle Counter is not supported?

Thanks and best regards

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,654 次查看
Kolibri
Contributor III

I´ve found this https://mcuoneclipse.com/2017/01/30/cycle-counting-on-arm-cortex-m-with-dwt/  in the meanwhile and also this https://community.nxp.com/t5/S32K-Knowledge-Base/Measure-the-running-time-of-one-function-on-S32K/ta... and i´ve just tried to search for DWT in the SDK examples of my Board. I activated the Cycle Counter and everything works fine which is pretty nice.

Why stands in the Reference Manual: https://www.nxp.com/webapp/sps/download/preDownload.jsp?render=true on page 318 that the Clock Cycle Counter is not supported?

Thanks and best regards

0 项奖励
回复