Skip to main content
Vitaliy69
Associate
April 29, 2021
Question

OSWrappers::signalVSync hangs

  • April 29, 2021
  • 5 replies
  • 2233 views

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?

This topic has been closed for replies.

5 replies

Romain DIELEMAN
ST Employee
April 29, 2021

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

Vitaliy69
Vitaliy69Author
Associate
April 29, 2021

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
Super User
April 29, 2021

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

Vitaliy69
Vitaliy69Author
Associate
April 29, 2021

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. (((

Vitaliy69
Vitaliy69Author
Associate
April 29, 2021

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.