Problem with ESP32s3 and 480x272 RGB display (module 4827S043)

After spending hours in front of the computer, I managed to compile and display the demo project “Futuristic_Ebike” on my 480x272 display. To do this, I used the LVGL and LovyanGFX libraries; I unsuccessfully tried the Arduino_GFX_Library but my display doesn’t seem to work well with it.

I should mention that I compiled the sketch using LVGL 8.3.0dev library. These are the problems I have encountered:

  • when starting the program, the bottom part of the display is not drawn, but touching the screen near the sliders completes the screen rendering. Modifying any text with an event does not change it. This does not happen (so everything works fine) when I set LV_USE_PERF_MONITOR 1 to display CPU usage and FPS count. It seems that screen refresh is missing during the static phase!
  • Pressing the BTN BG2 button, switching to the battery group, LV_USE_PERF_MONITOR 0, the wave and particulate animations work correctly, and modifying the text with events works fine.

I can’t figure out what I need to modify to make the demo work and start a new layout. Please help me! Thank you.

  • SquareLine Studio 1.2.1
  • ESP32s3

It seems like a driver issue, but LVGL v8.3.0-dev could have issues too. Could you update LVGL to v8.3.5? I think this the simplest thing we can try.

Thanks for the reply!
I tried the 8.3.5 version but without success, indeed now the animation of the particulate matter has also disappeared but not of the waves!
So even with 8.3.5 the whole display is not drawn!
What more can I try?

I partially solved the problem by changing the display flush:

void my_disp_flush( lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p ){
   uint32_t w = ( area->x2 - area->x1 + 1 );
   uint32_t h = ( area->y2 - area->y1 + 1 );
   tft.setAddrWindow( area->x1, area->y1, w, h );
   tft.writePixels((lgfx::rgb565_t *)&color_p->full, w * h);


void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p){
  uint16_t c;
  tft.setAddrWindow(area->x1, area->y1, (area->x2 - area->x1 + 1), (area->y2 - area->y1 + 1));
  for (int y = area->y1; y <= area->y2; y++) {
    for (int x = area->x1; x <= area->x2; x++) {
      c = color_p->full;
      tft.writeColor(c, 1);

Now everything seems to work correctly but the animations are displayed very slowly.
Does anyone have an idea how I can intervene to make my display work properly?

It shows that the error is really in the driver.

It seems correct though. I’d test writePixels a little bit without LVGL. E.g. create a pure red buffer, draw it to some areas and see if it behaves as expected.

Without LVGL the display draws fine, even with LVGL and lots of active animations the display works fine!
The problem occurs with little or no animations.

Does writePixels uses DMA? If so does endWrite wait for the end of DMA transaction?

how do i check it?

I don’t know lgfx so I don’t really know. But what you can try is adding e.g. a 100 ms delay at the end of the flush_cb. It will be super slow but ensure that the DMA finishes. If it solves the issue we will know where to search.

I tried, the display is terribly slow but the problem is not solved.

Uhh. Is the implementation of lgfx::writePixels open-source and available? If so, can you link it?

I need to know exactly which function is executed. There are many option based on the the hardware selection.

The problem has been solved, the ARDUINO_GFX and LOVYANGFX drivers are not perfectly compatible with my display.
Luckily the LOVYANGFX developer was able to solve the problem by modifying the library, probably the modification will be carried over to new versions of the library.
So all ok, thank you all!

Hello. I am having a similar issue with a ESP32s3 display, also one of the chinese cheap yellow displays but mine is 800x480. Using either the Arduino_GFX or LovyangFX drivers, I can successfully run the widgets application. It is smooth and works very well. HOWEVER, none of the squareline studio examples, such as the demo “Futuristic_Ebike” work well. They are super slow and basically freeze once I try to change screens.

This issue is not the same in my opinion. The original issue was partial refreshment of the screen which was fixed by the driver library’s author. Similar issues like freezing when switching screens, appeared to us on ESP32-S3 and other devices when the memory allocation/deallocation functions were not set correctly in sdkconfig or lv_conf.h. Maybe you should try to set CONFIG_LV_MEM_CUSTOM to ‘y’ or LV_MEM_CUSTOM to ‘1’ in lv_conf.h.
As for the slow screen-update, I guess you should find differences in the config files between the ‘widgets’ demo and the Futuristic Ebike. Maybe you should create a very simple GUI in SquareLine and check if that runs faster. If that is slow too, the slowness is not caused by the UI files or project complexity but the configuration of the display-driver or LVGL.