cancel
Showing results for 
Search instead for 
Did you mean: 

Partial Frame Buffer not updating

Archer_Lawrence
Associate

Hi all,

I'm trying to use the partial frame buffer feature and I get the first two partial frames (40 lines), but TouchGFX does not seem to update the screen into the partial buffer.  Just using TouchGFX no DMA, and no ChromArt.

 

My home screen is :

Archer_Lawrence_0-1754587554422.png

But the LCD only displays

Archer_Lawrence_1-1754587770711.png

Looking at the partial frame buffer, the rest of the screen is not rendered.

Do I need to make some call in frame transfer to update to the next partial frame?

Thanks

Archer

1 REPLY 1
mathiasmarkussen
ST Employee

Hello,

You need to implement a few functions, it is described in TouchGFXGeneratedHAL.cpp:

/* ******************************************************
 * Functions required by Partial Frame Buffer Strategy
 * ******************************************************
 *
 *  int touchgfxDisplayDriverTransmitActive() must return whether or not data is currently being transmitted, over e.g. SPI.
 *  void touchgfxDisplayDriverTransmitBlock(const uint8_t* pixels, uint16_t x, uint16_t y, uint16_t w, uint16_t h) will be called
 *  when the framework wants to send a block. The user must then transfer the data represented by the arguments.
 */

extern "C" int touchgfxDisplayDriverTransmitActive();
extern "C" int touchgfxDisplayDriverShouldTransferBlock(uint16_t bottom);
extern "C" void touchgfxDisplayDriverTransmitBlock(const uint8_t* pixels, uint16_t x, uint16_t y, uint16_t w, uint16_t h);
extern "C" void touchgfxSignalVSync(void);
touchgfxDisplayDriverShouldTransferBlock() should return the line number that it is safe to update the GRAM above to avoid tearing. This can be achieved using a timer. For examples of how these functions could be implemented, you can take inspiration from one of the provided Board Setups that use partial frame buffers. In general, that would be the ones for Nucleo kits with display boards attached.