Hello,
I would like to know if any of you know how to count the cycles (or instruction count) executed between 2 breakpoints on KDS?. Alternatively do any of you know if there is a way to know the timestamp between two breakpoints.
Thank you!
-Carlos
Solved! Go to Solution.
Hi Carlos,
Which Kinetis device are you using?
Are you using RTOS? If yes which?
If MQX please review this previous Community Post:
Re: elapsed time in nanoseconds
If baremetal then you could use a PIT timer to is derived from the Peripheral Bus Clock (1/2 the core clock) and start the timer are one breakpoint and stop it at the second breakpoint. Be careful the PIT has not overflown.
Regards,
David
Hi Carlos,
Which Kinetis device are you using?
Are you using RTOS? If yes which?
If MQX please review this previous Community Post:
Re: elapsed time in nanoseconds
If baremetal then you could use a PIT timer to is derived from the Peripheral Bus Clock (1/2 the core clock) and start the timer are one breakpoint and stop it at the second breakpoint. Be careful the PIT has not overflown.
Regards,
David
Thank you, I am using the KL03 baremetal. Using the timers make sense. I was hoping for cycle count, but the timer approach will work as well I guess, I am thinking on counting a few microseconds with a core clock on the 1/2 MHz range, so I think it should not overflow.
Thank you!
-Carlos