cancel
Showing results for 
Search instead for 
Did you mean: 

breakpoint to breakpoint cycle count ?

ahmash
Associate II

hello , where can i see cpu cycle count from one breakpoint to next breakpoint in stmcubeide ? i am using stm32f103 board.

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

There's nothing built-in that will do this.

You can set up a timer that has the same tick rate as the cpu and use that. You'll have to do the math yourself. And you'll have to set the timer so that it's stopped while the chip is paused in debug.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

There's nothing built-in that will do this.

You can set up a timer that has the same tick rate as the cpu and use that. You'll have to do the math yourself. And you'll have to set the timer so that it's stopped while the chip is paused in debug.

If you feel a post has answered your question, please click "Accept as Solution".

The STM32F1 supports the DWT CYCCNT register, use that to count machine cycles.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
way
Associate II

if you want to know the running time between two breakpoint, one suggestion is using a Timer cnt and the other suggestion is to add gpio level change between these breakpoint and use logic analyzer or oscilloscope to measure the time.