2021-01-20 09:28 AM
I try to connect LCD by SPI to Nucleo-767 and TouchGFX.
LCD screen work perfect and I could draw on it without a problem, but I stuck with TouchGFX.
I found that void TouchGFXHAL::flushFrameBuffer never call.
Check this video - https://youtu.be/1UhEx7E_dH0
What I did:
LED doesn't light.
Of course, I checked that timer callback works, led works.
In debug mode I found that app stuck in lockFrameBuffer function.
What I did wrong?
2021-01-20 09:35 AM
Seems as you plan use TouchGFX without OS then read and apply all steps for this config from docu.
Too write how mode display you use?...
2021-01-20 09:47 AM
What steps i missed? Vsync -> flushbuffer.
I tried with rtos but steps the same - generate vsync, in flushbuffer send from buffer to screen.
2021-01-20 10:43 AM
2021-01-20 11:13 AM
Yes, i implemented all of that. What next?
Again, the problem that flushBuffer doesnt call, so no sense show full code of it.
2021-01-20 11:53 AM
Try show your code here for example
void OSWrappers::signalVSync()
{
}
...
2021-01-20 12:03 PM
I think this is autogenerated function
void OSWrappers::signalVSync()
{
vsync_sem = 1;
}
2021-01-20 12:34 PM
and where you call it ?...
i write for example best is place here all relevant code
2021-01-20 11:42 PM
main.c
extern void touchgfx_signalVSyncTimer(void);
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
if (htim->Instance == TIM13) {
touchgfx_signalVSyncTimer();
}
}
TouchGFXHAL.cpp
extern "C" void touchgfx_signalVSyncTimer(void)
{
HAL::getInstance()->vSync();
OSWrappers::signalVSync();
}
timer setup
static void MX_TIM13_Init(void)
{
/* USER CODE BEGIN TIM13_Init 0 */
/* USER CODE END TIM13_Init 0 */
/* USER CODE BEGIN TIM13_Init 1 */
/* USER CODE END TIM13_Init 1 */
htim13.Instance = TIM13;
htim13.Init.Prescaler = 47999;
htim13.Init.CounterMode = TIM_COUNTERMODE_UP;
htim13.Init.Period = 30;
htim13.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim13.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim13) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM13_Init 2 */
HAL_TIM_Base_Start_IT(&htim13);
/* USER CODE END TIM13_Init 2 */
}
Stacktrace on pause
2021-01-21 03:34 AM
Place breakpoint in
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
if (htim->Instance == TIM13) {
touchgfx_signalVSyncTimer();
}
}
check period of call and start with longer periods. You need time to render full one frame.
When your display provide TE use it instead timer...