cancel
Showing results for 
Search instead for 
Did you mean: 

How to see core utilization in stm32 cubeide?

RAnan.3
Associate III

I am using STM32L452RC for my project. I need to know the core utilization that is similar to how we see in the task manager. I need to know this, since I want to see the difference in the utilization with and without involving DMA. I need to verify that core utilization is reduced if we use DMA for memory to memory to transfer. Please suggest a method to verify this by seeing the core utilization in cubeide.

5 REPLIES 5
AScha.3
Chief II

maybe using SWV statistics: (swd+swo connection needed)

0693W00000Y6vs8QAB.png

If you feel a post has answered your question, please click "Accept as Solution".
KnarfB
Principal III

There is no one-button-click solution for that.

If you are using FreeRTOS, there is a 6.2.1.3 RTOS profiling information section in the STM32CubeIDE user guide.

There is also sample code in the firmware package https://github.com/STMicroelectronics/STM32CubeL4/tree/master/Utilities/CPU.

Without RTOS, you may increment a counter in the main while loop counting the time the MCU spends in the while loop.

For detailed latency/real-time analysis I like to issue SEV instructions in the main/idle loop and monitor them on a pin configured as EVENTOUT with a logic analyzer.

hth

KnarfB

Hey thanks...I tried this but I couldn't get what you have shared.

I enabled SWV in debug configurations and in the SWV statistical profiling I added main() by selecting SWV trace(Scissor like icon), clock frequency. In short, I followed everything that was given in the STM32cubeide manual.

But IDE got hanged and I was not able to proceed further. Any known reasons for that?

Please help me move further on this.

Thanks , I'll explore that too

i followed this:

https://www.codeinsideout.com/blog/stm32/swv/#debugging

+

data trace can make problems, when too much events are generated;

i tried "CPI:..." and got a lot of overflows...so stopped using this.

0693W00000Y6wDBQAZ.pngotherwise no problems - until now. :)

If you feel a post has answered your question, please click "Accept as Solution".