TouchGFX custom driver- vsync problem
Hello,
I want to run TouchGFX on STM32F413VGTX MCU. It Doesnt not have LTDC nor DMA2D so I want to make it run using FSMC without graphic accelerator with my ST7529 LCD controller. The problem is I can not make it run.
I created a project with ToucGFX and custom driver:

I added MX_TouchGFX_Process() to the default task:
void StartDefaultTask(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
MX_TouchGFX_Process();
}
/* USER CODE END 5 */
}And I added another task to trigger a vsync signal:
void testTask(void *argument)
{
/* USER CODE BEGIN 5 */
/* Infinite loop */
for(;;)
{
TouchGFX_TickHandler();
osDelay(1);
}
/* USER CODE END 5 */
}The TouchGFX_TickHandler() is constructed as follows:
extern "C" {
void TouchGFX_TickHandler(void)
{
if (os_inited)
{
OSWrappers::signalVSync();
}
}
}And now, the result is everything is initializing, framebuffer is allocated, all the queues from OSWrappers are created, the TouchGFX process is running and it reaches void OSWrappers::waitForVSync(). It waits for a vsync_queue. When testTask reaches OSWrappers::signalVSync(); message is put into the queue and waitForVSync exits triggering Model::tick() and for example Screen1View::setupScreen(). After that OSWrappers::takeFrameBufferSemaphore() is called but osSemaphoreAcquire(frame_buffer_sem, osWaitForever) never gets a semaphore and it stucks.
The problems are:
- Nothing appears to happen with framebuffer. Engine does not draw anything to RAM.
- TouchGFX process never enters OSWrappers::waitForVSync() again. It seems like it waits for something.
- TouchGFX stucks in takeFrameBufferSemaphore().
What have I forgot about? My LCD does not have a vsync signal so I have to trigger it manually. Should I make it from ISR? Have I forgot about some instructions in TouchGFX_TickHandler()?
Thanks in advance,
Maciek