i have also note some strange things in the generated code :
1) MX_TouchGFX_Init() is called before MX_TouchGFX_PreOSInit and before osKernelInitialize().
MX_TouchGFX_Init();
/* Call PreOsInit function */
MX_TouchGFX_PreOSInit();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Init scheduler */
osKernelInitialize();
MX_TouchGFX_Init() call :
void OSWrappers::initialize()
{
// Create a queue of length 1
frame_buffer_sem = osSemaphoreNew(1, 1, NULL); // Binary semaphore
assert((frame_buffer_sem != NULL) && "Creation of framebuffer semaphore failed");
// Create a queue of length 1
vsync_queue = osMessageQueueNew(1, 4, NULL);
assert((vsync_queue != NULL) && "Creation of vsync message queue failed");
}
It means we are calling os_*** api before kernel initalise.
Note that it doesn't seem to cause any issue (i was thinking that osKernelInitialize() should be call prio any otheir os_*** call) as osSemaphoreNew and osMessageQueueNew doesn't return null.
2) frame_buffer_sem and vsync_queue doesn't have name, and i don't know why, there are not displayed in freertos debug view in STM32CUBEIDE. If i modify the code and give them a name, they are displayed.
3) The issue is problably related with frame_buffer_sem, touchgfx task blocked by this semaphore when screen freeze.
I've tried your project and I could reproduce the issue. Thank you for reporting it, we will investigate on this bug and I'll get back to you when I'll have more info.