cancel
Showing results for 
Search instead for 
Did you mean: 

Why the Dynamic Graph On the LCD is flickering?

ATavo.1
Associate III

Hi,

I have a problem with Dynamic graph on the LCD that when I upload the code, the graph on the screen start to flicker but it's not the in the simulation. I shared the video below.

I want to Update 680 data points on the Graph every tick in "handleTickEvents".

(The data comes from the SPI. The SPI and TouchGFX are in different tasks.)

I used TouchGFX 4.15 and I am using STM32H743 with external RAM and FreeRTOS.

Thanks in advance

1 ACCEPTED SOLUTION

Accepted Solutions
ATavo.1
Associate III

Thanks for the helps, it was the doublebuffer that solved the problem.

And i change the clock to lower value and worked. idk why though.

Still thanks everyone.

View solution in original post

8 REPLIES 8
Romain DIELEMAN
ST Employee

Hi,

Does this happen only with the dynamic graph or also with other animations ? If it is only linked to the graph then I think the issue comes from the mcu does not have time to render everything at every tick. Would it be possible to either take more time to display the changes (like every two ticks for example) or reduce the amount of data points ?

Are you using a single framebuffer by the way or the double framebuffer strategy ? You could try using a double framebuffer if you have the storage for it.

/Romain

Agree. Looks like single buffer problem.​

ATavo.1
Associate III

I shared the image for clock setting

I tried to use Double framebuffer but it only shows a black screen.

Can you help me on how to set up the double framebuffer settings.

I read this: https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-framebuffer-strategies

but I don't know what other changes need to be done.

I lowered the LTCD-clock and looks better now but still when I change the framebuffer still it is a black screen.

Thanks again,

To enable the double framebuffer strategy you just need to set it in the TouchGFX Generator in STM32CubeMX like in the article you shared. What address did you set ? I would suggest to use the "By Address" setting instead of "By Allocation" to be sure where you set those framebuffer start addresses.

When you debug can you see if something is written at those addresses ?

/Romain

What kind of display do you have by the way ? You could use the TouchGFX Board Setup for the STM32H743 eval board as source of inspiration if it is similar to your setup

/Romain

A TFT-LCD with 800x480 pixels. I used "by address". The first address is 0xC0000000 and the second one is 0xC0177000 for RGB565 (16bit).

ATavo.1
Associate III

Thanks for the helps, it was the doublebuffer that solved the problem.

And i change the clock to lower value and worked. idk why though.

Still thanks everyone.