Closed raoulh closed 2 months ago
Hi @raoulh,
Most RGB LCDs can't rotate the screen by sending a command like SPI or I80 LCDs. The ESP32-S3 can rotate the screen only through software, but this will lower the FPS. Unfortunately, there's no good solution yet for the screen rotation on ESP32-S3.
Answers checklist.
General issue report
Hi,
I have a project using an esp32-s3 and a connected display that uses RGB+3 wire SPI. The LCD is a quad 480x480 pixels screen. I'm configuring the display using
esp_lcd_st7701
,esp_lcd
andlvgl_port
. It works good and I have a nice LVGL9 UI that runs at 60FPS using direct mode and no tearing.I configured the display as such:
I want now to be able to rotate the screen dynamically using:
From my understanding
esp_lvgl_port
will handle the screen rotation here: https://github.com/espressif/esp-bsp/blob/master/components/esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c#L442by calling
esp_lcd_panel_swap_xy
andesp_lcd_panel_mirror
accordingly to the requested rotation. I have set.mirror_by_cmd = 1
inst7701_vendor_config_t
so it means mirroring is handled by the ST7701 chip directly using SPI commands. This works.The issue I have is that only mirroring is happening but swapping x/y is not done using my actual configuration and thus rotation 90 and 270 are not working as expected. Only rotation to 180 is Ok because there is no swapping involved.
How to make rotation work correctly (and fast). I also tried to use
esp_lcd_rgb
software rotation by disablingdirect_mode
andavoid_tearing
but it's slow and contains tearing effects. When I rotate to 90 I get 2-3 FPS only. This is not a solution.Could you tell me what are ma solution to have a good and working rotation solution for the ST7701 with esp_lcd APIs?