Manipulation of the TouchGFX framebuffer to serve a custom QSPI display driver.
Hi STM Forum,
I'm integrating a custom QSPI display controller with TouchGFX and ThreadX. I need to convert the TouchGFX framebuffer into RGB666 (6 bits per color) for a custom display interface that runs over SPI/QSPI.
Here is my IOC. As you can see, I currently have only the QSPI and the clock connected.

I believe the framebuffer is defined in TouchGFXGeneratedHAL.cpp as:
LOCATION_PRAGMA_NOLOAD("TouchGFX_Framebuffer")uint32_t frameBuf[(320 * 240 * 2 + 3) / 4 * 2] LOCATION_ATTRIBUTE_NOLOAD("TouchGFX_Framebuffer")
My target app currently runs on an STM32F7. I also have a GFX01M2 display on a Nucleo H503, but the SPI display example is of limited use because it appears to use many more GPIOs than I have available in my application (I only have QSPI).
I have the following questions that will help me integrate TouchGFX into this project:
- How do I invoke a screen switch from code?
- When and in which method should I capture the framebuffer, manipulate it, convert it, and pass it to my custom QSPI controller?
- What TouchGFX method is triggered during a screen transition that would allow me to modify the framebuffer?
Before I start digging into rabbit holes, I thought posting here might help others with the same issue.
Thank you in advance for your help.
