Esp-iot-solution ILI9488

When increasing resolution from 300x400 towards 320x480 (ILI9488) some objects are not being drawn. In esp-iot-solution ‘lvgl_example’ chart is being displayed without upper menu with white instead of black background.

ESP32DOWDQ6 (DEVKIT1) with ILI9488 display (ER-TFTM035-6 board)
esp-idf v3.2.2 GCC 5.2.0 Toolchain version: crosstool-ng-1.22.0-80-g6c4433a Linux x64
I am using LVGL v.5.3 because this environment cannot compile LVGL v.6.0

So far I have been trying to increase - decrease: buffer size, auto flash interval, dma size, nothing helped except when decreasing SPI clock to 1MHz or lower system draws everything in full resolution but it is unusable at that speed (same situation is with dma turned off).

I have rewritten ILI9341 drivers code: initialization to suit ILI9488 and added color conversion from 16 bit color to 18 bit color (RGB666) and everything works fine on lower resolutions.

Any help is highly appreciated.

You should try to solve that issue. 5.3 is almost a year old at this point and there are no new bugfixes.

Hi xsd
I have the same screen, please tell me, if you able to do something with Touch (capacitive) ?
Thank you

I made the Ili9488 work before. Checkout the code on GitHub. It is compiled on platformio.

https://github.com/mvturnho/ILI9488-lvgl-ESP32-WROVER-B

I hope this helps.

Sorry, I’ve got resistive touch panel and it works out of the box.

Thx, qris_best, I’ll check it out.

Thank you xsd
For reply

I know, I am working on it. Here is the other photo of what I have with smaller resolution (I couldn’t post it when I had opened this topic). Thx for reply.

RESOLVED. So I’ll share it for anyone who might need it.
Thanks to loboris who analyzed how much time is needed to clear this screen (link bellow)
https://www.esp32.com/viewtopic.php?t=1683&start=20
I have figured out that screen has not been written entirely while LVGL is refreshing it. So, at 40MHz SPI using DMA, screen print takes more than 160ms and LVGL Driver Auto Flush interval needs to be set accordingly longer than that, now it is 250ms, and everything works fine. Here is the photo.

I’m pretty sure that is not the correct way of doing it. What you should do is only call lv_disp_flush_ready once the DMA transaction completes. The current method is going to fall apart if for any reason the DMA transaction takes longer than 250 ms.

Thank you for your time.
It is being called right after entire transaction completes meaning multiple DMA buffers sent.
void ex_disp_flush(...) { lcd_obj->drawBitmap(...); lv_flush_ready(); }
On the other hand there is a line in lv_conf.h:
#define LV_REFR_PERIOD CONFIG_LVGL_DRIVER_AUTO_FLUSH_INTERVAL

The second counts obviously at the moment and it should not. Maybe to put a comment on it? Any advice?

Does drawBitmap only return once the DMA transaction completes, or is it asynchronous (meaning it returns beforehand)?

I have figured out that screen has not been written entirely while LVGL is refreshing it

I don’t think LV_REFR_PERIOD is the root cause of that. As you can see from this code sample your disp_flush function will not be called again until you call lv_flush_ready. So I think the problem here is that you are calling lv_flush_ready too soon.

Great that the issue is solved. Could you share your code through GitHub. I would love to see your driver code, mine is still a but laggy on the 480x320 resolution.

Hi again. Yes, it returns only once when entire DMA transaction completes.

I’ve put a comment on #define LV_REFR_PERIOD just to check how system works without it and everything works fine.

qris_best, just download esp-iot-solution and look inside components hmi and components spi-devices, I am using their drivers.

Ah oké, but then I have to figure out all over how to integrate with lvgl. Can you share the driver and flush code for lvgl on Ili9488 display?

By putting a comment, I assume you mean commenting out that line so it isn’t compiled.

That should trigger a compilation error, because then LV_REFR_PERIOD should be undefined. Can you put an #error statement in this lv_conf.h and see if it gets triggered?

It triggers.

It’s already integrated.

I am sorry, but I see no Ili9488, only drivers for the ili9341. So from the lvgl flush code you have to convert the rgb565 into rgb666 . How did you do that.
Also ili9488 unit is slightly different from ili9341.