Display label issue (V9.3) with CYD board (800 X 480 with capacitive tiuch)

Description

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

ESP32-8048S043N board (ESP32 S3 WROOM 1, 16 bits parallel RGB,ST7262 driver, GT911 capacitive touch)
Compiler: PlatformIO, see details further.

What do you want to achieve?

Run basic code in order to display a label on the screen (runtime OK with CYD 480 X 272 without touch)

What have you tried so far?

I successfully tested a basic LVGL 9.3 label display on a CYD ESP32-4827S043N board (480 X 272, 16 bits parallel RGB,ST7262 driver, without touch).
I use LGFX library to map the draw buffer pixels to the display (flush callback).
Now I intend to run the same code on a CYD ESP32-8048S043C board (800 X 480, 16 bits parallel RGB,ST7262 driver, GT911 capacitive touch).

So main.cpp has been adapted to the actual screen resolution and the appropriate json file selected in platfromIO project [env:esp32-8048S043C].
In this code, no touch operation is involved.
lv_conf.h is the default 9.3 version, but enabled and with LV_USE_LOG facility enabled, LV_LOG_LEVEL_WARN (no extra messages with LV_LOG_LEVEL_TRACE).

Result:
No label display on the screen (backlight is ON)

Serial monitor log messages shows:

  • screen resolution declared: 800 X 480, restricted to 480 X 272 obtained by GT911
  • A touch of the screen triggers an execption: Guru Meditation Error: Core 1 panic’ed (LoadProhibited)

Extra clue: I get the same behaviour and log messages with LVGL 9.3 example: A button with a label and react on click event

I am not able to diagnose further about this issue (memory map mismatch?) and would greatly appreciate any help.

Best regards.

Philippe.

Details
VSCode:

Version: 1.103.0
Commit: e3550cfac4b63ca4eafca7b601f0d2885817fd1f
Date: 2025-08-06T21:40:10.271Z
Electron: 37.2.3
ElectronBuildId: 12035395
Chromium: 138.0.7204.100
Node.js: 22.17.0
V8: 13.8.500258-electron.0
OS: Linux x64 6.15.9-201.fc42.x86_64

PLatformIO:

PlatformIO Core             6.1.18
Python                      3.13.7-final.0
System Type                 linux_x86_64
Platform                    Linux-6.16.3-200.fc42.x86_64-x86_64-with-glibc2.41
File System Encoding        utf-8
Locale Encoding             UTF-8
PlatformIO Core Directory   /home/admin/.platformio
PlatformIO Core Executable  /home/admin/.platformio/penv/bin/platformio
Python Executable           /home/admin/.platformio/penv/bin/python
Global Libraries            0
Development Platforms       3
Tools & Toolchains          16

libdeps versions:

Dependency Graph
|-- LovyanGFX @ 1.2.7
|-- esp32_smartdisplay @ 2.1.1
|-- lvgl @ 9.3.0

esp32-8048S043C.json file:

