2021-04-29 05:42 AM
Hello!
I made the project for a custom SPI display with configuration like screenshot below:
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?
2021-04-29 05:58 AM
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
2021-04-29 06:03 AM
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.
2021-04-29 06:18 AM
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.
2021-04-29 07:03 AM
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. (((
2021-04-29 07:15 AM
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.