I try to port my project (GitHub - 0xPIT/ESPGrind at cyd-2432S024C) to the IL9341 of a capacitive CYD (2432S024C). My UI is 99% made in Squareline, I use esp-idf, including their display driver.
While everything seems to render and work mostly normally, I get randomly flickering vertical lines, but only on some of the screens and only on a part of the screen – see screenshot.
Please note that this code works fine on a waveshare display and on the ESP-BOX.
The main screen works normally, but has some single lines flickering while I increment/decrement a spinbox via a timer.
I’ve tried different SPI speeds, but that does not change anything.
Can anyone help me to get a clean display?
The BSP code is here.
Hi, Since you mentioned it works fine on other displays, it’s likely either a hardware issue with this specific display module or a compatibility issue with its timing requirements.
esp_lcd_panel_init(*ret_panel);
// Add these commands after init:
esp_lcd_panel_invert_color(*ret_panel, false);
esp_lcd_panel_swap_xy(*ret_panel, true);
The flickering might be related to timing issues between the ESP32 and the ILI9341. I’d recommend trying these changes one at a time to identify which solves the issue.
Thanks for your reply.
None of your suggestions did any change.
I’ve managed to fix it by using this custom init code instead of what’s in the driver from esp-idf.
FYI, custom init code can be passed using .vendor_config of esp_lcd_panel_dev_config_t, prior calling esp_lcd_new_panel_<panel>() – at least for the ili9341 driver.