2025-07-15 6:08 PM
Hello,
I am using STM32F103 and CubeIDE software for a time measurement project. In the capture interrupt function of the external signal, I obtain the value(CNT) of the timer to calculate the interval time between signals. And I use STLINK V2 to debug my program (SWD).
While I was debugging my program, I found that no matter where I add the break point, the interval time would change. In other words, the process of adding breakpoints during debugging affected the operation of timer. This does not occur in Keil.
Please provide me with a solution. Because I don't want to give up using CubeIDE.
2025-07-15 8:00 PM
There's a setting to freeze the timers when the core is halted if that's what you want. Look at the DBG_TIMx_STOP bits in the Reference Manual.