2023-09-21 02:36 AM
Hello,
Is there an integrated tool in STM32CubeIDE that I can use to measure how long a block of code lasts?
I was used to use a similar tool on TI CodeComposer, that measured the elapsed clocks from a breakpoint to another.
Thank you,
Carlo
2023-09-21 06:32 AM
No, there's nothing built in like this in STM32CubeIDE. You can use DWT->CYCCNT on chips that have it to get an idea of code performance, or make your own profiling measurement.
2023-09-22 04:08 AM
Hello everyone,
@TDK
I am using a STM32G0x1 and, standing on what is written in the reference manual, this MCU should have the Data Watchpoin Unit.
Anyway, if I try to write DWT in the expression window, the symbol is unknown and it seems that is not possible to add watchpoints (the menù entry is disabled).
@davidlora
If I right-click on a breakpoint, the "Profile Instruction Counter" option isn't present in the context menù.
Could it be that "Profile Instruction Counter" is an external plug-in or that my IDE version (v.1.11.2) is too old?
Or that "Profile Instruction Counter" is a watchpoint context menu option, instead of a breakpoint one?
Thank you,
Carlo