Hi guys,
first of all, thank you very much kisvegabor/Amirgon and contributors for this awesome graphics library and the micropython bindings.
I try to use the release/v8 on ESP32-wSPIRAM with an ili9488 display, but I face some problems and I am stuck at this point. Maybe someone can enlighten me, on what I am doing wrong.
The Problem:
To build the firmware and deploy it on an ESP32 board is no problem (with the LV_CFLAGS="-DLV_COLOR_DEPTH=32"). But when I run a very simple example I don’t see the expected behavior on the display. I see a region that is gray, the lvgl active area. But most of the display doesn’t seem to be used. When I try to put a button then something happens (the orange stuff on the top appears, see the picture).
The code:
import lvgl as lv
lv.init()
from ili9XXX import ili9488
disp = ili9488(mhz = 5, factor=16)
btn1 = lv.btn(lv.scr_act())
What I did already to try to solve the problem:
- I checked the forum and other examples.
- I checked the display by a not lvgl driver. This works fine.
- I checked the initialization, but this seems fine to me. Also, changes inspired by some other initialization routines don’t change this behavior. I also used the lvgl driver init and set than pixels by my own code, which was working fine and I had access to the whole display.
- I compiled the firmware with different versions of espidf (4.0.2, 4.2, 4.4), didn’t help. I compiled lv_micropython master and release/v8, didn’t help. Older versions I didn’t manage to compile because of different error messages.
- I tried to play around with the arguments of ili9488(), didn’t help. I tried to increase, reduce the resolution, the factor, and so on, didn’t help. Invert = True inverted the whole display (not just the “active” part).
- I checked what is going on on the SPI lines with a logic analyzer. Everything seems to be fine. In particular, I checked what happens when I try to make a button on the display. There appear the 0x2A, 0x2B, 0x2C commands + data which should be fine. I am just a bit surprised, that the start column/row is zero and doesn’t go to high values (the values are 0x28 and 0x1C) when I try to place a button in the middle. The data after the ox2C seemed to be in the region of 17.000 Bytes, which is about half of what I would expect for a full display write (buf_size = 320 * 480 * 4 // 16).
→ This brought me to the suspicion that something with the frame buffer and/or the DMA transfer doesn’t work properly.
Maybe I am just stupid and there is a simple reason for this? Did anyone of you encounter this problem already? I have the feeling I overlook something stupid. Is this a problem with the color code? Thanks for helping me.