cancel
Showing results for 
Search instead for 
Did you mean: 

Flickering of some zones of the screen (text + images + keyboard) [solved]

ELero.1
Associate III

Hello,

I'm working with Riverdi_101STM32H7 and TouchGFX4.20.

----------------IMAGES---------------------

I'm experiencing some flickering of the images when I'm changing screen (on the real screen) (some images stay at the same place in several screens so they do not appear during the transition).

----------------TEXTS---------------------

I'm also experiencing 2 different behaviors for the text (staying in the same screen here)

I have a screen with 2 texts zones, one small and one big and the biggest zone flickers when I update it with invalidate. The smallest one has no problem. They do not superpose.

0693W00000SvsdSQAR.png 

Here's my tick function handling the text zones:

void Model::tick()
{
	if (Request_Update_SerialFrame == 1)
	{
		modelListener->Request_Update();
	}
}

In the presenter of my screen:

void LogsPresenter::Request_Update()
{
	view.dataDisplay();
}

In my screen:

void LogsView::dataDisplay()
{
	memset(&textArea_Last_received_frameBuffer , 0 , TEXTAREA_LAST_RECEIVED_FRAME_SIZE);
	Unicode::strncpy(textArea_Last_received_frameBuffer,(char *)Serial_Frame,strlen((char *)Serial_Frame));
	textArea_Last_received_frame.setWideTextAction(WIDE_TEXT_CHARWRAP);
	//textArea_Last_received_frame.resizeToCurrentText();
	textArea_Last_received_frame.invalidate();
 
	memset(&textArea_LogBuffer, 0 , TEXTAREA_LOG_SIZE);
	Unicode::strncpy(textArea_LogBuffer,(char *)HMI_Full_Log,strlen((char *)HMI_Full_Log));
	textArea_Log.setWideTextAction(WIDE_TEXT_CHARWRAP);
	//textArea1.resizeToCurrentText();
	textArea_Log.invalidate();
 
	Request_Update_SerialFrame=0;
}

----------------KEYBOARD---------------------

I'm also experiencing flickering with my keyboard container (code copied from the examples in TouchGFX). When I type the first character on the keyboard, the background flickers (same when I remove the first character with the clear button when there is only one left). I do not have the problem with other following characters.

Would you know how to remove this flickering, please?

Thanks in advance,

Eve

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @Osman SOYKURT​ and @MM..1​ ,

I've managed to remove the flicker by going double buffer but using address 0xD0400000 instead of 0xD0200000.

Thank you both for the help,

Eve

View solution in original post

9 REPLIES 9
MM..1
Chief III

Use your code single or double buffer mode ?

Hello @MM..1​ ,

Not sure to understand what single or double buffer mode means but I have one buffer per textArea.

0693W00000SvxdwQAB.png 

0693W00000Svxe1QAB.png 

Kind regards,

Eve

Osman SOYKURT
ST Employee

Hello Eve,

The framebuffer strategy that MM..1 is talking is about your display configuration; if you open your project ioc file with STM32CubeMX, you can get this information. If it's a single framebuffer strategy, you can try to change it to double instead to prevent your flickering images. I invite you to follow this guide to change the framebuffer strategy.

0693W00000SvyYnQAJ.png 

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

Hello @Osman SOYKURT​,

I have tried what you said, but it doesn't change a thing. I've also looked at the screen closer and it seems like the first text flickers too but it's less noticeable.

Regards,

Eve

You realy switch to double buffer ? How address1 and 2 used? Regenerated projects in TGFX and CubeIDE? ...

Where is stored your fonts internal or external flash, mapped unmapped mode ?

Clock config?

Hello @MM..1​ ,

0693W00000SvzxeQAB.png 

SYSclockk => 480MHz

For the fonts, they are in the internal flash because when qspi fails, the texts appear on screen.

Regards,

Eve

Maybe you need ask Riverdi, because i cant ask every step in complicated config for use SDRAM LTDC FLASH LCD DMA2D ... SYSCLOCK is too relevant to flickering , but most important is other clocks and combination of more clocks...

Try read apnote about LTDC optimizing LCD-TFT display controller (LTDC) on STM32 MCUs - Application note

For example for screen transition some types need more as double buffer config , configure it you can only in source code no in MX ...

Hello @Osman SOYKURT​ and @MM..1​ ,

I've managed to remove the flicker by going double buffer but using address 0xD0400000 instead of 0xD0200000.

Thank you both for the help,

Eve

Hello Eve,

Good to hear! You're welcome :)

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX