Author Topic: STM32F407G, ILI9341, LVGL - white screen, can't display anything  (Read 476 times)

0 Members and 1 Guest are viewing this topic.

Offline FilipCichowskiTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
    • My personal website
I followed this tutorial: https://controllerstech.com/lvgl-on-stm32-part-1/
I double check my connections.
I use Discovery board with STM32F407G.
My display module is popular 2,8" display with ILI9341
controller.
The only change I introduced comparing to tutorial is reducing buffer size in line 52 of lv_conf.h to 16 bytes, because it didn't fit my RAM.
I copied 1:1 LCDController.h from file attached to tutorial (just scroll to the bottom to download it).
I added lv_timer_handler in main loop.
I added systic handler in stm32l4xx_it.c

But I get white screen as a result. What else should I check?
Any help will be appreciated!
 

Offline eugene

  • Frequent Contributor
  • **
  • Posts: 538
  • Country: us
Re: STM32F407G, ILI9341, LVGL - white screen, can't display anything
« Reply #1 on: April 12, 2025, 02:04:09 pm »
A common reason for this is that the SPI mode is not set correctly. There are four possible combinations of polarity and phase resulting in four modes to choose from. Typically it's set during an init() function, but I don't know how it's handled in Cube. Figure that out and try all four modes to see if one of them works.
90% of quoted statistics are fictional
 

Offline FilipCichowskiTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
    • My personal website
Re: STM32F407G, ILI9341, LVGL - white screen, can't display anything
« Reply #2 on: April 12, 2025, 03:02:53 pm »
I tried all 4 modes. I changed Clock Polarity and Clock Phase. I tried lowering baud rate, but it's no use.
 

Offline globoy

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: STM32F407G, ILI9341, LVGL - white screen, can't display anything
« Reply #3 on: April 12, 2025, 03:32:28 pm »
Have you looked at your SPI bus with an oscilloscope and make sure you're actually sending data to the display controller?  I know in my past I've done things like get the wrong pin for CSn or D/C, etc.

Can you share a picture of the screen?  A pure white screen indicates to me that you haven't successfully sent any initialization commands to the display (so not even at the point where the LVGL buffer size matters).  An initialized (but not cleared) ILI9341 display will be all random pixel values.
 

Offline FilipCichowskiTopic starter

  • Newbie
  • Posts: 7
  • Country: pl
    • My personal website
Re: STM32F407G, ILI9341, LVGL - white screen, can't display anything
« Reply #4 on: April 12, 2025, 03:59:07 pm »
Problem solved.
It was skill issue  ;D
I accidentally connected RESET wire to PH1 instead of PC13.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf