cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX performance issues

seg_fault01
Associate II

 

Hello,

I use the STM32H747 running at 400 MHz (M7) together with a display that has a resolution of 800x480 pixels.
I have set up a project in TouchGFX Designer based on the Gauge example project.
The design includes 2 gauges. The chrome ART is enabled according to the CubeMX configuration.
How can I for sure say, that the DMA2D features are used? The only thing that happens
in the project is that the gauge needles move based on the values of an array (the values change in each frame).
The system should run at around 60 FPS, but only manages 30 Fps and therefore drops every 2nd frame (MCU is at 90% utilization).
The needle images are 3x150 pixels (I'm using RGB888) and are stored in internal flash.
What changes can I make to improve the performance of the two gauges?

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hello

I have also tried a two-gauge screen on H747. The fact is that H747 is no longer suitable for hardened GUI development cuz a single DMA2D is not capable enough of supporting too many spinning images. If you want to keep this project, you can try the L8 format or svg format for the gauge widget image resources.

However, it's worth a trial to use U5A/G/F or H7Sx in your future development.

Wish you luck!

View solution in original post

10 REPLIES 10
seg_fault01
Associate II

In an attempt to improve performance, I've followed this guide: Changing the Pixel Format of an Application | TouchGFX Documentation to change the pixel format from RGB888 to RGB565. I've also called:

 OTM8009A_Init(&OTM8009AObj ,OTM8009A_FORMAT_RGB565, OTM8009A_ORIENTATION_LANDSCAPE);
instead of: 
 OTM8009A_Init(&OTM8009AObj ,OTM8009A_FORMAT_RGB888, OTM8009A_ORIENTATION_LANDSCAPE);

The changes resulted in this beeing display:

seg_fault01_0-1711109315652.jpeg

Any guidance on how to change the pixel format?

 

My experience is similar to what is described in this thread: STM32H747I-DISCO 16-bit Color Depth Problem - STMicroelectronics Community

seg_fault01
Associate II

Still interested

Hello @seg_fault01 ,

To ensure the functionality of ChromART, you can simply use this function to enable or disable it and check the effect on the performance:

HAL::getInstance()->enableDMAAcceleration(value); //value = true/false

You can see the same scenario in the Dice Animation demo or the Screen Transitions.

As for the performance of gauges, I don't have much to say since they are computationally expensive. However, if possible, placing them on two separate screens or decreasing their size will help with the issue (which are very obvious solutions 😅)

Also, I can confirm that changing the pixel format results in an invalid framebuffer. I will spend some time on it and get back to you with a conclusion. 

Best regards,

Mohammad MORADI
ST Software Developer | TouchGFX

Hello Mohammad,

I really appreciate your answer. Activating or deactivating the DMA2D features does not improve performance. It is not possible to split the gauges into 2 screens and unfortunately they will be even larger in the final design.... 

I hope a change in the pixel format goes hand in hand with a slight improvement in performance, as there is less data to process.

Hello

I have also tried a two-gauge screen on H747. The fact is that H747 is no longer suitable for hardened GUI development cuz a single DMA2D is not capable enough of supporting too many spinning images. If you want to keep this project, you can try the L8 format or svg format for the gauge widget image resources.

However, it's worth a trial to use U5A/G/F or H7Sx in your future development.

Wish you luck!

Hello Nathan,

using L8 did increase performance by a little bit 🙂

I see that the STM32U599/5A9 has a GPU that can enhance scaling and rotations 🤔

 

Yes, exactly.

GUI performance increases by using less memory and better graphics calculation technology. I am currently using an STM32U5G9 to develop my alpha and an STM32G071 to develop some low-range GUI.

Despite the STM32U5G9 is equipped with a NEO-Chrom VG GPU to support spinning actions, the STM32G071 also performed perfectly with two gauges on one screen even without a GPU using L8 format (actually it ranked up to 25fps+ using a G071).

If you find my solution useful, it's really kind of you to select my reply as the best solution by clicking "accept as solution". That really helps.

Wish you good luck.

Can you by any chance tell me, how many fps you are getting using the STM32U5G9  with 2 gauges?

Hello.

With U5G9, 2 gauges on one screen ranked up to 60fps.