Skip to main content
Graduate
November 29, 2023
Solved

breakpoint to breakpoint cycle count ?

  • November 29, 2023
  • 3 replies
  • 1513 views

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

    This topic has been closed for replies.
    Best answer by TDK

    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.

    3 replies

    TDKAnswer
    Super User
    November 30, 2023

    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.

    Graduate II
    November 30, 2023

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

    Graduate
    November 30, 2023

    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.