2025-07-09 3:45 AM - last edited on 2025-07-09 3:48 AM by Andrew Neil
Hello,
I am using the STM32H743IITG microcontroller with a 7-inch RGB888 interface display. I have integrated TouchGFX using STM32CubeIDE.
The problem is that I am seeing flickering in the middle of the display. This flickering occurs when I add a box widget in TouchGFX.
Has anyone faced a similar issue or can suggest how to resolve it?
Thanks in advance!
2025-07-09 4:20 AM - edited 2025-07-09 4:21 AM
There would be many reasons like, LTDC parameters, LTDC Frequency, FrameBuffer Size (Single Double), SDRAM Configurations (Speed, Timings, etc), if your using QuadSPI ( speed, memory mapped).
or could be a hardware issue like Loos FPC connection, Track lenght etc.
you need to debug these things first.
2025-07-11 3:02 AM - last edited on 2025-07-11 3:09 AM by Andrew Neil
hello sir when iam drawing the solid colour to the display iam getting the same colour on display but when iam trying to draw any shapes on the display then iam getting the distortion
sir iam using the ltdc 24 bit ARG888 and my ltdc configuration are show in bellow
and my ltdc clock is 26.6 Mhz
hltdc.Instance = LTDC;
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;
hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
hltdc.Init.HorizontalSync = 47;
hltdc.Init.VerticalSync = 2;
hltdc.Init.AccumulatedHBP = 87;
hltdc.Init.AccumulatedVBP = 34;
hltdc.Init.AccumulatedActiveW = 975;
hltdc.Init.AccumulatedActiveH = 514;
hltdc.Init.TotalWidth = 1015;
hltdc.Init.TotalHeigh = 527;
hltdc.Init.Backcolor.Blue = 0;
hltdc.Init.Backcolor.Green = 0;
hltdc.Init.Backcolor.Red = 0;
if (HAL_LTDC_Init(&hltdc) != HAL_OK)
{
Error_Handler();
}
pLayerCfg.WindowX0 = 0;
pLayerCfg.WindowX1 = 800;
pLayerCfg.WindowY0 = 0;
pLayerCfg.WindowY1 = 480;
pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
pLayerCfg.Alpha = 255;
pLayerCfg.Alpha0 = 0;
pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
pLayerCfg.FBStartAdress = 0xD0000000 ;
pLayerCfg.ImageWidth = 800;
pLayerCfg.ImageHeight = 480;
pLayerCfg.Backcolor.Blue = 0;
pLayerCfg.Backcolor.Green = 0;
pLayerCfg.Backcolor.Red = 255;
if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)
{
Error_Handler();
}
And one more thing when i changeing the ARGB888 to RGB888 format then iam drawing any shape iam
getting the shape on the display but the colous is not pure(some stipes between the colour) please see the below picture.
ididnt understand the problem sir and one more thing iam using the external sdram and my configurations
is
static void MX_FMC_Init(void)
{
/* USER CODE BEGIN FMC_Init 0 */
/* USER CODE END FMC_Init 0 */
FMC_SDRAM_TimingTypeDef SdramTiming = {0};
/* USER CODE BEGIN FMC_Init 1 */
/* USER CODE END FMC_Init 1 */
/** Perform the SDRAM1 memory initialization sequence
*/
hsdram1.Instance = FMC_SDRAM_DEVICE;
/* hsdram1.Init */
hsdram1.Init.SDBank = FMC_SDRAM_BANK2;
hsdram1.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;
hsdram1.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
hsdram1.Init.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_32;//FMC_SDRAM_MEM_BUS_WIDTH_16;
hsdram1.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
hsdram1.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_3;
hsdram1.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
hsdram1.Init.SDClockPeriod = FMC_SDRAM_CLOCK_PERIOD_2;
hsdram1.Init.ReadBurst = FMC_SDRAM_RBURST_DISABLE;
hsdram1.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0;
/* SdramTiming */
SdramTiming.LoadToActiveDelay = 2;
SdramTiming.ExitSelfRefreshDelay = 7;
SdramTiming.SelfRefreshTime = 4;
SdramTiming.RowCycleDelay = 6;
SdramTiming.WriteRecoveryTime = 2;
SdramTiming.RPDelay = 2;
SdramTiming.RCDDelay = 2;
if (HAL_SDRAM_Init(&hsdram1, &SdramTiming) != HAL_OK)
{
Error_Handler( );
}
/* USER CODE BEGIN FMC_Init 2 */
/* USER CODE END FMC_Init 2 */
}
FMC_SDRAM_CommandTypeDef Command;
__IO uint32_t tmpmrd = 0;
/* Step 1: Configure a clock configuration enable command */
Command.CommandMode = FMC_SDRAM_CMD_CLK_ENABLE;
Command.CommandTarget = FMC_SDRAM_CMD_TARGET_BANK2;
Command.AutoRefreshNumber = 1;
Command.ModeRegisterDefinition = 0;
HAL_SDRAM_SendCommand(&hsdram1, &Command, HAL_MAX_DELAY);
/* Step 2: Insert 100 ms delay */
HAL_Delay(100);
/* Step 3: Configure a PALL (precharge all) command */
Command.CommandMode = FMC_SDRAM_CMD_PALL;
HAL_SDRAM_SendCommand(&hsdram1, &Command, HAL_MAX_DELAY);
/* Step 4: Configure an Auto Refresh command */
Command.CommandMode = FMC_SDRAM_CMD_AUTOREFRESH_MODE;
Command.AutoRefreshNumber = 8;
HAL_SDRAM_SendCommand(&hsdram1, &Command, HAL_MAX_DELAY);
/* Step 5: Configure the external memory mode register */
tmpmrd = (uint32_t) SDRAM_MODEREG_BURST_LENGTH_1 |
SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL |
SDRAM_MODEREG_CAS_LATENCY_3 |
SDRAM_MODEREG_OPERATING_MODE_STANDARD |
SDRAM_MODEREG_WRITEBURST_MODE_SINGLE;
Command.CommandMode = FMC_SDRAM_CMD_LOAD_MODE;
Command.ModeRegisterDefinition = tmpmrd;
HAL_SDRAM_SendCommand(&hsdram1, &Command, HAL_MAX_DELAY);
/* Step 6: Set the refresh rate */
HAL_SDRAM_ProgramRefreshRate(&hsdram1, 683); // For 64ms / 8192 rows ≈ 7.8 µs per refresh
and these datasheet are uploaded below
Edited to apply source code formatting - please see How to insert source code for future reference.
2025-07-11 9:53 PM
Are you using DMA2D and Chrome ART accelarator?
2025-07-13 9:04 PM
No sir iam not using the DMA2D and Chrome ART accelarator
2025-07-13 9:38 PM
then, try DMA2D and Chrome ART accelarator. this might resolve your issue
2025-07-15 11:58 PM
I will try and update to you sir