cancel
Showing results for 
Search instead for 
Did you mean: 

How to Load QSPI Assests into SDRAM Once and Use Them Repeatedly in TouchGFX?

jumman_JHINGA
Senior II

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 (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:

  1. Load image/bitmap assets (stored in QSPI) only once at startup

  2. Copy them into SDRAM

  3. Reuse from SDRAM on future redraws — avoiding repeated QSPI reads


My Questions:

  1. What is the recommended method to configure TouchGFX for caching QSPI images into SDRAM once?

  2. How should I modify the linker script (.ld) to reserve a section in SDRAM for bitmap cache without conflicting with the framebuffer?

  3. Is there a way to verify whether an image was successfully cached?

  4. 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!

0 REPLIES 0