lvgl / lvgl_esp32_drivers

Drivers for ESP32 to be used with LVGL
MIT License
305 stars 272 forks source link

ESP32-S3 support | ILI9488 is working perfectly | esp-idf v4 and v5 compatible #227

Open VitorAlho opened 10 months ago

VitorAlho commented 10 months ago

Fix ILI9488 init function Fix little ILI9488 display artifacts Auto-dma by default for all esp devices ESP32-S3 support added Updated to be compatible with esp-idf =< 4 and >= 5 versions

zbpan-sh commented 10 months ago

Tried your branch with my esp32s3 and ili9488 3.5inch display... but found the displaying color is not normal. Tried updating the gamma related driver init commands to the original ones, then the problem is fixed.

the init commands in your branch: {ILI9488_CMD_POSITIVE_GAMMA_CORRECTION, {0x0F, 0x1F, 0x1C, 0x0C, 0x0F, 0x08, 0x48, 0x98, 0x37, 0x0A, 0x13, 0x04, 0x11, 0x0D, 0x00}, 15}, {ILI9488_CMD_NEGATIVE_GAMMA_CORRECTION, {0x0F, 0x32, 0x2E, 0x0B, 0x0D, 0x05, 0x47, 0x75, 0x37, 0x06, 0x10, 0x03, 0x24, 0x20, 0x00}, 15},

the original commands: {ILI9488_CMD_POSITIVE_GAMMA_CORRECTION, {0x00, 0x03, 0x09, 0x08, 0x16, 0x0A, 0x3F, 0x78, 0x4C, 0x09, 0x0A, 0x08, 0x16, 0x1A, 0x0F}, 15}, {ILI9488_CMD_NEGATIVE_GAMMA_CORRECTION, {0x00, 0x16, 0x19, 0x03, 0x0F, 0x05, 0x32, 0x45, 0x46, 0x04, 0x0E, 0x0D, 0x35, 0x37, 0x0F}, 15},

VitorAlho commented 10 months ago

Tks for the feedback.

It's interesting, my ili9488 display with original gamma parameters can only display red, green and blue colors correctly. Colors like purple, pink and other ones is always in gray scale. I'll try to send a picture.

zbpan-sh commented 10 months ago

@VitorAlho , btw, this is what it looks like using your updated driver on my display. ili9488_esp32s3_idf502

VitorAlho commented 10 months ago

I`m thinking about use Kconfig to include 2 versions of gamma parameters and you choose one that fits your ili9488 display

zbpan-sh commented 10 months ago

Found a similar issue about 9488, https://github.com/prenticedavid/MCUFRIEND_kbv/issues/40 Maybe there are actually different kind of 9488 versions?

VitorAlho commented 10 months ago

This is how original parameters looks like in my ili9488 display image

Now with my branch parameters image

VitorAlho commented 10 months ago

Found a similar issue about 9488, prenticedavid/MCUFRIEND_kbv#40 Maybe there are actually different kind of 9488 versions?

The craziest thing is... How could we identify different versions?

zbpan-sh commented 10 months ago

Maybe I can do some test next week if you can share your sdkconfig. @VitorAlho

VitorAlho commented 10 months ago

Using squareline studio, I`ve created this screen test with different collors image

Using default gamma parameters image

Using my branch gamma parameters image

VitorAlho commented 10 months ago

I`m thinking about put it inside lvgl_tft/Kconfig if the selected display was ili9488 @zbpan-sh

zbpan-sh commented 10 months ago

I`m thinking about put it inside lvgl_tft/Kconfig if the selected display was ili9488 @zbpan-sh

I'm not sure if doing that way fits the design philosophy of the lvgl_esp32_drivers project...

VitorAlho commented 10 months ago

About sdk config, here it is. I need to rename with ".txt" because github needs. sdkconfig.txt

Thank you for your help

zbpan-sh commented 9 months ago

Hi, @VitorAlho, I have tried to use your lvgl configurations in your sdkconfig on my device, it ends up with the same behavior as tested before. Now I think it makes sense for add an option for the ili9488 driver to support two kinds of "gamma correction" settings, since I found there are already similar solutions for other tft drivers.

Btw. There is another pull request https://github.com/lvgl/lvgl_esp32_drivers/pull/223 from @hiruna, working on supporting IDF5 and LVGL8.3. Hope you guys can work together to merge your changes.