2025-11-06 9:12 AM - edited 2025-11-06 9:14 AM
I try to use TouchGFX with FreeRTOS, and one of the many problems I found, is thath the screen is nod refreshed because Thread (TouchGFX_Task) is waiting inside OSWrappers::waitForVSync, but VSync is disabled in configuration. I'm missing something? I followed all the steps in the tutorial (https://support.touchgfx.com/docs/development/touchgfx-hal-development/scenarios/scenarios-configure-rtos) but seams doesn't working. I'm using an SPI display, the project is for M7 core on STM32H755
2025-12-04 7:16 AM
Hello @GMG.
I would recommend you to have a look at one of the following TBSs available in TouchGFX Designer:
Both of these TBSs run with FreeRTOS and an SPI display.
In the TBSs, the tearing effect signal from the display is used to tick the application.
I have inserted a snippet from TouchGFXHAL.cpp below.
void HAL_GPIO_EXTI_Rising_Callback(uint16_t GPIO_Pin)
{
if (GPIO_Pin == LCD_TEAR_Pin)
{
...
tearingEffectCount++;
/* VSync has occurred, increment TouchGFX engine vsync counter */
touchgfx::HAL::getInstance()->vSync();
/* VSync has occurred, signal TouchGFX engine */
touchgfx::OSWrappers::signalVSync();
setVSYNC();
startRenderingImmediately = true;
}
}
void HAL_GPIO_EXTI_Falling_Callback(uint16_t GPIO_Pin)
{
if (GPIO_Pin == LCD_TEAR_Pin)
{
...
clearVSYNC();
startRenderingImmediately = false;
}
...
}
Best regards,
Johan