How to Load QSPI Assests into SDRAM Once and Use Them Repeatedly in TouchGFX?
Hello ST Community,
I'm working on a project using STM32H7 (Waveshare OpenH7XXI-C board) with TouchGFX 4.25.
My hardware setup:
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.
My goal:
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
My Questions:
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?
️ Current Setup:
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!