{
  "build": {
    "arduino": {
      "ldscript": "esp32s3_out.ld",
      "partitions": "default_16MB.csv",
      "memory_type": "qio_opi"
    },
    "core": "esp32",
    "extra_flags": [
      "'-D ARDUINO_ESP32S3_DEV'",
      "'-D BOARD_HAS_PSRAM'",
      "'-D ARDUINO_USB_MODE=1'",
      "'-D ARDUINO_RUNNING_CORE=1'",
      "'-D ARDUINO_EVENT_RUNNING_CORE=1'",
      "'-D ARDUINO_USB_CDC_ON_BOOT=0'",
      "'-D ESP32_8048S043C'",
      "'-D DISPLAY_WIDTH=800'",
      "'-D DISPLAY_HEIGHT=480'",
      "'-D DISPLAY_SOFTWARE_ROTATION'",
      "'-D LVGL_BUFFER_PIXELS=(DISPLAY_WIDTH*DISPLAY_HEIGHT)'",
      "'-D LVGL_BUFFER_MALLOC_FLAGS=(MALLOC_CAP_SPIRAM|MALLOC_CAP_8BIT)'",
      "'-D DISPLAY_BCKL=2'",
      "'-D DISPLAY_ST7262_PAR'",
      "'-D ST7262_PANEL_CONFIG_CLK_SRC=LCD_CLK_SRC_PLL160M'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_PCLK_HZ=(12.5*1000000)'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_H_RES=DISPLAY_WIDTH'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_V_RES=DISPLAY_HEIGHT'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_HSYNC_PULSE_WIDTH=4'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_HSYNC_BACK_PORCH=8'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_HSYNC_FRONT_PORCH=8'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_VSYNC_PULSE_WIDTH=4'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_VSYNC_BACK_PORCH=8'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_VSYNC_FRONT_PORCH=8'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_FLAGS_HSYNC_IDLE_LOW=false'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_FLAGS_VSYNC_IDLE_LOW=false'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_FLAGS_DE_IDLE_HIGH=false'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_FLAGS_PCLK_ACTIVE_NEG=true'",
      "'-D ST7262_PANEL_CONFIG_TIMINGS_FLAGS_PCLK_IDLE_HIGH=false'",
      "'-D ST7262_PANEL_CONFIG_DATA_WIDTH=16'",
      "'-D ST7262_PANEL_CONFIG_SRAM_TRANS_ALIGN=4'",
      "'-D ST7262_PANEL_CONFIG_PSRAM_TRANS_ALIGN=64'",
      "'-D ST7262_PANEL_CONFIG_HSYNC=39'",
      "'-D ST7262_PANEL_CONFIG_VSYNC=41'",
      "'-D ST7262_PANEL_CONFIG_DE=40'",
      "'-D ST7262_PANEL_CONFIG_PCLK=42'",
      "'-D ST7262_PANEL_CONFIG_DATA_R0=8'",
      "'-D ST7262_PANEL_CONFIG_DATA_R1=3'",
      "'-D ST7262_PANEL_CONFIG_DATA_R2=46'",
      "'-D ST7262_PANEL_CONFIG_DATA_R3=9'",
      "'-D ST7262_PANEL_CONFIG_DATA_R4=1'",
      "'-D ST7262_PANEL_CONFIG_DATA_G0=5'",
      "'-D ST7262_PANEL_CONFIG_DATA_G1=6'",
      "'-D ST7262_PANEL_CONFIG_DATA_G2=7'",
      "'-D ST7262_PANEL_CONFIG_DATA_G3=15'",
      "'-D ST7262_PANEL_CONFIG_DATA_G4=16'",
      "'-D ST7262_PANEL_CONFIG_DATA_G5=4'",
      "'-D ST7262_PANEL_CONFIG_DATA_B0=45'",
      "'-D ST7262_PANEL_CONFIG_DATA_B1=48'",
      "'-D ST7262_PANEL_CONFIG_DATA_B2=47'",
      "'-D ST7262_PANEL_CONFIG_DATA_B3=21'",
      "'-D ST7262_PANEL_CONFIG_DATA_B4=14'",
      "'-D ST7262_PANEL_CONFIG_DISP=GPIO_NUM_NC'",
      "'-D ST7262_PANEL_CONFIG_FLAGS_DISP_ACTIVE_LOW=false'",
      "'-D ST7262_PANEL_CONFIG_FLAGS_RELAX_ON_IDLE=false'",
      "'-D ST7262_PANEL_CONFIG_FLAGS_FB_IN_PSRAM=true'",
      "'-D DISPLAY_SWAP_XY=false'",
      "'-D DISPLAY_MIRROR_X=false'",
      "'-D DISPLAY_MIRROR_Y=false'",
      "'-D BOARD_HAS_TOUCH'",
      "'-D CONFIG_ESP_LCD_TOUCH_MAX_POINTS=1'",
      "'-D CONFIG_ESP_LCD_TOUCH_MAX_BUTTONS=0'",
      "'-D TOUCH_GT911_I2C'",```c
      "'-D GT911_I2C_HOST=I2C_NUM_0'",
      "'-D GT911_I2C_CONFIG_SDA=19'",
      "'-D GT911_I2C_CONFIG_SCL=20'",
      "'-D GT911_I2C_CONFIG_SDA_PULLUP_EN=GPIO_PULLUP_DISABLE'",
      "'-D GT911_I2C_CONFIG_SCL_PULLUP_EN=GPIO_PULLUP_DISABLE'",
      "'-D GT911_I2C_CONFIG_MASTER_CLK_SPEED=400000'",
      "'-D GT911_I2C_CONFIG_CLK_FLAGS=I2C_SCLK_SRC_FLAG_FOR_NOMAL'",
      "'-D GT911_IO_I2C_CONFIG_DEV_ADDR=GT911_IO_I2C_CONFIG_DEV_ADDRESS_5D'",
      "'-D GT911_IO_I2C_CONFIG_CONTROL_PHASE_BYTES=1'",
      "'-D GT911_IO_I2C_CONFIG_DC_BIT_OFFSET=0'",
      "'-D GT911_IO_I2C_CONFIG_LCD_CMD_BITS=16'",
      "'-D GT911_IO_I2C_CONFIG_LCD_PARAM_BITS=0'",
      "'-D GT911_IO_I2C_CONFIG_FLAGS_DC_LOW_ON_DATA=false'",
      "'-D GT911_IO_I2C_CONFIG_FLAGS_DISABLE_CONTROL_PHASE=true'",
      "'-D GT911_TOUCH_CONFIG_X_MAX=DISPLAY_WIDTH'",
      "'-D GT911_TOUCH_CONFIG_Y_MAX=DISPLAY_HEIGHT'",
      "'-D GT911_TOUCH_CONFIG_RST=38'",
      "'-D GT911_TOUCH_CONFIG_INT=18'",```c
      "'-D GT911_TOUCH_CONFIG_LEVELS_RESET=0'",
      "'-D GT911_TOUCH_CONFIG_LEVELS_INTERRUPT=0'",
      "'-D TOUCH_SWAP_XY=false'",
      "'-D TOUCH_MIRROR_X=false'",
      "'-D TOUCH_MIRROR_Y=false'",
      "'-D BOARD_HAS_TF'",
      "'-D TF_CS=10'",
      "'-D TF_SPI_MOSI=11'",
      "'-D TF_SPI_SCLK=12'",
      "'-D TF_SPI_MISO=13'"
    ],
    "f_cpu": "240000000L",
    "f_flash": "80000000L",
    "flash_mode": "qio",
    "hwids": [
      [
        "0x303A",
        "0x1001"
      ]
    ],
    "mcu": "esp32s3",
    "variant": "esp32s3"
  },
  "connectivity": [
    "wifi"
  ],
  "debug": {
    "openocd_target": "esp32s3.cfg"
  },
  "frameworks": [
    "arduino",
    "espidf"
  ],
  "name": "esp32-8048S043C",
  "upload": {
    "flash_size": "16MB",
    "maximum_ram_size": 327680,
    "maximum_size": 16777216,
    "use_1200bps_touch": true,
    "wait_for_upload_port": true,
    "require_upload_port": true,
    "speed": 460800
  },
  "url": "https://www.aliexpress.com/item/1005006110360174.html",
  "vendor": "Sunton"
}
``

