Skip to main content
Graduate
March 20, 2024
Solved

Header file to include to access the CYCCNT register on STM32U575xx?

  • March 20, 2024
  • 2 replies
  • 1974 views

I noticed the CYCCNT register is accessible from multiple header files.

That register is defined as part of the DWT_Type structure.

That structure definition is repeated in many header files:

core_armv8mbl.h, core_armv8mml.h, core_armv81mml.h, core_cm3.h, core_cm4.h, core_cm7.h, core_cm23.h, core_cm33.h, , core_cm35.h, , core_sc300.h

My actual MCU is the STM32U575xx and I would like to know which one of those header file to include.

 

Also, I am new on this community and I am unsure that I applied the proper label for this question. Please let me know if there is a more appropriate label.

 

Note: I would like to use this register in order to measure time in 100`s of microsecond. I know it could be done using timers. Does it make sense to measure time that way?

 

 

 

 

 

 

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

    Thank you

    2 replies

    Graduate II
    March 20, 2024

    Should pull in via the DWT definition in  STM32Cube_FW_U5_V1.3.0\Drivers\CMSIS\Core\Include\core_cm33.h

    ClaudeAuthorAnswer
    Graduate
    March 20, 2024

    Thank you

    ClaudeAuthor
    Graduate
    March 20, 2024

    I ended up with this header file

    #include "../Drivers/CMSIS/Device/ST/STM32U5xx/include/stm32u5xx.h"