cancel
Showing results for 
Search instead for 
Did you mean: 

how to count elapsed period from break point to breakpoint

ahmash
Associate II

i am using stm32 cube ide ,in deugger mode how can i see or where can i see the time elapsed when i jump from one breakpoint to another breakpoint ? sorry i am new user of stm buti am already a fan of stm devices because of low cost and high performance ,before that i was using pic and there is an option of stopwatch in mplabx to watch the time elapsed from instruction to instruction and debugger mode can also be run in software mode without attaching a mcu at usb port, is there also such options available in stmcubeide? 

3 REPLIES 3
TDK
Guru

You can use the debug timer (DWT->CYCCNT) to count cycles. That counter stops when system is halted (e.g. at a breakpoint). Look up how to enable it for the STM32 you're using.

Be aware things in debug mode don't always translate to when the debugger is not attached.

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

i am using 32f401 

Pavel A.
Evangelist III

A good debugger displays the time deltas itself. IAR's, if memory servers.

and debugger mode can also be run in software mode without attaching a mcu

Not in CubeIDE. This is a software simulator. Try Keil, IAR.