2024-03-20 07:30 AM - edited 2024-03-20 08:06 AM
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?
Solved! Go to Solution.
2024-03-20 08:11 AM
Thank you
2024-03-20 08:07 AM
Should pull in via the DWT definition in STM32Cube_FW_U5_V1.3.0\Drivers\CMSIS\Core\Include\core_cm33.h
2024-03-20 08:11 AM
Thank you
2024-03-20 08:40 AM
Actually @Tesla DeLorean , when I include that header file, I get the following compilation error :
../App/../Drivers/CMSIS/Include/core_cm33.h:127:8: error: #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
127 | #error "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
| ^~~~~
Note that the path I actually used is as follow:
2024-03-20 08:41 AM
Note that the datasheet says I have a single precision FPU.
Maybe that file is meant to be included from another one?
2024-03-20 09:16 AM
I ended up with this header file