How to clear the screen after st7789 is initialized successfully? (lvgl8.1)

Run lvgl8.1 with esp32s3+st7789.
After the st7789 is successfully initialized, it will be in a Huaping state, and the lvgl graphics will be displayed normally after a while.
I want to clear the screen of st7789 to white or black in the stage of st7789, but I don’t know how to achieve it. I hope someone who understands can help me.
I also want to turn off the backlight when the display driver is initialized, and then turn on the backlight when I start running the lvgl graphics, whether it can solve the stage of st7789.

void init_main_style(void)
static lv_style_t style_screen;
lv_style_set_bg_color(&style_screen, LV_COLOR_WHITE);
lv_obj_add_style(lv_scr_act(), &style_screen,_LV_STYLE_STATE_CMP_SAME);

if nothing happends u can call manually
and then proceed to load other code.

This still doesn’t solve my problem, I need to brush the st7789 to a white or black screen before the color data is sent to the buffer. But I’m avoiding it now by controlling the backlight.

st7789v command (display on) is 0x29, it is the last command usually.

send whole screen data with black or white before this command

alright, thank you very much.
So before this command, can I customize the interface to send the whole screen data.

example: panel is 320x240 solution, 8bit-4line interface, 65K
if you want to clear whole black,
first command 0x2a (width), 0x2b(height), 0x2c(memory access),
then send data 0x00 with 320x240x2 bytes
last command 0x29, display on.

1 Like

Received, thanks man.