2022-09-21 01:26 AM
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.
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
Solved! Go to Solution.
2022-10-12 02:37 AM
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
2022-09-21 08:02 AM
Use your code single or double buffer mode ?
2022-09-21 10:52 PM
Hello @MM..1 ,
Not sure to understand what single or double buffer mode means but I have one buffer per textArea.
Kind regards,
Eve
2022-09-22 02:01 AM
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.
/Osman
2022-09-22 04:43 AM
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
2022-09-22 05:07 AM
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?
2022-09-22 06:02 AM
Hello @MM..1 ,
SYSclockk => 480MHz
For the fonts, they are in the internal flash because when qspi fails, the texts appear on screen.
Regards,
Eve
2022-09-22 08:40 AM
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 ...
2022-10-12 02:37 AM
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
2022-10-12 03:13 AM
Hello Eve,
Good to hear! You're welcome :)
/Osman