cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring LTDC for built-in LCD display in STM32F29i-disc1

Xxoyo.1
Associate III

Hi I am trying to configure the LTDC to control the built-in LCD display on STM32F29i- disc1.

I have read through tutorials on how to achieve this, and following the project example in STM32CubeF4 firmware STM32CubeF4\Projects\STM32F429I-Discovery\Examples\LTDC\LTDC_Display_2Layers , I was able to use cube MX to setup the LTDC and display the STLogo.

However, I am still not sure how are the LTDC parameters HSW HSP HFP VSH VBP VFP values calculated. From the datasheet https://datasheetspdf.com/pdf-file/947545/SaefTechnology/SF-TC240T-9370A-T/1 0693W0000059P5dQAE.pngThere are no information that talk about the the parameters I need to set up LTDC properly. Could anyone guide me how to extract those numbers from the datasheet?

Next, i would like to know because i'm using LTDC , do i still need ili9341 display driver from STM32CubeF4\Drivers\BSP\Components\ili9341? From what I can tell, there is a ili9341_Init(void) function that will do the IO setup as well, which would mean my setup for SPI5 in CubeMx is redundant ? The only reason to use ili9341 is for the register command that have been written by someone already, I only need to configure my LCD via SPI5 and use LTDC transfer the data in frame buffer via SPI5 as well?

Lastly, I want to reduce the load on MCU by leveraging DMA2D. LTDC doesnt have a memory for itself, and it need to rely on external flash memory SDRAM nonvolatile if there is not enough memory space on the MCU chip. In this case what would the role of DMA2D be?

Sorry i am still a bit lost when going through the example projects, i am trying to rely more on the cubemx to generate the init codes for me and start from there to control the LCD touch panel.

Any help is greatly appreciated , thank you very much

1 REPLY 1
Amel NASRI
ST Employee

Hi @Xxoyo.1​ ,

> how are the LTDC parameters HSW HSP HFP VSH VBP VFP values calculated

These parameters are configured based on the LTDC timing registers. You find an explanation in AN4861 (LCD-TFT display controller (LTDC) on STM32 MCUs).

What is good with this application note:

  • it talks about ILI9341, the one embedded in STM32F429I-DISCO, to explain the display panel configuration
  • it provides a step by step example on how to create a basic graphical application using STM32CubeMX (based on STM32F746G-DISCO board, but you should be able to follow the steps for STM32F429I-DISCO.

-Amel

PS: If this answers your initial request, please select my reply as Best Answer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.