Skip to main content
Nex-Leo
Associate II
February 6, 2025
Solved

Why does the CPU load factor still change periodically when the page is static, and how can it be further reduced?

  • February 6, 2025
  • 1 reply
  • 1469 views

这可能是什么原因造成的呢?

NexLeo_0-1738803307443.png

Best answer by GaetanGodart

Hello @Nex-Leo and welcome to the community!

 

TouchGFX runs even when the screen is not changing because he needs to check if something has to change.

Multiple things happens, including a check every ticks (usually 60 times per second).
The handleTickEvent function is called, so make sure to keep the code inside of it as efficient as possible.
Perhaps you have some area of the screen that you invalidate even when nothing is changing, so make sure to optimize your invalidated area.
Finally, the MCU load can be drastically reduce by using a graphic accelerator such as NeoChrom or Chrom-ARTbut this is embedded inside your chip (which one are you using?).

 

Regards,

1 reply

GaetanGodart
GaetanGodartBest answer
Technical Moderator
February 6, 2025

Hello @Nex-Leo and welcome to the community!

 

TouchGFX runs even when the screen is not changing because he needs to check if something has to change.

Multiple things happens, including a check every ticks (usually 60 times per second).
The handleTickEvent function is called, so make sure to keep the code inside of it as efficient as possible.
Perhaps you have some area of the screen that you invalidate even when nothing is changing, so make sure to optimize your invalidated area.
Finally, the MCU load can be drastically reduce by using a graphic accelerator such as NeoChrom or Chrom-ARTbut this is embedded inside your chip (which one are you using?).

 

Regards,

Nex-Leo
Nex-LeoAuthor
Associate II
February 7, 2025

Hello,@GaetanGodart@GaetanGodart:

Thank you for your reply, by optimising the invalid operation it does work. Another problem is that I am using STM32U5 chip and when I enable the DMA2D function, the CPU load doesn't decrease, even some slight increase amount.

Regards.

GaetanGodart
Technical Moderator
February 7, 2025

Hello @Nex-Leo ,

 

I am glad it helped you!

Are you using TouchGFX? By default, DMA2D is enable, can you quickly run me through how you enable or disable it? I do not see why enabling DMA2D would increase CPU load, are you sure of your measurements? Does it happens on different UIs?

 

Regards,