Skip to main content
Ken Inoue
Associate III
October 19, 2017
Solved

How can I know the elapsed time between breakpoints in EWARM?

  • October 19, 2017
  • 4 replies
  • 1780 views
Posted on October 19, 2017 at 12:25

How can I know the elapsed time between breakpoints in EWARM?

    This topic has been closed for replies.
    Best answer by S.Ma
    Posted on October 19, 2017 at 15:37

    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.

    4 replies

    S.Ma
    S.MaBest answer
    Principal
    October 19, 2017
    Posted on October 19, 2017 at 15:37

    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.

    Tesla DeLorean
    Guru
    October 19, 2017
    Posted on October 19, 2017 at 16:54

    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.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Ken Inoue
    Ken InoueAuthor
    Associate III
    October 20, 2017
    Posted on October 20, 2017 at 12:53

    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. 

    0690X00000608hXQAQ.png

    what does this 134 mean?

    Best Regards,

    Ken Inoue