cancel
Showing results for 
Search instead for 
Did you mean: 

RAM and CPU Usage on STM32F779I at Runtime

yalamanda dosakayala
Associate II
Posted on January 11, 2018 at 14:55

Hi I want to asses the resources used by my program while run time. As My project requirement is to asses the resources used by the my application.

Can any one help me How do I can find these resources usage run time .

#stm32f779i #ram-usage
8 REPLIES 8
AvaTar
Lead
Posted on January 11, 2018 at 15:04

Try to ******.

Or a static analysis of your compiler, and/or runtime analysis via debugger.

Posted on January 11, 2018 at 16:15

CPU utilization is the time you don't spend in the idle loop. Use a free running TIM to see how much time you spend there.

For memory, walk the heap to see how much of the memory arena you are using, and check the maximal depth of the stack.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AvaTar
Lead
Posted on January 11, 2018 at 16:20

Good debuggers support an easy read-out of cycle count registers.

Whatever that might be useful for.

And there is the old-fashioned way for load measurement.

Set a GPIO high whenever your application is actually busy, and watch with a scope.

Works well with a cyclical approach.

Some RTOSes already do this for you.

Posted on January 11, 2018 at 16:14

What about without debugger ? I want to display both the resources usage by my application

Posted on January 11, 2018 at 18:34

Hi , I am using  FreeRTOS , How can I measure the RAM utillization and CPU utilization with  by my appllication with FreeRTOS support.

Is there any API to find it.

Posted on January 13, 2018 at 12:07

As I remember, the documentation of FreeRTOS is 'un-free' (as in 'free beer'), i.e. one has to pay for.

Perhaps you find appropriate examples.

Posted on January 15, 2018 at 14:03

Yes, FreeRTOS books and manuals can be purchased; but, the information is also available

https://freertos.org/a00106.html

.
Posted on January 15, 2018 at 14:12

FreeRTOS does have RAM utilization functions, if you are using one of FreeRTOS's heap allocate

https://www.freertos.org/a00111.html

 and your port supports xPortGetFreeHeapSize().

FreeRTOS also has API for

https://freertos.org/a00021.html

, see vTaskList().