Skip to main content
Associate II
July 15, 2025
Question

Screen Flickering on Custom HMI with Double Buffer Enabled (STM32H750 + RGB888, 800x480)

  • July 15, 2025
  • 3 replies
  • 1427 views

Hi,

We are encountering a partial screen flickering issue when using a custom HMI with TouchGFX and double buffer enabled. The screen resolution is 800x480, but only the left portion (480x480) displays correctly. The remaining 320x480 area flickers during runtime, especially when updating data on the UI.

Key Observations:
This issue occurs only when double buffering is enabled.

In single buffer mode, minor flickering is still present, but it's significantly better than dual buffer mode.

The issue is isolated to our custom board and BSP configuration.

Cross-Test:
We tested the same TouchGFX button example on two different displays:

Custom Display Board – 800x480 (TFT-LCD, TST070WVBE-31)
→ Flickering observed

Test Board – 1024x600 (other manufacturer)
→ No flickering observed

The main difference:

Custom board: TouchGFX + BSP drivers (manually configured)

Test board: Fully CubeMX-generated configuration

System Configuration:
MCU: STM32H750

Display: TFT-LCD (TST070WVBE-31), 800x480, RGB888

TouchGFX: 4.24.0

STM32CubeIDE: 1.17.0

STM32CubeMX: 6.14.1

Crystal Frequency: 25 MHz

System Clock: 450 MHz

Display Timing Configuration:
Parameter Value
Width (Active) 800
Height (Active) 480
HSYNC 48
HBP 40
HFP 40
VSYNC 1
VBP 31
VFP 13

Horizontal Total = 48 + 40 + 800 + 40 = 928

Vertical Total = 1 + 31 + 480 + 13 = 525

Pixel Clock Calculation:

PLL3M = 5
PLL3N = 40
PLL3R = 6

VCO = (HSE / PLL3M) × PLL3N = (25 MHz / 5) × 40 = 200 MHz
DOTCLK = VCO / PLL3R = 200 MHz / 6 ≈ 33.33 MHz
Frame Rate ≈ 33.33 MHz / (928 × 525) ≈ **68.7 Hz**

Request:
Could anyone suggest what might be causing the flickering on the right side of the screen (320x480) during UI updates with double buffering?

Are there any known limitations with partial redraws or framebuffer alignment for RGB888 mode?

Could manual invalidateRect() or framebuffer region management be affecting this?

Any experience comparing CubeMX vs. custom BSP configurations in such cases?

We’ve attached the relevant configuration files and video evidence for reference.

Please let me know if additional details are required. Any insights or suggestions to help resolve this issue would be greatly appreciated!

Best regards,
Shekhar

3 replies

Associate II
July 17, 2025

Hi, any update on this? I posted about the screen flicker issue with double buffer enabled two days ago — would appreciate any suggestions.

Associate II
July 18, 2025

Hello everyone,

 

Any update on my post.

MM..1
Chief III
July 22, 2025

Start with reading AN4861 (specialy chapter 5.5), plus optimize SDRAM config...

Associate II
July 23, 2025

Hi,

Thank you for your suggestions. Sure, I will go through AN4861 and try if any clues. 

Thanks.

Osman SOYKURT
Technical Moderator
July 22, 2025

Hello @Shekhar_Sukhabhogi ,

Where are your framebuffers stored? Are they in internal or external RAM? Do you use any assets, and where are they placed? Do you use the DMA to transfer your data? Have you tried testing with a simple UI (no images or text, just rectangles) to check if the issue is visible?

Osman SOYKURTST Software Developer | TouchGFX
Associate II
July 23, 2025

Hi,

Thank you for your reply. Please find my answers below.

1). Where are your framebuffers stored? Are they in internal or external RAM? 

Ans: They are stored in external SDRAM at address 0xC0000000 (64MB).

 

2). Do you use any assets, and where are they placed?

Ans: Yes, we use assets, and they are placed in external FLASH at address 0x90000000 (64MB).

 

3).Do you use the DMA to transfer your data?

Ans: Yes, we are using DMA2D for data transfers.

4). Have you tried testing with a simple UI (no images or text, just rectangles) to check if the issue is visible?

Ans:

  1. Yes, we tested with a simple rectangle (no other widgets or objects), and there was no screen tearing.
    However, once we added a Text widget and called invalidate() from ScreenView.cpp every 1 second, screen tearing occurred — specifically when double buffer mode was enabled.

Please find the attached files for reference.

 

Thanks