cancel
Showing results for 
Search instead for 
Did you mean: 

Partial Frame Buffer & Slide Transition

kumaichi
Associate III

I'm using an STM32U535 and ILI9341 touch display for my project.  I have the screen up and the touch control working with 5 screens, using forward/back buttons to navigate.  The simulator shows the slide transitions correctly but when I push it to my board, there are no slide transitions with selecting the buttons.  I've done some searching and it appears that I don't have any memory allocated for the animation buffer.  Which leads me to my question, how do you implement/allocate memory when a partial frame buffer is being used?

In my research, I need to call the, setFrameBufferStartAddresses() method in the TouchGFXGeneratedHAL::initialize() method.  My initialization method is considerably different than what I've seen:

 

 

// Block Allocator for Partial Framebuffer strategy
static ManyBlockAllocator<2048, /* block size */
       3, /* number of blocks */
       2 /* bytes per pixel */
       > blockAllocator;

void TouchGFXGeneratedHAL::initialize()
{
    HAL::initialize();
    registerEventListener(*(Application::getInstance()));
    enableLCDControllerInterrupt();
    enableInterrupts();
    // Partial framebuffer strategy
    setFrameBufferAllocator(&blockAllocator);
    setFrameRefreshStrategy(HAL::REFRESH_STRATEGY_PARTIAL_FRAMEBUFFER);
}

 

I tried creating some of the examples in TouchGFX but can't seem to find a sample that uses the partial frame buffer with slide transitions.

Any insight would be greatly appreciated.

Kindest regards

2 REPLIES 2
Osman SOYKURT
ST Employee

Hello @kumaichi ,

Slide transition and partial framebuffer strategy are not compatible. 
You can set the partial framebuffer strategy on STM32CubeMX in the X-CUBE-TOUCHGFX pack :

OsmanSOYKURT_0-1726663288083.png

Osman SOYKURT
ST Software Developer | TouchGFX
tdecker2
Associate III

The slide transition needs the third framebuffer called animationStorage. A screenshot of the old screen is stored in this buffer and then the new screen is loaded. That's needed because in TouchGFX only one screen object can exist at a time.

 

void setFrameBufferStartAddresses(void frameBuffer, void doubleBuffer, void * animationStorage)

 

I only used it with double buffering, but I think it also works with single buffering.