Skip to main content
Visitor II
May 9, 2026
Question

Using ThreadX thread to provide Vsync with TouchGFX

  • May 9, 2026
  • 2 replies
  • 96 views

I have a TouchGFX (latest version) application using STM32H753 and an OLED with GRAM.  Runs under Threadx.

I found the development process quite complex but had no problem eventually building the project with all the subsystems apparently working properly.

BUT....

The very simplest part of the task I cannot complete.  I want C code in a ThreadX Thread to initiate the redraw of the next frame in the single display buffer (after which the DMA would be initiated from the frame buffer to GRAM...).  I need to access the OSWrappers.hpp in order to provide "Vsync" to TouchGFX which I can't do from "C".  After days and days, I can assure you there is no apparent way to call the relevent C++ method from the C code within Threadx.  In other words there is no 'hook' on the "C" side to make the function call.  

Any suggestions?

None of the Google-search documentation on this subject makes any sense.

Thank you

Gerry

2 replies

MM..1
Chief III
May 10, 2026
ST Employee
May 21, 2026

The way this is supposed to be handled is in TouchGFX/target/TouchGFXHAL.cpp.

You can take a look at some of the Board Setups provided with TouchGFX for SPI displays.

They use the Tearing Effect pin as an interrupt to supply the VSYNC signal and a timer to count lines, which is mostly important if you are running partial frame buffer.