Esp-iot-solution ILI9488

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.

https://www.buydisplay.com/default/lcd-3-5-inch-320x480-tft-display-module-optl-touch-screen-w-breakout-board

there’s init and conversion in the code provided by manufacturer, good luck

That’s a whole lot of documents there to look through.
It seems real hard to find the correct littlevgl drivers for this ili9488 chip. I made a start, and got things working, and then shared my code through github. I think it needs improvement and It would be nice if we could help each other out and make a ready to go setup for the ili9488 and littlevgl. Then others can go from there and not have to do this all over again.

So I make a final explicit request here;
Did anyone integrate the ili9488 with littlevgl over SPI and is willing to share their code?

I know nothing about any of the ILI chips, but this person made LittlevGL work on an ILI9488.

ILI9341 . . . is practically the same except for the initialization sequence.

So perhaps patching the existing ILI9341 driver to also support ILI9488 is a better way of doing it. That way it all stays in the same spot.

We don’t have prewritten drivers for a lot of display chips. Most of what we have now has come from other people contributing. However, another approach is to take an existing driver and adapt it to work with the LittlevGL driver API (which is pretty generic). Just throwing around some suggestions.