cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F469 LTDC Display Shows RGBW Color Cycling Instead of TouchGFX UI - Custom Board

MilanPanchal
Visitor

 

Hardware Configuration

  • MCU: STM32F469NIH6
  • Custom Board: Pin-to-pin replica of STM32F469I-DISCO
  • Display: HF-35040-X365-A0 (3.5-inch, 800x480 RGB parallel interface)
  • SDRAM: IS42S32400J/F (16MB, 0xC0000000)
  • Interface: LTDC (NOT DSI - DSI explicitly disabled)
  • Framework: TouchGFX 4.26.0

Working Reference

The same display works perfectly on STM32F429 with the same LTDC configuration, so the display hardware is confirmed functional.

Problem Description

The display continuously shows RGBW color cycling (white → red → green → blue, repeating every ~1 second) instead of rendering the TouchGFX UI.

Critical observation: Changing LTDC configuration parameters (e.g., framebuffer width from 800 to 400 pixels) has NO EFFECT on the display output - the same RGBW pattern continues unchanged.

Current LTDC Configuration

 

// Clock Configuration
System Clock: 180 MHz (changed from overdrive to voltage scale 3)
PLLSAI: N=192, R=5
LTDC Clock: ~25 MHz
 
// LTDC Timing (for 800x480 @ 60Hz)
hltdc.Init.HorizontalSync = 9;
hltdc.Init.VerticalSync = 2;
hltdc.Init.AccumulatedHBP = 5;
hltdc.Init.AccumulatedVBP = 15;
hltdc.Init.AccumulatedActiveW = 805; // Was 405 during test
hltdc.Init.AccumulatedActiveH = 495;
hltdc.Init.TotalWidth = 818; // Was 418 during test
hltdc.Init.TotalHeigh = 508;
 
// Polarities
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AH;
hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
 
// Layer 0 Configuration
pLayerCfg.WindowX0 = 0;
pLayerCfg.WindowX1 = 800;
pLayerCfg.WindowY0 = 0;
pLayerCfg.WindowY1 = 480;
pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565;
pLayerCfg.FBStartAdress = 0xC0000000; // SDRAM framebuffer
pLayerCfg.ImageWidth = 800;
pLayerCfg.ImageHeight = 480;
 
// VSYNC Configuration
HAL_LTDC_ProgramLineEvent(&hltdc, 479);

 

 

SDRAM Configuration

 

// IS42S32400J/F - 16MB SDRAM
Bank: FMC_SDRAM_BANK1
Column Bits: 8
Row Bits: 12
Data Width: 32-bit
CAS Latency: 3
Clock Period: 2
Read Burst: Enabled
Read Pipe Delay: 1
Refresh Rate: 1386 (for 90MHz)
 
// Initialization: Using BSP_SDRAM_Init()
// SDRAM verified working - can read/write successfully
 

TouchGFX Configuration

  • Framebuffer: TouchGFX_Framebuffer section in SDRAM (linker script configured)
  • Images: Some in IntFlashSection (internal flash), some in ExtFlashSection (QSPI)
  • Startup screen uses image_bg from IntFlashSection
  • VSYNC callback implemented in 
     
    TouchGFXHAL.cpp

Troubleshooting Steps Attempted

  1. SDRAM Verification

    • SDRAM reads/writes work correctly
    • Can fill framebuffer with test patterns
    • Framebuffer at 0xC0000000 accessible
  2. LTDC Test (writing directly to framebuffer)

    • Attempted to fill framebuffer with solid colors (red, green, blue)
    • Display output unchanged - still shows RGBW cycling
    • This suggests LTDC is NOT controlling the display
  3. Configuration Changes

    • Changed LTDC width from 800 to 400 pixels
    • Display output unchanged - confirms LTDC not active
    • Adjusted timing parameters - no effect
  4. DSI Disabled

    __HAL_RCC_DSI_CLK_DISABLE();
    __HAL_RCC_DSI_FORCE_RESET();
    __HAL_RCC_DSI_RELEASE_RESET();
  5. Linker Script

    • IntFlashSection defined for internal flash images
    • TouchGFX_Framebuffer section in SDRAM
    • All TouchGFX sections properly configured
0 REPLIES 0