Skip to main content
BParh.1
Senior III
Solved

How to convert TouchGFX Designer project template to use internal buffer?

So I am using STM32f769 Disco board, first I use template project from TouchGFX Designer and so far it is good. But then I realize it is using framebuffer located on external SRAM address 0xC0000000. But I want to change the location to internal RAM e.g. defined as array in the code like:

uint16_t framebuffer[widht*height].

How should I do this?

This topic has been closed for replies.
Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee

Hi,

You can set the framebuffer address within the generated STM32CubeMX project in the "STMicroelectronics.X-Cube-TouchGFX" configuration under the "Software Packs". You can also do this through code in TouchGFXHAL.cpp by setting the start address in the startFrameBufferAddresses function.

void TouchGFXHAL::initialize()
{
 
 TouchGFXGeneratedHAL::initialize();
 
 setFrameBufferStartAddresses((void*)startAddress, (void*)0, (void*)0);
 
 ...
 
}

/Romain

2 replies

Romain DIELEMAN
Romain DIELEMANBest answer
ST Employee

Hi,

You can set the framebuffer address within the generated STM32CubeMX project in the "STMicroelectronics.X-Cube-TouchGFX" configuration under the "Software Packs". You can also do this through code in TouchGFXHAL.cpp by setting the start address in the startFrameBufferAddresses function.

void TouchGFXHAL::initialize()
{
 
 TouchGFXGeneratedHAL::initialize();
 
 setFrameBufferStartAddresses((void*)startAddress, (void*)0, (void*)0);
 
 ...
 
}

/Romain

BParh.1
BParh.1Author
Senior III

Thank you @Romain DIELEMAN​