Stop lvgl screen flickering while device is initializing - working on demanding tasks in background

Description

How to make lvgl to not do anything and simple just maintain a static screen because device is doing some heavy task in background that will not ensure that screen can be refreshed without flickering.

For example when we want to factory reset esp32 device we would format SPIFFS and store default config there. During that time lvgl screen should just say “initializing the device …”. Formatting SPIFFS is very demanding for esp32 and therefore lvgl screen often flickers.

What MCU/Processor/Board and compiler are you using?

esp32 S3

What LVGL version are you using?

8.9

What do you want to achieve?

Set lvgl to maintain a simple static that does not need click and do nothing until told otherwise

What have you tried so far?

Tried to simple create a init screen message label hoping that because no object is changed screen will not be refreshed and not flicker

Code to reproduce

Here is the code


setup() {
    // define container for screen boot
    screen_boot_container = lv_obj_create(lv_scr_act());
    lv_obj_set_size(screen_boot_container, lv_pct(100), lv_pct(100));
    lv_obj_align(screen_boot_container, LV_ALIGN_CENTER, 0, 0);
    lv_obj_set_style_bg_color(screen_boot_container, lv_color_black(), LV_PART_MAIN);
    lv_obj_set_style_border_width(screen_boot_container, 0, LV_PART_MAIN);
    lv_obj_set_style_radius(screen_boot_container, 0, LV_PART_MAIN);

    //boot message
    lv_obj_t * boot_label_style;
    lv_style_init(&boot_label_style);
    lv_style_set_text_font(&boot_label_style, &lv_font_montserrat_48);

    lv_obj_t * mb_bootLabel = lv_label_create(screen_boot_container);
    lv_obj_align(mb_bootLabel, LV_ALIGN_CENTER, 0, 0);
    lv_label_set_text(mb_bootLabel, "Initializing device ...");
    lv_obj_add_style(mb_bootLabel, &boot_label_style, _LV_STYLE_STATE_CMP_SAME);

    lv_theme_default_init(NULL, lv_palette_main(LV_PALETTE_GREEN), 
    lv_palette_main(LV_PALETTE_RED), LV_THEME_DEFAULT_DARK, LV_FONT_DEFAULT);
    SPIFFS.format();
}
void loop()
{
      lv_timer_handler(); /* let the GUI do its work */
}

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

This problem still exists. Does someone have a solution.

@Marktecwiz both question isnt about LVGL. All about screen stab is on display driver based, no lvgl, except animations. When your animations on screen flick , sometimes can help change some , but mostly is more effective dont animate on big mcu load in other jobs…