cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429I-Disc1 LCD BSP Issue

jake11212
Associate

Hello, I'm working on a project on the STM32F429I-Disc1 development board and wanted to use the BSP to write characters to the LCD screen. I used STM32CubeMX to configure with LTDC enabled with the default parameters. Since there wasn't BSP configuration I added the files manually for the LCD BSP which were:

 

src:

 

  • font12.c
  • font16.c
  • font20.c
  • font24.c
  • font8.c
  • ili9341.c
  • stm32f429i_discovery_lcd.c
  • stm32f429i_discovery_sdram.c
  • stm32f429i_discovery.c

inc:

 

  • fonts.h
  • ili9341.h
  • lcd.h
  • stm32f429i_discovery_lcd.h
  • stm32f429i_discovery_sdram.h
  • stm32f429i_discovery.h

I updated the BSP init function to match the LTDC settings for the board:

LtdcHandler.Init.AccumulatedActiveW = 269;

LtdcHandler.Init.AccumulatedActiveH = 323;

LtdcHandler.Init.TotalWidth = 279;

LtdcHandler.Init.TotalHeigh = 327;

 

 

When I run the BSP_LCD_Init function it returns status OK, but after running this line:

LcdDrv = &ili9341_drv; and eventually these three lines in ili9341_Init(void)

ili9341_WriteReg(LCD_SLEEP_OUT);

LCD_Delay(200);

ili9341_WriteReg(LCD_DISPLAY_ON);

/* GRAM start writing */

ili9341_WriteReg(LCD_GRAM);

The screen does this (see attached photo) where it flickers and has this black box on the right side.

I didn't want to change the driver files for the ili9341 so I am assuming something is wrong with my configuration but I wasn't sure how to further troubleshoot this. Does anyone have advice or see any issues of what may be happening?

 

Thanks!

IMG_0225.jpg

 

 

5 REPLIES 5
KDJEM.1
ST Employee

Hello @jake11212 and welcome to the community ,

 

May BSP example can help you to check your configuration.

This example shows how to use the different LCD features to display string with different fonts, to display different shapes and to draw a bitmap.

Note that the default example configuration has been running on STMicroelectronics STM32F429I-Discovery RevC board, and in order to run it on STMicroelectronics STM32F429I-Discovery RevD or RevE boards, please ensure
to add "USE_STM32F429I_DISCOVERY_REVD" define in the toolchain's pre-processor options.

I hope this help you.

Thank you.

Kaouthar

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.

Hi Kaouthar, thanks for the help and for the warm welcome!

 

I have RevE as my board version and set that in my preprocessor options (USE_STM32F429I_DISCOVERY_REVE). I followed the steps as in your example and still get no errors but the screen is not displaying properly, and the behavior is still taking place after the BSP_LCD_Init call mentioned in the original post. I'll take a deeper look this weekend, please let me know if you see any other issues with my setup!

KDJEM.1
ST Employee

Hello @jake11212 ,

 

I tested the BSP and the LTDC_Display_2Layers examples with STM32F429I_DISC1 REV-E01 and I'm able to run these examples without issue as shown in the below figure:

KDJEM1_0-1724074847762.png

KDJEM1_1-1724074892107.png

May be your LCD is damaged.

Do you get "Error_Handler();" in HAL_LTDC_Init?  

 

Thank you.

Kaouthar

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.

There's a binary in the 'F429 Disco's web folder, in Tools&Software tab, at Compiled demos.

Try that; it will tell you whether the board is physically OK. If yes, the problem is in your software (or the way how you are configuring and compiling it).

I have also a demo on my webpages, which does not use the parallel LCD bus (uses SPI instead) and does not use the SDRAM, so you can use also that to see whether the problem is in those two areas.

The difference between rev.A-C and D-E of this Disco is, that the touch sensor has swapped one axis, so that's not related to the LCD as such.

JW

Matt5
Associate

Hi Jake, 

Picture5.png

I've just had exactly the same issue. I believe the issue is a change in the default clock settings produced by STM32CubeIDE. Try with the above and it should sort it out.