Skip to main content
LMI2
Senior III
September 1, 2016
Question

How to use the DWT_CYCCNT and DWT_CONTROL

  • September 1, 2016
  • 3 replies
  • 1272 views
    This topic has been closed for replies.

    3 replies

    Tesla DeLorean
    Guru
    September 1, 2016
    Posted on September 01, 2016 at 20:30

    They are ARM core registers, but optional for the licensee, ST choose to use them in the STM32 designs for the M3 and M4 cores, and their address is fixed and define in the ARM TRM. One might not choose to use them to reduce silicon, power, or fit in an FPGA, or meet timing goals (critical paths).

    The M7 might be slightly different, or require magic unlock sequences

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    LMI2
    LMI2Author
    Senior III
    September 1, 2016
    Posted on September 01, 2016 at 21:45

    So, these addresses are defined somewhere else and I don't need to put them in code the myself like in one of the examples?

    With M3 and M4.

    Tesla DeLorean
    Guru
    September 1, 2016
    Posted on September 01, 2016 at 22:51

    They are defined in the manual, you'd need to set up the appropriate variable or structure. They are not in core_cm3.h or core_cm4.h like some of the ITM stuff at 0xE0000000

    http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0337h/BABJFFGJ.html

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..