Use DWT library with STM32F091

314 Views Asked by At

So I'm trying to get a rough measure of the execution of a certain function.

I'm trying to use the DWT library with the code

CoreDebug->DEMCR |= CoreDebug_DEMCR_TRCENA_Msk;
DWT->LAR = 0xC5ACCE55; 
DWT->CYCCNT = 0;
DWT->CTRL |= DWT_CTRL_CYCCNTENA_Msk;

but clearly the compiler returns error: 'CoreDebug' undeclared (first use in this function)

I'm seeing that inside Drivers/DMSIS/Include there are various .h files including it (i.e. core_armv8mml.h, core_cm3.h, core_cm33.h, core_cm4.h, core_cm7.h, core_sc300.h)

Which one should I use for the STM32F091

0

There are 0 best solutions below