Skip to main content
MKiss.1
Associate II
February 16, 2021
Solved

TouchGFXHAL::flushFrameBuffer() is only called once after the first OSWrappers::signalVSync(). What am I missing?

  • February 16, 2021
  • 4 replies
  • 4981 views

Considering existing posts and instructions in the documentation, I can't manage the framework to call flushFrameBuffer() regularly after a vsync.

The main issue is that TouchGFXHAL::flushFrameBuffer() is only called once after the first OSWrappers::signalVSync() (and never again). I've deleted all display drivers and checked with a breakpoint that is only hit once in TouchGFXHAL::flushFrameBuffer(). OSWrappers::signalVSync() is triggered by a button and an external interrupt callback. All code that I added is attached. The board is a F303RE Nucleo. Settings of TouchGFX see below.

Many thanks for considering my request.

Sync wrapper. Breakpoint hit on each button press.

0693W000008GH4sQAG.png 

Callback on button press. Calls the wrapper function from above.0693W000008GH03QAG.png 

Breakpoint gets hit.0693W000008GH6PQAW.pngBreakpoint only hit on first button press!0693W000008GH6jQAG.pngTouchGFX settings.0693W000008GH6oQAG.png

This topic has been closed for replies.
Best answer by N. SANTINI

Hi,

Indeed, the flushFrameBuffer function is called by the TouchGFX library only when something has changed in the frame buffer.

Best regards,

Nicolas

4 replies

MM..1
Chief III
February 16, 2021

When you setup Custom Interfaces, you need write full support for graphics refresh. Read demo for SPI displays, or change your config ...

MKiss.1
MKiss.1Author
Associate II
February 16, 2021

I'm aware of that. But all of the transmission (e.g. start of SPI DMA) would be located in TouchGFXHAL::flushFrameBuffer(), which is not executed (more precisely: it is only executed once after the very first vsync). That's why I have deleted all display driver code for this forum.

MM..1
Chief III
February 16, 2021

Callback on button press. Calls the wrapper function from above.0693W000008GH03QAG.png 

check if gpio exti for you work once or more

MKiss.1
MKiss.1Author
Associate II
February 16, 2021

The LED toggling works as expected. Also, a breakpoint in OSWrappers::signalVSync() is hit on each button press. 

MM..1
Chief III
February 16, 2021

OK then try read here TouchGFX custom driver- vsync problem

maybe helps

N. SANTINI
N. SANTINIBest answer
ST Employee
February 26, 2021

Hi,

Indeed, the flushFrameBuffer function is called by the TouchGFX library only when something has changed in the frame buffer.

Best regards,

Nicolas

MKiss.1
MKiss.1Author
Associate II
February 26, 2021

@N. SANTINI​  Thank you for providing clarification.

Kind regards,

Meinhard 

MKiss.1
MKiss.1Author
Associate II
February 26, 2021

@N. SANTINI​ Thank you for providing clarification.

Kind regards,

Meinhard