lv_port_esp32 icon indicating copy to clipboard operation
lv_port_esp32 copied to clipboard

White screen ST7789V

Open EtienneMdv opened this issue 2 years ago • 10 comments

Hi all,

I am trying to configure LVGL for my ESP32 custom board with a ST7789V TFT LCD driver. Unfortunately, I haven't been very successful so far... The backlight seems to work as the only thing I get is a white screen. I checked the GPIOs for the SPI numerous times and they are correct.

I don't know where to start to troubleshoot my issue. Do you have any idea?

I appreciate your help.

EtienneMdv avatar May 09 '22 18:05 EtienneMdv

By the way, I was successful using ESP32_TFT_library prior to trying using LVGL.

EtienneMdv avatar May 09 '22 18:05 EtienneMdv

If your backlight is turning on, then I'd recommend checking that the LVGL initialization is completing properly

tvanfossen avatar May 09 '22 18:05 tvanfossen

Thank you @tvanfossen.

Is there an efficient way to check that? I have turned the logs to trace but I don't see anything alarming.

EtienneMdv avatar May 09 '22 18:05 EtienneMdv

menuconfig -> LVGL config -> feature config -> logging -> enable log module Set default log verbosity to Log Important Events Log with printf

Is your code entering the main app_main loop? Can you see logs in a main loop? Are you running lv_task_handler consistently? How much memory are you providing for lvgls memory buffer?

tvanfossen avatar May 09 '22 19:05 tvanfossen

I set the log according to your guidance. My code is not entering the main app_main loop... (I am attempting to run the demo app). My code is actually stuck calling lvgl_driver_init(). I am providing the default size for LVGLs memory buffer, 12800 bytes. The last log I get on my terminal is related to changing the display orientation to LANDSCAPE.

EtienneMdv avatar May 09 '22 19:05 EtienneMdv

Oops, my bad. I do enter the app_main loop. All the objects are created and lv_task_handler is running consistently. However, I still do not have anything displayed.

EtienneMdv avatar May 09 '22 20:05 EtienneMdv

Highly recommend using the bug format provided when you create issues, very difficult to determine where your code is failing from the information you've provided so far. Screenshots, verification with the LVGL simulator, etc anything more informative to your actual issue.

Running the unmodified demo code and still encountering an issue implies that either the IO setup is incorrect or your hardware is not configured properly, at least from the information provided so far.

tvanfossen avatar May 09 '22 20:05 tvanfossen

Sorry about that... I am using ESP-IDF v5 and a custom board with a ESP-WROOM-32D. I am also thinking about an error in my IO setup since I am running the unmodified code. I changed the SPI mode from 2 to 0 and now I have something displayed. It is not really working but it is a start. I attached a pic (note that the orientation is wrong). Bug1

EtienneMdv avatar May 09 '22 20:05 EtienneMdv

IDF v5 may not be supported with LVGL yet, I'd recommend rolling back to ~4.2 as recommended by the lv_port_esp32 readme

That said, probably not the issue here. It looks to me as if your color depth is set incorrectly for your display driver

tvanfossen avatar May 10 '22 12:05 tvanfossen

This issue or pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 20 '23 03:04 stale[bot]