2024-08-14 12:32 PM - edited 2024-08-14 12:39 PM
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:
inc:
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!
2024-08-15 01:18 AM
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.
2024-08-16 04:43 PM - edited 2024-08-16 04:45 PM
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!
2024-08-19 06:55 AM
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:
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.
2024-08-20 01:09 AM
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
2024-08-26 10:29 AM
Hi Jake,
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.