Skip to main content
ELero.1
Associate III
September 21, 2022
Solved

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

  • September 21, 2022
  • 9 replies
  • 5116 views

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

This topic has been closed for replies.
Best answer by ELero.1

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

9 replies

MM..1
Super User
September 21, 2022

Use your code single or double buffer mode ?

ELero.1
ELero.1Author
Associate III
September 22, 2022

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 Technical Moderator
September 22, 2022

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

ST Software Developer | TouchGFX
ELero.1
ELero.1Author
Associate III
September 22, 2022

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

MM..1
Super User
September 22, 2022

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?