2026-05-28 1:50 AM - edited 2026-05-29 2:11 AM
Hello,
I am using the STM32F746G-DISCO board with TouchGFX V4.20.0 and facing a
continuous display flickering issue.
Problem Description: Whenever I place images/widgets on the screen
at 1024x600 resolution, slight flickering appears intermittently.
Sometimes the display becomes stable for a few seconds, but after
some time the flickering starts again.
The issue is not limited to one specific image. Even with normal
images/widgets of resolution 1024x600, the flickering randomly
appears during runtime.
Board: STM32F746G-DISCO
Environment:
1. STM32CubeIDE Version: 1.10.1
2. TouchGFX Version: 4.20.0
3. Display Resolution: 1024x600
4. Image Resolution: 1024x600
Observed Behavior:
1. Small intermittent flickering on display
2. Flickering appears, disappears, and returns again
3. Display occasionally becomes stable temporarily
I have attached the datasheet of the display below for reference.
Could you please help identify the root cause of this flickering
issue based on the datasheet and suggest the correct LTDC timing
or configuration fix?
Thank you.
2026-05-28 3:20 AM
Hello @prasys ,
These issues have been observed when using an older version of TouchGFX Designer. I strongly recommend updating to the latest version (4.26.1) and trying again, as the problem may have already been fixed.
Also, the STM32F746G-DISCO board is equipped with a 480 × 272 display. Are you using another screen with a different resolution wired to your STM32F746G-DISCO board?
If possible, please test the behavior on the default display. If the issue does not appear there, it could indicate a configuration problem with your screen.
2026-05-28 4:11 AM - last edited on 2026-05-29 6:04 AM by Osman SOYKURT
We have design custom solution (board) using STM32F746NGH6 which is inspired from Disco board STM32F746 till date we have successfully interfaced TNP display pannels like 4.3 inch(480*272) , 7 inch (800*480) . First time we are interfacing IPS display pannel having resolution 1024*600 . We have configured the display correctly and the TFT can reproduce hard coded colour bars using below lines of code.
#include "main.h"
#include "cmsis_os.h"
#include "app_touchgfx.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include <stm32746g_discovery_qspi.h>
#include "ADC_Touch.h"
#include <string.h>
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
#define REFRESH_COUNT 1835
#define SDRAM_TIMEOUT ((uint32_t)0xFFFF)
#define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000)
#define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001)
#define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002)
#define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004)
#define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000)
#define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008)
#define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020)
#define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030)
#define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000)
#define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000)
#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200)
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
ADC_HandleTypeDef hadc2;
ADC_HandleTypeDef hadc3;
DMA_HandleTypeDef hdma_adc2;
CRC_HandleTypeDef hcrc;
DMA2D_HandleTypeDef hdma2d;
I2C_HandleTypeDef hi2c1;
I2C_HandleTypeDef hi2c3;
LTDC_HandleTypeDef hltdc;
QSPI_HandleTypeDef hqspi;
RTC_HandleTypeDef hrtc;
TIM_HandleTypeDef htim1;
UART_HandleTypeDef huart1;
SDRAM_HandleTypeDef hsdram1;
osThreadId defaultTaskHandHandle;
osThreadId TaskTouchHandle;
osSemaphoreId binarySemAnalogHandle;
/* USER CODE BEGIN PV */
static FMC_SDRAM_CommandTypeDef Command;
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MPU_Config(void);
static void MX_GPIO_Init(void);
static void MX_DMA_Init(void);
static void MX_CRC_Init(void);
static void MX_QUADSPI_Init(void);
static void MX_DMA2D_Init(void);
static void MX_FMC_Init(void);
static void MX_LTDC_Init(void);
static void MX_I2C3_Init(void);
static void MX_ADC3_Init(void);
static void MX_RTC_Init(void);
static void MX_TIM1_Init(void);
static void MX_I2C1_Init(void);
static void MX_USART1_UART_Init(void);
static void MX_ADC2_Init(void);
void StartDefaultTask(void const * argument);
void StartTaskTouch(void const * argument);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MPU Configuration--------------------------------------------------------*/
MPU_Config();
/* Enable I-Cache---------------------------------------------------------*/
SCB_EnableICache();
/* Enable D-Cache---------------------------------------------------------*/
SCB_EnableDCache();
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_DMA_Init();
MX_CRC_Init();
MX_QUADSPI_Init();
MX_DMA2D_Init();
MX_FMC_Init();
MX_LTDC_Init();
MX_I2C3_Init();
MX_ADC3_Init();
MX_RTC_Init();
MX_TIM1_Init();
MX_I2C1_Init();
MX_USART1_UART_Init();
MX_ADC2_Init();
MX_TouchGFX_Init();
/* Call PreOsInit function */
MX_TouchGFX_PreOSInit();
/* USER CODE BEGIN 2 */
{
uint8_t *fb = (uint8_t *)0xC0000000;
uint32_t row, col;
// First clear entire screen to BLACK
for (row = 0; row < 600; row++)
{
for (col = 0; col < 1024; col++)
{
uint32_t pixel = (row * 1024 + col) * 3;
fb[pixel + 0] = 0x00;
fb[pixel + 1] = 0x00;
fb[pixel + 2] = 0x00;
}
}
// Then draw 3 color stripes
for (row = 0; row < 600; row++)
{
for (col = 0; col < 1024; col++)
{
uint32_t pixel = (row * 1024 + col) * 3;
if (row < 200)
{
fb[pixel + 0] = 0xFF; /* R */
fb[pixel + 1] = 0x00; /* G */
fb[pixel + 2] = 0x00; /* B */
}
else if (row < 400)
{
fb[pixel + 0] = 0x00; /* R */
fb[pixel + 1] = 0xFF; /* G */
fb[pixel + 2] = 0x00; /* B */
}
else
{
fb[pixel + 0] = 0x00; /* R */
fb[pixel + 1] = 0x00; /* G */
fb[pixel + 2] = 0xFF; /* B */
}
}
}
// Flush cache so LTDC sees the new data
SCB_CleanInvalidateDCache();
while(1) {} // ← FREEZE here to see colors
}
// RCC_PeriphCLKInitTypeDef LtdcClk;
// LtdcClk.PeriphClockSelection = RCC_PERIPHCLK_LTDC;
// LtdcClk.PLLSAI.PLLSAIN = 192;
// LtdcClk.PLLSAI.PLLSAIR = 4;
// LtdcClk.PLLSAIDivR = RCC_PLLSAIDIVR_2;
// HAL_RCCEx_PeriphCLKConfig(&LtdcClk);
// {
// uint8_t *fb = (uint8_t *)0xC0000000;
// uint32_t len = 1024UL * 600UL * 3UL;
// uint32_t i;
// for (i = 0; i < len; i += 3)
// {
// fb[i ] = 0xFF; /* R */
// fb[i + 1] = 0x00; /* G */
// fb[i + 2] = 0x00; /* B */
// }
// while (1) {}
// }
/* USER CODE END 2 */
/* USER CODE BEGIN RTOS_MUTEX */
/* add mutexes, ... */
/* USER CODE END RTOS_MUTEX */
/* Create the semaphores(s) */
/* definition and creation of binarySemAnalog */
osSemaphoreDef(binarySemAnalog);
binarySemAnalogHandle = osSemaphoreCreate(osSemaphore(binarySemAnalog), 1);
/* USER CODE BEGIN RTOS_SEMAPHORES */
/* add semaphores, ... */
/* USER CODE END RTOS_SEMAPHORES */
/* USER CODE BEGIN RTOS_TIMERS */
/* start timers, add new ones, ... */
/* USER CODE END RTOS_TIMERS */
/* USER CODE BEGIN RTOS_QUEUES */
/* add queues, ... */
/* USER CODE END RTOS_QUEUES */
/* Create the thread(s) */
/* definition and creation of defaultTaskHand */
osThreadDef(defaultTaskHand, StartDefaultTask, osPriorityNormal, 0, 4096);
defaultTaskHandHandle = osThreadCreate(osThread(defaultTaskHand), NULL);
/* definition and creation of TaskTouch */
osThreadDef(TaskTouch, StartTaskTouch, osPriorityIdle, 0, 128);
TaskTouchHandle = osThreadCreate(osThread(TaskTouch), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
/* USER CODE END RTOS_THREADS */
/* Start scheduler */
osKernelStart();
/* We should never get here as control is now taken by the scheduler */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
}
/* USER CODE END 3 */
}
However when we try to use touchgfx with the same setting even the built in widgets doesn't reproduce correctly and flickering is visible .
We are assuming display configuration is correctly done as just hard coded colour bars appears normal.
Kindly suggest what we can do further so that the IPS Pannel can work like normal TNP Pannels like above.
When displaying solid RGB colours, the display appears stable and no visible flickering is observed. However, when images or TouchGFX widgets are rendered, noticeable flickering becomes visible to the naked eye. The issue is especially noticeable during widget updates or image rendering on the display.
2026-05-29 2:41 AM
Hello @prasys ,
As suggested, please try to update your TouchGFX Designer version.
If you still see issues after, please share more info about your application. Details about your framebuffer color format, framebuffer strategy or widget nature (textureMapper/Image/svg ?) can be helpful.
2026-05-31 11:09 PM
Hello,
i have updated to the latest touchgfx version ,but the flickering issue is still present .
My setup details are:
1. MCU: STM32F746G
2. FrameColour Format : RGB888
3. Dispaly: 10 inch
4. Resolution: 1024*600
5.Touchgfx Version: 4.26.1
6. Widget Used: Image widgets (flickering is mainly visible on images/widgets)
I have attached a video below demonstraating the issue .
A flicker is visible mainly on image widgets .Could you please advise whether this could be related to display timings, LTDC configuration, framebuffer setting or image rendering performance?
Thank you.
2026-06-01 2:33 AM - edited 2026-06-01 2:39 AM
Hello,
Apart from what @Osman SOYKURT said, if you have display flickering ensure your application configured the MPU to prevent any speculative access. I see the call of MPU config in your code but don't know if you disable all the unused memory region access especially for the external memories.
Please refer to: Speculative access on Cortex®-M7 and Cortex®-M85 based STM32: A practical guide
and to the AN4861 "Introduction to LCD-TFT display controller (LTDC) for STM32 MCUs" / section 5.6 Special recommendations for Cortex M7 (STM32F7/H7) and Cortex M55 (STM32N6)
PS: the flickering is not visible in the video you've attached.
2026-06-01 2:35 AM
Hello @prasys ,
I believe you're using external flash for storing your assets are you? Have you tried caching the assets in RAM and check if you have better performance?
Do you use external RAM for storing your framebuffer? Do you use single/double/partial framebuffer strategy?
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.