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
System Clock: 180 MHz (changed from overdrive to voltage scale 3)
// 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;
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AH;
hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
pLayerCfg.WindowX1 = 800;
pLayerCfg.WindowY1 = 480;
pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565;
pLayerCfg.FBStartAdress = 0xC0000000; // SDRAM framebuffer
pLayerCfg.ImageWidth = 800;
pLayerCfg.ImageHeight = 480;
HAL_LTDC_ProgramLineEvent(&hltdc, 479);
SDRAM Configuration
// IS42S32400J/F - 16MB SDRAM
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
SDRAM Verification
- SDRAM reads/writes work correctly
- Can fill framebuffer with test patterns
- Framebuffer at 0xC0000000 accessible
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
Configuration Changes
- Changed LTDC width from 800 to 400 pixels
- Display output unchanged - confirms LTDC not active
- Adjusted timing parameters - no effect
DSI Disabled
__HAL_RCC_DSI_CLK_DISABLE();
__HAL_RCC_DSI_FORCE_RESET();
__HAL_RCC_DSI_RELEASE_RESET();
Linker Script
- IntFlashSection defined for internal flash images
- TouchGFX_Framebuffer section in SDRAM
- All TouchGFX sections properly configured