Count clock cycles of a particular algorithm

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Count clock cycles of a particular algorithm

ソリューションへジャンプ
1,103件の閲覧回数
carlostadeoorte
Contributor III

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

ラベル(1)
1 解決策
671件の閲覧回数
DavidS
NXP Employee
NXP Employee

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

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
672件の閲覧回数
DavidS
NXP Employee
NXP Employee

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

0 件の賞賛
返信
671件の閲覧回数
carlostadeoorte
Contributor III

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

0 件の賞賛
返信