cancel
Showing results for 
Search instead for 
Did you mean: 

CPU load and memory usage

Ibrahimsha
Associate III

Split from this thread as the questions become more generic on embedded systems not related to the STM32.

Hello Team,

We are currently evaluating STM32H563ZI for a production system and would like your guidance on recommended CPU and RAM margin before moving to large-scale deployment.

Ibrahimsha_1-1769752451607.png

Based on our current firmware build analysis (STM32CubeIDE Build Analyzer):

  • RAM:

    • Total: 640 KB

    • Used: ~182 KB (≈28.5%)

    • Free: ~458 KB

  • Flash:

    • Total: 1 MB

    • Used: ~282 KB (≈27.6%)

    • Free: ~742 KB

From a static memory usage perspective, sufficient margin is available. However, our application is load-dependent, and real CPU utilization varies based on field conditions and communication traffic.

We would like clarification and guidance on the following points:

  1. What CPU utilization margin (%) is recommended for STM32H5 series devices in production systems (for example, acceptable average and peak CPU load)?

  2. What RAM headroom (free heap and stack margin) is considered safe for long-term and 24/7 operation?

  3. Are there any STM-recommended best practices for CPU and memory budgeting on STM32H563, especially for applications with variable runtime load?

  4. Are there any known considerations related to interrupt load, DMA usage, or RTOS behavior that should be accounted for when defining margin?

Our goal is to validate the MCU selection with sufficient safety margin before mass production and to avoid risks during future feature expansion.

We appreciate your support and guidance on this matter.

 

 

1 REPLY 1
mƎALLEm
ST Employee

Hello,

 1- What CPU utilization margin (%) is recommended for STM32H5 series devices in production systems (for example, acceptable average and peak CPU load)?

-> The CPU load usage is not a specific related question is more related to a general question on embedded systems. You can do a search on the web how to measure the CPU load with and without RTOS.

Best practice: CPU load should not exceed 75% of the total load. And the CPU load needs to be assessed by you by running tests.

2- What RAM headroom (free heap and stack margin) is considered safe for long-term and 24/7 operation?

> Same here. That's not a STM32 related question. That needs from you doing tests and analysis. There is no exact value to provide. It is determined empirically. Then you need to assess the memory usage and add a margin for safety usage of these memories.

3- Are there any STM-recommended best practices for CPU and memory budgeting on STM32H563, especially for applications with variable runtime load?

No. There no specific best practice for STM32H563. As stated previously that's more related to embedded system development question. Do a search on the web on how to do the memory profiling.

I think, you need to discuss with your software architecture to fine tune these answers of your questions. 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.