*platformio.ini:*
```c
[env:esp32-8048S043C]
platform = espressif32
board = esp32-8048S043C
framework = arduino
monitor_speed = 115200
monitor_rts = 0
monitor_dtr = 0
monitor_filters = esp32_exception_decoder
build_flags =
	-Ofast
	-Wall
	'-D LV_CONF_PATH="${platformio.include_dir}/lv_conf.h"'
	'-D CORE_DEBUG_LEVEL=ARDUHAL_LOG_LEVEL_VERBOSE'
	'-D ESP_LCD_PANEL_IO_ADDITIONS_VER_MAJOR=1'
	'-D ESP_LCD_PANEL_IO_ADDITIONS_VER_MINOR=0'
	'-D ESP_LCD_PANEL_IO_ADDITIONS_VER_PATCH=1'
	'-D DISPLAY_WIDTH=800'
	'-D DISPLAY_HEIGHT=480'
	'-D BOARD_HAS_TOUCH'
    '-D CONFIG_ESP_LCD_TOUCH_MAX_POINTS=1'
    '-D CONFIG_ESP_LCD_TOUCH_MAX_BUTTONS=0'
lib_deps =
	lovyan03/LovyanGFX@^1.2.7
	rzeldent/esp32_smartdisplay@^2.1.1

main.cpp:

#define LGFX_USE_V1

#include <Arduino.h>
#include <LGFX_AUTODETECT.hpp>
#include <esp32_smartdisplay.h>
#include "../.pio/libdeps/esp32-8048S043C/lvgl/examples/lv_examples.h"

#define TFT_HOR_RES 800
#define TFT_VER_RES 480

static LGFX tft;

/*LVGL draw into this buffer, 1/10 screen size usually works well. The size is in bytes*/
#define DRAW_BUF_SIZE (TFT_HOR_RES * TFT_VER_RES / 10 * (LV_COLOR_DEPTH / 8))

void *draw_buf_1;
void *draw_buf_2;
static lv_obj_t * label;

uint8_t cnt=0;
unsigned long lastTickMillis = 0;

// method for log dislay, refers to lv_Conf.h
#if LV_USE_LOG != 0
/* debug on serial monitor */
void my_print(lv_log_level_t level, const char * file)
{
  Serial.printf(file,strlen(file));
    Serial.flush();
}
#endif

// Flush Callback function:
void my_flush_cb(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) {
  uint32_t w = lv_area_get_width(area);
  uint32_t h = lv_area_get_height(area);
  tft.startWrite();
  tft.setAddrWindow(area->x1, area->y1, w, h);
  tft.writePixels((lgfx::rgb565_t *)px_map, w * h);
  tft.endWrite();
  lv_disp_flush_ready(disp);
}

void lv_label_display_test(void)
{
    label = lv_label_create(lv_screen_active());
    lv_label_set_text(label, "counter: 0");
}


void setup()
{
Serial.begin(115200);
smartdisplay_init();
lv_init();

#if LV_USE_LOG != 0
    lv_log_register_print_cb(my_print); /* register print function for debugging */
#endif

lv_display_t * display = lv_display_create(TFT_HOR_RES, TFT_VER_RES); // create a display
draw_buf_1 = heap_caps_malloc(DRAW_BUF_SIZE, MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL); //assign draw buffer
lv_display_set_buffers(display, draw_buf_1, NULL, DRAW_BUF_SIZE, LV_DISPLAY_RENDER_MODE_PARTIAL);
lv_display_set_flush_cb(display, my_flush_cb); //assign flush callback

// auto display = lv_display_get_default(); //
  // lv_display_set_rotation(display, LV_DISPLAY_ROTATION_90);
  // lv_display_set_rotation(display, LV_DISPLAY_ROTATION_180);
  // lv_display_set_rotation(display, LV_DISPLAY_ROTATION_270);
  smartdisplay_lcd_set_backlight(0.5);  //esp32_smartdisplay command
// 0 no backlight
// 0.5 50%
// 1 full backlight

// lv_example_get_started_2();
lv_label_display_test();
}

void loop()
{
    // LVGL Tick Interface
    unsigned int tickPeriod = millis() - lastTickMillis;
    lv_tick_inc(tickPeriod);
    lastTickMillis = millis();
    // Update the UI
    lv_timer_handler();
    Serial.printf("lv_label_get_text: %s \n", lv_label_get_text(label)); // display on serial monitor
    delay(2000);
}

log serial monitor:

[   193][D][esp32_smartdisplay.c:159] smartdisplay_init(): smartdisplay_init
[   202][V][lvgl_panel_st7262_par.c:64] lvgl_lcd_init(): display:0x3fc97e64
[   209][D][lvgl_panel_st7262_par.c:104] lvgl_lcd_init(): rgb_panel_config: clk_src:0, timings:{pclk_hz:12500000, h_res:800, v_res:480, hsync_pulse_width:4, hsync_back_porch:8, hsync_front_porch:8, vsync_pulse_width:4, vsync_back_porch:8, vsync_front_porch:8, flags:{hsync_idle_low:0, vsync_idle_low:0, de_idle_high:0, pclk_active_neg:1, pclk_idle_high:0}}, data_width:16, sram_trans_align:4, psram_trans_align:64, hsync_gpio_num:39, vsync_gpio_num:41, de_gpio_num:40, pclk_gpio_num:42, data_gpio_nums:[8,3,46,9,1,5,6,7,15,16,4,45,48,47,21,14,], disp_gpio_num:-1, on_frame_trans_done:0x4203a1e4, user_ctx:0x3fc97e64, flags:{disp_active_low:0, relax_on_idle:0, fb_in_psram:1}
  #0  0x4203a1e4 in direct_io_frame_trans_done at .pio/libdeps/esp32-8048S043C/esp32_smartdisplay/src/lvgl_panel_st7262_par.c:8

[   268][D][lvgl_panel_st7262_par.c:105] lvgl_lcd_init(): refresh rate: 0 Hz
[   297][V][esp32_smartdisplay.c:52] smartdisplay_lcd_set_backlight(): duty:0.500000
[   305][V][lvgl_touch_gt911_i2c.c:34] lvgl_touch_init(): indev:0x3fc98edc
[   312][D][lvgl_touch_gt911_i2c.c:46] lvgl_touch_init(): i2c_config: mode:1, sda_io_num:19, scl_io_num:20, sda_pullup_en:0, scl_pullup_en:0, master:{clk_speed:400000}, clk_flags:0
[   328][D][lvgl_touch_gt911_i2c.c:61] lvgl_touch_init(): io_i2c_config: dev_addr:0x5d, control_phase_bytes:1, user_ctx:0x3fc98edc, dc_bit_offset:0, lcd_cmd_bits:16, lcd_param_bits:0, flags:{.dc_low_on_data:0, disable_control_phase:1}
[   349][D][lvgl_touch_gt911_i2c.c:76] lvgl_touch_init(): touch_config: x_max:800, y_max:480, rst_gpio_num:38, int_gpio_num:18, levels:{reset:0, interrupt:0}, flags:{swap_xy:0, mirror_x:0, mirror_y:0}, user_data:0x3fcec9c4
[   369][V][esp_touch_gt911.c:370] esp_lcd_touch_new_i2c_gt911(): io:0x3fcec9c4, config:0x3fcebce0, handle:0x3fcebca0
[   379][V][esp_touch_gt911.c:81] gt911_reset(): th:0x3d977b08
[   436][V][esp_touch_gt911.c:135] gt911_read_info(): th:0x3d977b08
[   443][D][esp_touch_gt911.c:153] gt911_read_info(): GT911 productId: 911
[   449][D][esp_touch_gt911.c:154] gt911_read_info(): GT911 fwId: 0x1060
[   456][D][esp_touch_gt911.c:155] gt911_read_info(): GT911 xResolution/yResolution: (480,272)
[   464][D][esp_touch_gt911.c:156] gt911_read_info(): GT911 vendorId: 0x00
[   471][W][esp_touch_gt911.c:162] gt911_read_info(): Resolution obtained from GT911 (480,272) does not match resolution (800,480). Enabled coordinate adjustment.
[   485][D][esp_touch_gt911.c:463] esp_lcd_touch_new_i2c_gt911(): handle:0x3d977b08
[   494][V][esp32_smartdisplay.c:52] smartdisplay_lcd_set_backlight(): duty:0.500000
[   509][V][esp32_smartdisplay.c:122] lvgl_touch_calibration_transform(): indev:0x3fc98edc, data:0x3fcebc94
[   519][V][esp_touch_gt911.c:219] gt911_read_data(): th:0x3d977b08
[   525][V][esp_touch_gt911.c:296] gt911_get_xy(): th:0x3d977b08, x:0x3fcebc1c, y:0x3fcebc1e, strength:0x00000000, point_num:0x3fcebc1b, max_point_num:1
lv_label_get_text: counter: 0
[  2618][V][esp32_smartdisplay.c:122] lvgl_touch_calibration_transform(): indev:0x3fc98edc, data:0x3fcebc94
[  2628][V][esp_touch_gt911.c:219] gt911_read_data(): th:0x3d977b08
[  2634][V][esp_touch_gt911.c:296] gt911_get_xy(): th:0x3d977b08, x:0x3fcebc1c, y:0x3fcebc1e, strength:0x00000000, point_num:0x3fcebc1b, max_point_num:1
lv_label_get_text: counter: 0
[  8708][V][esp32_smartdisplay.c:122] lvgl_touch_calibration_transform(): indev:0x3fc98edc, data:0x3fcebc94
[  8718][V][esp_touch_gt911.c:219] gt911_read_data(): th:0x3d977b08
[  8724][V][esp_touch_gt911.c:257] gt911_read_data(): Points available: 1
[  8731][D][esp_touch_gt911.c:272] gt911_read_data(): Point: #0, event:0, point:(453,251), area:29
[  8740][V][esp_touch_gt911.c:296] gt911_get_xy(): th:0x3d977b08, x:0x3fcebc1c, y:0x3fcebc1e, strength:0x00000000, point_num:0x3fcebc1b, max_point_num:1


when touch on screen done:


[  8753][D][esp_touch_gt911.c:309] gt911_get_xy(): Touch data: x:453, y:251, strength:29
[  8761][V][esp_touch_gt911.c:118] gt911_process_coordinates(): th:0x3d977b08, x:0x3fcebc1c, y:0x3fcebc1e, strength:0x00000000, point_num:0x3fcebc1b, max_point_num:1
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.

Core  1 register dump:
PC      : 0x4203ac87  PS      : 0x00060433  A0      : 0x8203aa39  A1      : 0x3fcebb70
  #0  0x4203ac87 in gt911_process_coordinates at .pio/libdeps/esp32-8048S043C/esp32_smartdisplay/src/esp_touch_gt911.c:127 (discriminator 3)

A2      : 0x3d977b08  A3      : 0x3fcebc1c  A4      : 0x3fcebc1e  A5      : 0x00000000
A6      : 0x3fca8828  A7      : 0x3d977b60  A8      : 0x8203ac87  A9      : 0x3fcebb50
  #0  0x3fca8828 in ?? at .pio/libdeps/esp32-8048S043C/esp32_smartdisplay/src/esp_touch_gt911.c:77

A10     : 0x00002248  A11     : 0x00000000  A12     : 0x00000000  A13     : 0x00000000
A14     : 0x00060420  A15     : 0x000002f3  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x400556d5  LEND    : 0x400556e5  LCOUNT  : 0xfffffff9


Backtrace: 0x4203ac84:0x3fcebb70 0x4203aa36:0x3fcebbd0 0x4203a6e1:0x3fcebc00 0x42039ff0:0x3fcebc40 0x4200791a:0x3fcebc80 0x42008135:0x3fcebd00 0x4200b719:0x3fcebd20 0x42003f30:0x3fcebd50 0x42040831:0x3fcebd70
  #0  0x4203ac84 in gt911_process_coordinates at .pio/libdeps/esp32-8048S043C/esp32_smartdisplay/src/esp_touch_gt911.c:127 (discriminator 3)
  #1  0x4203aa36 in esp_lcd_touch_get_coordinates at .pio/libdeps/esp32-8048S043C/esp32_smartdisplay/src/esp_lcd_touch.c:79
  #2  0x4203a6e1 in gt911_lvgl_touch_cb at .pio/libdeps/esp32-8048S043C/esp32_smartdisplay/src/lvgl_touch_gt911_i2c.c:19 (discriminator 2)
  #3  0x42039ff0 in lvgl_touch_calibration_transform at .pio/libdeps/esp32-8048S043C/esp32_smartdisplay/src/esp32_smartdisplay.c:125
  #4  0x4200791a in indev_read_core at .pio/libdeps/esp32-8048S043C/lvgl/src/indev/lv_indev.c:197
      (inlined by) lv_indev_read at .pio/libdeps/esp32-8048S043C/lvgl/src/indev/lv_indev.c:238
      (inlined by) lv_indev_read at .pio/libdeps/esp32-8048S043C/lvgl/src/indev/lv_indev.c:211
  #5  0x42008135 in lv_indev_read_timer_cb at .pio/libdeps/esp32-8048S043C/lvgl/src/indev/lv_indev.c:208
  #6  0x4200b719 in lv_timer_exec at .pio/libdeps/esp32-8048S043C/lvgl/src/misc/lv_timer.c:327
      (inlined by) lv_timer_handler at .pio/libdeps/esp32-8048S043C/lvgl/src/misc/lv_timer.c:107
      (inlined by) lv_timer_handler at .pio/libdeps/esp32-8048S043C/lvgl/src/misc/lv_timer.c:63
  #7  0x42003f30 in loop() at src/main.cpp:86
  #8  0x42040831 in loopTask(void*) at /home/admin/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50


ELF file SHA256: 5a374607b4c24ffc

Rebooting...
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0xc (RTC_SW_CPU_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x42069c66
  #0  0x42069c66 in esp_pm_impl_waiti at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_pm/pm_impl.c:855

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x4bc
load:0x403c9700,len:0xbd8
load:0x403cc700,len:0x2a0c
entry 0x403c98d0
[   160][I][esp32-hal-psram.c:96] psramInit(): PSRAM enabled
[   174][V][esp32-hal-uart.c:330] uartBegin(): UART0 baud(115200) Mode(800001c) rxPin(44) txPin(43)
[   183][V][esp32-hal-uart.c:416] uartBegin(): UART0 not installed. Starting installation
[   191][V][esp32-hal-uart.c:467] uartBegin(): UART0 initialization done.

Issue fixed: available RAM (320Kbytes) does not allow RAM allocation for display buffer. Limiting screen resolution down to 480 X 272 leads to runtime OK.
However, i notice that the display is duplicated on the screen: planned display on (0,0) to (479,271) and a second display below, same content as planned display.
Moreover, display lacks resolution.
So I tried to increase ten times DRAW_BUF_SIZE and changed the last parameter of lv_display_set_buffers from LV_DISPLAY_RENDER_PARTIAL to LV_DISPLAY_RENDER-DIRECT, without satisfactory result.
May I have any clue in order to fix this issue?

Best regards.

Hereafter my corrected last main.cpp version (DISPLAY_WITH and DISPLAY_HEIGHT have also been changes in esp32-8048S043.json an platformio.ini files).

#define LGFX_USE_V1

#include <Arduino.h>
#include <LGFX_AUTODETECT.hpp>
#include <esp32_smartdisplay.h>
#include "../.pio/libdeps/esp32-8048S043C/lvgl/examples/lv_examples.h"

#define TFT_HOR_RES 480
#define TFT_VER_RES 272

static LGFX tft;

/*LVGL draw into this buffer, 1/10 screen size usually works well. The size is in bytes*/
#define DRAW_BUF_SIZE (TFT_HOR_RES * TFT_VER_RES /10* (LV_COLOR_DEPTH / 8))

void *draw_buf_1;
void *draw_buf_2;
// static lv_obj_t * label;

uint8_t cnt=0;
unsigned long lastTickMillis = 0;

// method for log dislay, refers to lv_Conf.h
#if LV_USE_LOG != 0
/* debug on serial monitor */
void my_print(lv_log_level_t level, const char * file)
{
  Serial.printf(file,strlen(file)); 
  Serial.flush();
}
#endif

// Flush Callback function:
void my_flush_cb(lv_display_t *disp, const lv_area_t *area, uint8_t *px_map) {
  uint32_t w = lv_area_get_width(area);
  uint32_t h = lv_area_get_height(area);
  tft.startWrite();
  tft.setAddrWindow(area->x1, area->y1, w, h);
  tft.writePixels((lgfx::rgb565_t *)px_map, w * h);
  tft.endWrite();
  lv_disp_flush_ready(disp);
}

static void btn_event_cb(lv_event_t * e)
{
    lv_event_code_t code = lv_event_get_code(e);
    lv_obj_t * btn = lv_event_get_target_obj(e);
    if(code == LV_EVENT_CLICKED) {
        LV_LOG_USER("Clicked");
        static uint8_t cnt = 0;
        cnt++;

        /*Get the first child of the button which is the label and change its text*/
        lv_obj_t * label = lv_obj_get_child(btn, 0);
        lv_label_set_text_fmt(label, "Button: %d", cnt);
    }
}

/**
 * Create a button with a label and react on click event.
 */
void lv_example_get_started_2(void)
{
    lv_obj_t * btn = lv_button_create(lv_screen_active());     /*Add a button the current screen*/
    lv_obj_set_pos(btn, 10, 10);                            /*Set its position*/
    lv_obj_set_size(btn, 120, 50);                          /*Set its size*/
    lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_ALL, NULL);           /*Assign a callback to the button*/
    // try lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_CLICKED, NULL);

    lv_obj_t * label = lv_label_create(btn);          /*Add a label to the button*/
    lv_label_set_text(label, "Button");                     /*Set the labels text*/
    lv_obj_center(label);
}

void setup()
{
Serial.begin(115200);
smartdisplay_init();
lv_init();

#if LV_USE_LOG != 0
    lv_log_register_print_cb(my_print); /* register print function for debugging */
#endif

lv_display_t * display = lv_display_create(TFT_HOR_RES, TFT_VER_RES); // create a display
draw_buf_1 = heap_caps_malloc(DRAW_BUF_SIZE, MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL); //assign draw buffer
lv_display_set_buffers(display, draw_buf_1, NULL, DRAW_BUF_SIZE, LV_DISPLAY_RENDER_MODE_PARTIAL);
lv_display_set_flush_cb(display, my_flush_cb); //assign flush callback

// auto display = lv_display_get_default(); //
  // lv_display_set_rotation(display, LV_DISPLAY_ROTATION_90);
  // lv_display_set_rotation(display, LV_DISPLAY_ROTATION_180);
  // lv_display_set_rotation(display, LV_DISPLAY_ROTATION_270);
  smartdisplay_lcd_set_backlight(0.5);  //esp32_smartdisplay command
// 0 no backlight
// 0.5 50%
// 1 full backlight

lv_example_get_started_2();
// lv_label_display_test();
}

void loop()
{
    // LVGL Tick Interface
    unsigned int tickPeriod = millis() - lastTickMillis;
    lv_tick_inc(tickPeriod);
    lastTickMillis = millis();
    // Update the UI
    lv_timer_handler();
}