Skip to main content
RAnan.3
Associate III
December 27, 2022
Question

How to see core utilization in stm32 cubeide?

  • December 27, 2022
  • 2 replies
  • 2167 views

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.

This topic has been closed for replies.

2 replies

AScha.3
Super User
December 27, 2022

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

0693W00000Y6vs8QAB.png

"If you feel a post has answered your question, please click ""Accept as Solution""."
RAnan.3
RAnan.3Author
Associate III
December 27, 2022

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.

AScha.3
Super User
December 27, 2022

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""."
KnarfB
Super User
December 27, 2022

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

RAnan.3
RAnan.3Author
Associate III
December 27, 2022

Thanks , I'll explore that too