2025-05-12 5:22 AM - edited 2025-05-15 3:41 AM
I'm working on a project using STM32H7 (Waveshare OpenH7XXI-C board) with TouchGFX 4.25.
External QSPI flash (W25Q128) for storing bitmap/image assets
External SDRAM (IS42S16400J - 16MB) for framebuffer and runtime buffers
Display resolution: 1024×600, color format: RGB888
Due to hardware design limitations, I'm unable to increase the QuadSPI speed (track length and plug-n-play module constraints).
I’ve observed that during frequent screen updates, some parts of the background image get re-read from QSPI, resulting in flickering.
This becomes more noticeable when using large fonts, wildcard text updates, or redrawing images.
I want TouchGFX to:
Load image/bitmap assets (stored in QSPI) only once at startup
Copy them into SDRAM
Reuse from SDRAM on future redraws — avoiding repeated QSPI reads
What is the recommended method to configure TouchGFX for caching QSPI images into SDRAM once?
How should I modify the linker script (.ld) to reserve a section in SDRAM for bitmap cache without conflicting with the framebuffer?
Is there a way to verify whether an image was successfully cached?
What happens if the cache size is exceeded?
Framebuffer is mapped at 0xD0000000 in SDRAM (TouchGFX_Framebuffer)
Planning to reserve from 0xD0400000 onwards for cached bitmaps via a .BitmapCacheSection in the linker
If needed, I’m happy to share my .ld file or SDRAM init code.
Thanks in advance for your guidance and suggestions!
Solved! Go to Solution.
2025-05-15 2:39 AM
hii @MM..1 thanks a lot for your response!
Yes, I’m currently using a double frame buffer strategy, with dynamic memory allocation. So I’ve assigned the framebuffer addresses in the linker script.
The SDRAM is configured in 16-bit mode, and for rendering, I’m using DMA2D in Memory-to-Memory mode with blending.
Regarding your question:
@MM..1 wrote:
Is DMA2D used? All limits vs LTDC clock is in appnote AN4861.
Yes, I’ve already gone through AN4861, and I’ve configured the LTDC parameters as per my display's datasheet.
As for RGB888, I don’t specifically need it at the moment, but I wanted to test how my current system performs under the highest configuration. This way, I can better identify the limitations of my existing setup, which will help during the design phase of the next hardware revision.
I’m updating 5 text areas in real time via Ethernet. When I use a background image and font size larger than 40px, the display starts flickering. Interestingly, after 2–3 resets, the flickering stops — but it reappears again on subsequent resets. (for Font Size less than 35px every thing work normally)
However, if I replace the background image with a simple Box widget filled with a plain color, there is no flickering at all, even when increasing the font size up to 100px. The display remains stable in that case.
So, it seems the flickering is somehow tied to the combination of background image and larger fonts during high-frequency updates.
2025-05-15 2:51 AM
Flickering is more related to unoptimal configuration on FMC/SDRAM than the speed between QSPI and DMA/SDRAM.
I had kind of flickering or wrong resolution/definitions in fonts and figures/images that got solved once the FMC/SDRAM got fixed.
hope it helps.
2025-05-15 5:21 AM
Issue solved, thanks for reporting ;)
2025-05-16 3:21 AM
Hii @Osman SOYKURT
Thank you so much for sharing this article—it was incredibly helpful!
With the guidance provided, I successfully implemented the Bitmap Caching mechanism, and it's working flawlessly. Even after multiple controller resets, there's no flickering at all now.
2025-05-16 3:28 AM
Hello @jumman_JHINGA ,
Glad to hear it solved your issue! :)