cancel
Showing results for 
Search instead for 
Did you mean: 

How to measure core utilization?

Antypas.Peter
Senior
Posted on May 29, 2016 at 19:33

I'm new to ARM so please bear with me. I searched this forum and didn't find anything relevant (or maybe I didn't search well enough), so I'm posting my question here.

In the microprocessor world, we have the notion of CPU utilization and we can measure it. In the STM32 (ARM Cortex M4 in particular), is there such a concept? How would I know if I have overburdened my MCU with - say - complex floating point code executing in ISR mode?

#arm-cortex-m4
1 REPLY 1
Posted on May 30, 2016 at 01:41

The cheap way is to modulate a GPIO and view on a scope. The self-contained method is to read the cycle counter (DWT CYCCNT) and measure execution time directly. One can benchmark code very effectively. Limited trace via SWD/SWO. Crude profiling via instrumentation of function entry/exit, etc.

The expensive way is to use a Trace Pod (figure $1500 + tools), you can do quite complex analysis and profiling. See J-Trace and U-LinkPro

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..