Skip to main content
Associate II
July 28, 2023
Question

how to count elapsed period from break point to breakpoint

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? 

    This topic has been closed for replies.

    3 replies

    TDK
    July 28, 2023

    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""."
    ahmashAuthor
    Associate II
    July 28, 2023

    i am using 32f401 

    Pavel A.
    July 28, 2023

    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.