Advance display flickers/corrupted on refresh

Hello, I've been using your esp32-s3 7" display for a while without problem.
I've just upgraded to to new advance version but am hitting problems.
Specifically the screen is messed up every time it refreshes (but then settles to the correct display view).
If I re-flash your factory test binaries, they work without problem, but building your factory test code (once I've fixed the compilation errors due to missing forward function declarations) doesn't work, and has the same refresh problem.
After a lot of trial and error I've managed to find a working configuration, largely by reverting a lot of the code to match what the older (non advance) screen does.

1) Revert the buffers used to be DRAM, not PSRAM as below

    // THIS DOES NOT WORK
    // size_t buffer_size = sizeof(lv_color_t) * LCD_H_RES * LCD_V_RES;
    // buf = (lv_color_t *)heap_caps_malloc(buffer_size, MALLOC_CAP_SPIRAM);
    // buf1 = (lv_color_t *)heap_caps_malloc(buffer_size, MALLOC_CAP_SPIRAM);
    // lv_disp_draw_buf_init(&draw_buf, buf, buf1, LCD_H_RES * LCD_V_RES);

    //THIS DOES
    static lv_color_t disp_draw_buf[800 * 480 / 10];
    lv_disp_draw_buf_init(&draw_buf, disp_draw_buf, NULL, LCD_H_RES * LCD_V_RES / 10);

2) Reduce the write frequency

cfg.freq_write = 15500000; //21000000 doen't work

I use platformIO (3.3.4)

I've used the board/build settings (updating to the correct memory sizes) as below.

board = ESP32-S3-WROOM-1-N16R8 
board_build.arduino.memory_type = qio_opi
board_build.flash_mode = qio
board_build.psram_type = opi
board_upload.flash_size = 16MB
board_upload.maximum_size = 16777216
board_build.partitions = default_16MB.csv
build_flags = 
    -DBOARD_HAS_PSRAM    
    -mfix-esp32-psram-cache-issue
    -DCONFIG_SPIRAM_SUPPORT=1
    -DCONFIG_SPIRAM_TYPE=1
    -DPSRAM_SIZE=8
    -DPSRAM_CLK=120000000    

I've tried various combinations of the above, with and without optimization, no luck.

Please can you provide a definitive config in terms of the board/build config that actually works.
In addition, please review the buffer code in 1) above and confirm this is correct for PSRAM (sizes are very different due to the /10 between the versions).

Obviously your binaries work, so something is missing regarding how to regenerate them.

thanks!

Comments

  • Dear phil_seggl,
    I hope this message finds you well. Thank you for reaching out .

    Our technical support team is currently looking into the issue in your message. Please be patient, and we will get back to you as soon as possible.

    Thanks! Have a nice day!

  • Dear phil_seggl,
    I hope this message finds you well.

    1 Are you using the basic esp32-s3 7" display (https://www.elecrow.com/esp32-display-7-inch-hmi-display-rgb-tft-lcd-touch-screen-support-lvgl.html) or the advance esp32-s3 7" display (https://www.elecrow.com/crowpanel-advance-7-0-hmi-esp32-ai-display-800x480-artificial-intelligent-ips-touch-screen-support-meshtastic-and-arduino-lvgl-micropython.html)?

    2 What did you mean by ” upgrade“ in your sentence ("I've just upgraded to to new advance version but am hitting problems.")? Does it mean that you bought a new Advance ESP32-S3 7" display product?

    3 Did you modify the program that was previously suitable for Basic ESP32-S3 7" display and use it on the Advance ESP32-S3 7" display product?

    Best regards,

  • Hi, please see answers below.
    1) I am now using the advance display, previous versions of my project used the basic one.
    2) Yes, I'm changing the display from basic to advance
    3) Yes I did using your example code. However when that didn't work I tried your examples on github, which also don't work (except your binaries which do).

    Some more updates

    The PSRAM frequency should be 80MHz, 120MHz is experimental, and doesn't work for me.
    Also the cache fix flag doesn't apply to the S3, so I removed from the build config.
    Updated build flags are now:
    -DBOARD_HAS_PSRAM
    -DPSRAM_SIZE=8
    -DPSRAM_CLK=80000000

    This change enables me to use PSRAM (sort of). I have 3 advance screens, flashing all 3 with the same binaries gives slightly different results. One display seems pretty solid, almost no issues with flicker/updates. The second has a minor flicker when refreshing, but
    much better than before. The third is similar but has some white interference on the left of the screen all the time. Clearly the settings are still somewhat on the edge of tolerance so I get varying results.

    FWIW the buffer setup is now

        size_t buffer_size = sizeof(lv_color_t) * LCD_H_RES * LCD_V_RES;
        buf = (lv_color_t *)heap_caps_malloc(buffer_size, MALLOC_CAP_SPIRAM);
        buf1 = (lv_color_t *)heap_caps_malloc(buffer_size, MALLOC_CAP_SPIRAM);
        lv_disp_draw_buf_init(&draw_buf, buf, buf1, LCD_H_RES * LCD_V_RES);
    

    But I still have the LGFX write frequency set to a lower value, and it seems changing up or down from there just makes it worse
    cfg.freq_write = 15500000

    I will experiment a bit more when I have time, however it's worth noting that the only reliably solid config is the one from my original post, not using PSRAM with a lower write frequency.

  • Dear phil_seggl,
    I hope this message finds you well. Thank you for the update.

    Our technical support team is currently looking into the issue in your message. Please be patient, and we will get back to you as soon as possible.

    Thanks! Have a nice day!

  • Dear phil_seggl,
    Sorry for the late reply
    1. What hardware version do you use? Please take a picture of the back of the device and show it to us. The hardware version is Vx.x on the back of the device, such as V1.0. Then please use our corresponding code according to the hardware version number. Our code is as follows:
    https://drive.google.com/drive/folders/1Qw7hdW862upBigarI11btgl4cQkr0vpe?usp=sharing

    1. Generally, we do not recommend modifying the code of basic products to use with advance products. It is recommended that you directly use the code of the advance product we provide to modify and implement the functions you want to achieve.

    2. Please refer to our corresponding tutorial:
      https://www.elecrow.com/pub/wiki/ESP32_Display-7.0_inch(Advance_Series)wiki.html#platforms-supported

    Best regards

Sign In or Register to comment.