Esp-iot-solution ILI9488

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.

I had working example and when I tried to move form LVGL 5.3 to version 6.0 I messed everything up. I will try to make your code run on my machine and I will get back to you. I did take a look on it and I saw that you have proper initialization, conversion form 32 bit color and spi byte-by-byte with no DMA. It is faster to use 16 bit color and convert it to RGB666 and then send it using DMA. All that is in the links I have provided to you.
I am not on Github, maybe admin could allow me to post some code here?

You can post code by surrounding it with backticks on the preceding and succeeding line. (```c and ```).

Sorry, I meant files. (c, cpp and h only)

Ik would really appreciate this.
Thanks.

Can you upload a ZIP file to Google Drive/Dropbox/something like that and share the link?

@xsd Regardless of the actual issue, did you use tabview in the upper button bar? It’s nice. Can you share a piece of code for that part? Will you let us use it?

Link: Esp-iot-solution ILI9488

image

You were right. I have the same situation now regardless the refreshing time.

Is there a way to simulate touchpad press event from a task or to force LVGL (5.3) to redraw entire screen?

This sounds like an XY problem. Are you trying to fix the issue where LittlevGL starts refreshing the screen again before you finish sending it to the display?

No, it is not XY and I am not fixing that issue. Here is what happens. The first screen is being drawn without tabs and it is missing some background. When I touch a point where a tab is supposed to be to switch to another view everything comes up and it is working after that. That is why I would like to force redraw or simulate touch event. I have tried switching tabs in a loop at the very beginning but it did not help. So, I am trying to find solution for pure LVGL issue, it is not a driver, etc…

Thank you very much

That usually means that it is an issue with your display driver.

That would not be a solution to the problem. It would just work around it.

What it sounds like to me is that for some reason your driver is not writing the buffer correctly to the screen for some reason.

I think this is an issue with your driver, because I don’t think I will be able to reproduce this on the simulator or another board. On the other hand, you mentioned you are using LittlevGL 5.3, so it is also quite possible that there is a bug somewhere in it. It might be worthwhile trying 6.0 to see if it works.

Confirmed, it is DMA. Without it the very first draw is ok. I am searching for the solution in esp-idf docs:
“Use the MALLOC_CAP_DMA flag to allocate memory which is suitable for use with hardware DMA engines (for example SPI and I2S). This capability flag excludes any external PSRAM.”
" In IDF, malloc(p) is equivalent to heap_caps_malloc(p, MALLOC_CAP_8BIT) ."

I have tried custom memory allocation in lv_conf but it did not help.

Here is the driver and example for ILI9488 display and LVGL 6.0 (ESP-IDF v.4.1).

I have put it on GitHub, did you try it?

Hi @xsd
I actually did try it, but since you use esp-sdk and I use platformio I copied your driver and flush code in my current project.
At first I got a scrambled screen. Then after tweaking my lvgl config I had some recognizable display only times 3 and of the wrong colors.
Your flush code is little bigger then the one I currently use, how does it perform for you? You have smooth animations?
I also work on a mqtt control panel so time is limited. When you have good performance on the driver I will put some more effort in this to get it working in my current project.

Greetings.

It works like a charm :slight_smile: