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
已解决! 转到解答。
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
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