Skip to main content
Associate II
Mar 20, 2024 2:30 PM UTC
Solved

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

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.
ClaudeBest answer
Associate II
Mar 20, 2024 3:11 PM UTC

Thank you

5 replies

Tesla DeLorean
Guru
Mar 20, 2024 3:07 PM UTC

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

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
ClaudeAuthorBest answer
Associate II
Mar 20, 2024 3:11 PM UTC

Thank you

ClaudeAuthor
Associate II
Mar 20, 2024 4:16 PM UTC

I ended up with this header file

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