Skip to main content
Richard Lowe
Senior II
January 30, 2021
Question

What is an example of how to drive the main loop with SPI based displays.

  • January 30, 2021
  • 3 replies
  • 872 views
void TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect)
{
	EINK_SetDisplayWindow( rect.x, rect.y, rect.width, rect.height );
	this->copyFrameBufferBlockToLCD(rect);
}

I'm trying to drive an E-INK display via SPI. Have overridden the flushFrameBuffer method, but unfortunately, it never is called. The Main Loop of TouchGFX is blocked.

E-Ink doesn't need to be refreshed at 60Hz. So... I'm lost on how to drive the loop.

This is the only mention in the documentation:

"Selecting a custom display interface also requires developers to implement a custom TouchGFX Application Tick driver that signals 

OSWrappers::signalVSync()

 to unblock the TouchGFX Engine Main loop. Usually, displays used along with MCUs that have no TFT Controllers can provide a Tearing Effect signal that is connected to the MCU."

No details are listed. How fast. From timer ok?

This topic has been closed for replies.

3 replies

Richard Lowe
Senior II
February 1, 2021

I've tried running this function in a timer:

extern "C"
{
 void TouchGFX_Engine()
 {
		HAL::getInstance()->vSync();
		OSWrappers::signalVSync();
 }
}

With no effect. Seems to be stuck at lockFrameBuffer()

0693W000007DWP2QAO.png 

I'm missing the concept of how the main loop is driven. Any ideas?

Richard Lowe
Senior II
February 2, 2021

Found this thread: TouchGFX with SPI TFT and it appears that this bug has never been fixed.

Richard Lowe
Senior II
February 2, 2021

Confirmed, works with double buffering, does not with a single buffer.