cancel
Showing results for 
Search instead for 
Did you mean: 

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

Richard Lowe
Senior III
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?

3 REPLIES 3
Richard Lowe
Senior III

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 III

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

Richard Lowe
Senior III

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