2019-12-24 02:41 AM
Hi All,
I need your help , I am configuring TouchGFX with DSI ( STM32F778AI ) with RM67162 360X320 pixels display.
Before adding TouchGFX I was able to write using LTDC,DMA2D and DSIHost without any pixel shift ( also without TE ).
After I added TouchGFX I suppose to have pixel shift , Basically what I done I tried to draw Red color on full screen and I have lines from top to bottom ( attached picture ).
TE is 60HZ coming from display.
Buffer configured to external memory to address 0xC0000000
I tried :
void HAL_DSI_TearingEffectCallback(DSI_HandleTypeDef *hdsi)
{
/* USER CODE BEGIN DSI_TearingEffectCallback */
/* Used when the OTM8009 LCD driver is selected */
GPIO::set(GPIO::VSYNC_FREQ);
HAL::getInstance()->vSync();
OSWrappers::signalVSync();
if (!doubleBufferingEnabled && HAL::getInstance())
{
// In single buffering, only require that the system waits for display update to be finished if we
// actually intend to update the display in this frame.
HAL::getInstance()->lockDMAToFrontPorch(refreshRequested);
}
if (refreshRequested && !displayRefreshing)
{
// We have an update pending.
if (doubleBufferingEnabled && HAL::getInstance())
{
// Swap frame buffers immediately instead of waiting for the task to be scheduled in.
// Note: task will also swap when it wakes up, but that operation is guarded and will not have
// any effect if already swapped.
HAL::getInstance()->swapFrameBuffers();
}
// Transfer a quarter screen of pixel data.
HAL_DSI_Refresh(hdsi);
displayRefreshing = true;
} else
{
GPIO::clear(GPIO::VSYNC_FREQ);
}
/* USER CODE END DSI_TearingEffectCallback */
}
void HAL_DSI_EndOfRefreshCallback(DSI_HandleTypeDef *hdsi)
{
/* USER CODE BEGIN DSI_EndOfRefreshCallback */
if (displayRefreshing)
{
// Otherwise we are done refreshing.
__HAL_DSI_WRAPPER_DISABLE(hdsi);
LTDC_LAYER(&hltdc, 0)->CFBAR = (uint32_t)currFbBase;
__HAL_LTDC_RELOAD_IMMEDIATE_CONFIG(&hltdc);
//LCD_SetUpdateRegionLeft(); //Set display column to 0-399
__HAL_DSI_WRAPPER_ENABLE(hdsi);
GPIO::clear(GPIO::VSYNC_FREQ);
displayRefreshing = false;
if (HAL::getInstance())
{
// Signal to the framework that display update has finished.
HAL::getInstance()->frontPorchEntered();
}
}
/* USER CODE END DSI_EndOfRefreshCallback */
}
Any Help?
Thanks!!!
David