Hi, I'm developing the software based on a Cortex M4 MCU, and currently I need to implement a audio processing feature. In this case, I need to evaluate the MCU performance of the current software and the software of the audio processing feature section as well, in order to check if the MCU can support this new feature.
The debugger I am using is SEGGER Jlink. and the compiler I am using is MDK-Essential Edition. Is there any way to do that(evaluate the MCU performance such as CPU running percentage)?
Hi
If you have the ULINK Pro then you can use the debug feature called the Performance Analyzer: www.keil.com/.../uv4_db_dbg_perfanalyzer.htm
With the PA, you can see how much time is being spent in the ideal loop in order to calculate the target device's performance.
As you say you have a Segger J-Link, I suggest that you contact Segger to find if they have similar functionality.
There's also the old-school way of toggling an output pin (or pins) to observe what your code is doing ...
All of ST's offerings support the DWT_CYCCNT and this can be used to counter cycles consumed by functions/algorithms.
In terms of percentage, run the task under an interrupt, have an idle loop with WFI, quantify cycles charged to the task on a second-to-second basis.