cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX Thread BLOCKED

GMG
Associate III

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

GMG_1-1762448886617.png

 

GMG_0-1762448842402.png

 

1 REPLY 1
JohanAstrup
ST Employee

Hello @GMG.

I would recommend you to have a look at one of the following TBSs available in TouchGFX Designer:

  • NUCLEO-U385RG + RVA15MD
  • NUCLEO-WBA65Rl + RVA15MD

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