2022-12-27 06:28 AM
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.
2022-12-27 06:50 AM
maybe using SWV statistics: (swd+swo connection needed)
2022-12-27 06:56 AM
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
2022-12-27 07:35 AM
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.
2022-12-27 07:44 AM
Thanks , I'll explore that too
2022-12-27 08:06 AM
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.
otherwise no problems - until now. :)