Skip to main content
Nicholas Yunker_2
Senior
June 12, 2025
Question

Glitching/Tearing when transitioning from one screen to another

  • June 12, 2025
  • 2 replies
  • 777 views

Hello,

I am in the process of creating a modifying a TouchGFX project using the example project for the STM32H735G-DK kit.  I generated a project in TouchGFX and then modified it to use a larger custom 7" Display/touchscreen.  So far I have been able to get the display to show static images perfectly and I've even been able to modify the generated program to use a GT911 touch controller library for touch control instead of the default FT5336 controller.  All the works perfectly.  Static images look good and touches are registers and transitions from one screen to the next work.  The problem I'm having now is that during the transition the images seem to tare/glitch and I'm not sure what is causing this.  I've modified all the timings to match that of the new display, I've changed the LTDC clock to match that of the new display.  I've changed all the framebuffer settings to match the larger display.  Are there other timing settings I need to manually change in the code to match the new display as well?

This project created by TouchGFX also uses FreeRTOS...this is my first time using an RTOS in my programs, is there some settings here I need to manage for memory or something?  Could there be too little memory allocated to the process?

I've attached a video of what I'm seeing when I trigger a screen transition.  I've also attached my CubeMX .ioc file as well as the datasheet for my display.

2 replies

Nicholas Yunker_2
Senior
June 12, 2025

Interestingly I just tried to change the framebuffer strategy to a single buffer at location 0x70000000 and that improved the glitching so now only the bottom half of the screen glitches while the top half looks perfect and with the reduced glitching you can see that the "wipe" transition is occurring under it all.  Perhaps this is a clue as to what's happening??

GaetanGodart
Technical Moderator
June 16, 2025

Hello @Nicholas Yunker_2 ,

 

You have move to single framebuffer strategy, but what strategy did you use previously?

You say the screen is having tare/glitch. Do you mean tearing?

If the tearing happens during transition, you can measure the rendering time to see if you are having render time issue. You can then try to use n animation that require less screen redraw.

You can then setup compensating-for-lost-frames.

 

Regards,

Nicholas Yunker_2
Senior
June 16, 2025

Hello,

Thank you for your response.  Previously I used a double buffer strategy placing the framebuffers at 0x70000000 and 0x70119400.  Changing to Single Buffer strategy didn't really fix anything so I just went back to double buffer.  What really does seem to help the problem (though it still is happening to a much lesser extent) is disabling the ChromeArt Accelerator in CubeMX under the settings for TouchGFX.

I call it a glitch/tearing but I don't really know what to call it.  If you watch the video I previously attached to my post you will see what I mean.  I am attaching another video to this reply showing the "glitch/tearing" effect with the ChromeArt Accelerator disabled.

I have reviewed the page about measuring the rendering time. I'm not clear, using an oscilloscope, what signal would I be measuring on?  This seems to imply that my refresh rate may be set too high...I don't see in the code where the refresh rate is set...can you point me in the right direction and I will lower than and see if that helps?