March 11, 2025

STM32F429 Discovery Kit - How to program the LCD

Look! Here is a blog post on this very topic: Page 6 of the schematic covers this device, and will surely be helpful as we get farther along.

Tips online

When you search on this, you find that the general advice (in the ST Micro forums) is:
Look at the demos in the STM32F4 "Cube" package.
look in: Projects\STM32F429I-Discovery\Applications\STemWin
I use "locate STM32F429I-Discovery" on my linux system and find:
/u1/Projects/STM32/ST/Cube/STM32CubeF4/Projects/STM32F429I-Discovery
Indeed, I have all of this -- dates show I downloaded it in November of 2020.

Also recommended are

AN4861: LCD-TFT display controller (LTDC) on STM32 MCUs
AN4323, section “How to use STemWin Library step by step
It is easy to find AN4861. It is a 77 page PDF that I download. It looks quite helpful.
On page 45, we read:
Some displays require to be configured using serial communication interfaces such as I2C or SPI. For instance, the STM32F429I-DISCO embeds the ILI9341 display module that is initialized through the SPI interface.

A dedicated driver for this display module (ili9341.c), including initialization and configuration commands, is available in the STM32Cube firmware package under:STM32Cube_FW_F4_Vx.xx.x\Drivers\BSP\Components\ili9341

An example of display initialization sequence based on the ili9341_Init() function is included in the STM32Cube examples for the STM32F429I-Discovery board under:
STM32Cube_FW_F4_Vx.xx.x\Projects\STM32F429IDiscovery\Examples\LTDC\LTDC_Display_2Layer

The following looks like a nice Cube tutorial, albeit for the F746 discovery

And perhaps most valuable of all:

STM32Cube_FW_F4_V1.21.0\Drivers\BSP\STM32F429I-Discovery\stm32f429i_discovery_lcd.c
STM32Cube_FW_F4_V1.21.0\Drivers\BSP\Components\ili9341\ili9341.c
STM32Cube_FW_F4_V1.21.0\Projects\STM32F429I-Discovery\Applications\Display\LTDC_Paint
I search for these on my system using locate, and find:
/u1/Projects/STM32/F429/Demo/STM32F429I-Discovery_FW_V1.0.3/Utilities/STM32F429I-Discovery/stm32f429i_discovery_lcd.c
/u1/Projects/STM32/ST/Cube/STM32CubeF4/Drivers/BSP/STM32F429I-Discovery/stm32f429i_discovery_lcd.c
/u1/Projects/STM32/F429/libs_stm32f429/00-STM32F429_LIBRARIES/tm_stm32f4_ili9341.c
/u1/Projects/STM32/ST/Cube/STM32CubeF4/Drivers/BSP/Components/ili9341/ili9341.c
/u1/Projects/STM32/ST/Cube/STM32CubeF4/Projects/STM32F429I-Discovery/Applications/Display/LTDC_Paint
I find lots of other drivers for the ili9341.c outside of STM32 directories, so whatever it is seems to be widely used.

So, what is the ILI9341?

I find and save a 245 page PDF entitled "TFT LCD Single Chip Driver 240RGBx320 Resolution and 262K color"

Displays with this description are widely available.

A huge amount of information is available.

A peek at the STemWin_HelloWorld application

These seems a likely place to start. In main.c we find:
/* Init the STemWin GUI Library */
  GUI_Init();
This looks grim -- I need to find out where the source for this library is hiding.

Base address

Rumor has it that the LCD is connected via the FSMC at address 0x6000_0000 (FSMC bank 1)

Take a look at this C source:


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org