cancel
Showing results for 
Search instead for 
Did you mean: 

OSWrappers::signalVSync hangs

Vitaliy69
Associate II

Hello!

I made the project for a custom SPI display with configuration like screenshot below:

0693W00000AMtNOQA1.png 

Added in main.c:

void StartDefaultTask(void const * argument)
{
  /* USER CODE BEGIN 5 */
  MX_TouchGFX_Process();
  /* Infinite loop */
  for(;;)
  {
    osDelay(1);
  }
  /* USER CODE END 5 */
}
void StartTask02(void const * argument)
{
  /* USER CODE BEGIN StartTask02 */
  /* Infinite loop */
  for(;;)
  {
    osDelay(20);
    TouchGFX_TickHandler();
  }
  /* USER CODE END StartTask02 */
}

And in TouchGFXHAL.cpp:

extern "C" void TouchGFX_TickHandler();
 
void TouchGFX_TickHandler() {
  OSWrappers::signalVSync(); 
}

The function TouchGFX_TickHandler() called one time and hangs on OSWrappers::signalVSync(). As a result (?) functions void TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect) and Screen1View::setupScreen() are never called.

I'm using the latest software (TouchGFX 4.16.1, latest HAL/CMSIS etc).

Is this a bug or am I missing an important detail?

5 REPLIES 5
Romain DIELEMAN
ST Employee

Hi,

I am a bit confused by TouchGFX_TickHandler and your two tasks. Are you following a guide or did you use one of the application templates available in TouchGFX Designer for one of the ST development boards as source of inspiration ?

/Romain

I used this manual and STM32L496-DISCO Application template. Should I use only 1 call (OSWrappers::signalVSync or MX_TouchGFX_Process)? I used TouchGFX_TickHandler because display haven't got TE pin.

OSWrappers::waitForVsync() never returns.

MM..1
Chief III

Your TouchGFX_TickHandler()

seems be writed ok as in doc, but you cant call it as RTOS , priority and other trouble. This need be called by hw interrupt externaly when TE or internaly from any timer CC int.

FMC and SPI Display Interface | TouchGFX Documentation

Ok, I moved TouchGFX_TickHandler to HW timer TIM7_IRQHandler.

OSWrappers::signalVSync is called 2 times now. And TIM7_IRQHandler stop called. That is too strange.

void TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect) and Screen1View::setupScreen() are not called still. (((

Seems got any debbuger issues. OSWrappers::signalVSync called without any problems.

But why do void TouchGFXHAL::flushFrameBuffer(const touchgfx::Rect& rect) and Screen1View::setupScreen() not called? I wish implement custo driver in flushFrameBuffer function.

btw virtual void handleTickEvent() also not called.