How can I know the elapsed time between breakpoints in EWARM?
On a general note, I think the core has a CYCLECOUNT register which needs to be enabled. By substracting the values between breakpoints (or even stored on a global variable), knowing the core clock frequency can yield the time between two points in the code. (with global variable, max value can be also tracked over some operating time). For IAR specifics, don't know.
Yes, ST's M3 and M4 designs have the DWT_CYCCNT, one could use the BKPT instruction and time tag specific points in the code, and report the delta time in R0, for example.
Dear Mr./Ms. Clive One
Thank you for your reply. First, I would like you to see my answer to Mr./Ms.KIC 8462852 EPIC 204278916. As written there, I made a program that flashes the LED by TIM counter overflow every 500 ms. And I got the picture below.
what does this 134 mean?
Dear Mr./Ms. KIC8462852 EPIC204278916
Thank you for your reply. I found CYCLECOUNT register. I enabled the CYCLECOUNT register by setting the DWT Control register's CYCNTENA bit (DWT_CTRL.CYCNTEN) to 1.
But I have something I can not understand. I made a program that flashes the LED by TIM counter overflow every 500 ms. Below is the interrupt part of the program. I set a breakpoint here.
And as shown in the picture below, I was able to get CCSTEP = 134.
But what does this 134 mean? I am using STM32F401RETx Nucleo-F401RE, and SYSCLK is 84MHz.
So, 134/(84*10^6)=1.595us. I want this answer to be 500 ms.
Retrieving data ...