Skip to content

ESP-IDF LVGL v8 port only backlight visible, no UI #211

Closed
@t0menas

Description

@t0menas

BOARD: JINGCAI ESP32-4848S040C

ENVIROMENT: ESP-IDF v5.4.1

ESP32_Display_Panel v1.0.2, LVGL v8.4

I moved my project from Platformio (everything worked) to ESP-IDF but struggle to see any UI even with lvgl demo UI. Honestly can't see what's wrong since board initializes fine as can be seen in Serial output. After successful initialization the board gets watchdog trigger every few seconds and does essentially nothing.

I did setup lv_conf.h to enable demo widget compiling and also I did set up supported board in idf.py menuconfig.

could 13:51:29:462 -> [W][Panel][esp_lcd_touch_gt911.c:0144](esp_lcd_touch_new_i2c_gt911): Unable to initialize the I2C address from serial output be a hint to issue?

Any help would be greatly appreciated :)

main.cpp

#include <esp_log.h>
#include <esp_display_panel.hpp>
#include "globals.hpp"
#include "lvgl_v8_port.h"
#include "lv_demos.h"
  
static const char *TAG = "MAIN";
  
Backlight *backlight = nullptr;
  

extern "C" void app_main(void)
{
    ESP_LOGI(TAG, "Initializing board...");
    Board *board = new Board();
    assert(board);
    ESP_UTILS_CHECK_FALSE_EXIT(board->init(), "Board init failed");   // Init bus, panel, touch
    ESP_LOGI(TAG, "INIT finnished, beginning board:");
    ESP_UTILS_CHECK_FALSE_EXIT(board->begin(), "Board begin failed");  // Power up
    ESP_LOGI(TAG, "begin finnished, getting lcd, touch, backlight instances:");

    auto lcd = board->getLCD();
    auto touch = board->getTouch();
    backlight = board->getBacklight();

    ESP_LOGI(TAG, "Initializing LVGL...");
    ESP_UTILS_CHECK_FALSE_EXIT(lvgl_port_init(lcd, touch), "LVGL init failed");  // This creates the LVGL task internally OR DOESN'T IT?

    ESP_LOGI(TAG, "Creating UI...");
    lvgl_port_lock(-1);   // Lock LVGL access
    
    //ui_init();            // From EEZ Studio or SquareLine
    //lv_demo_widgets();
    // lv_demo_benchmark();
    lv_demo_music();
    // lv_demo_stress();

    lvgl_port_unlock();  
    ESP_LOGI(TAG, "Starting app");

    if (backlight) {
        backlight->setBrightness(95);
    }
}

Serial output

13:51:26:173 -> ESP-ROM:esp32s3-20210327
13:51:26:177 -> Build:Mar 27 2021
13:51:26:177 -> rst:0x1 (POWERON),boot:0x18 (SPI_FAST_FLASH_BOOT)
13:51:26:182 -> SPIWP:0xee
13:51:26:182 -> mode:DIO, clock div:1
13:51:26:185 -> load:0x3fce2820,len:0x170c
13:51:26:187 -> load:0x403c8700,len:0x4
13:51:26:187 -> load:0x403c8704,len:0xec4
13:51:26:191 -> load:0x403cb700,len:0x318c
13:51:26:195 -> entry 0x403c8950
13:51:26:197 -> I (27) boot: ESP-IDF v5.4.1 2nd stage bootloader
13:51:26:201 -> I (27) boot: compile time Jun 15 2025 13:48:58
13:51:26:205 -> I (27) boot: Multicore bootloader
13:51:26:208 -> I (27) boot: chip revision: v0.2
13:51:26:211 -> I (30) boot: efuse block revision: v1.3
13:51:26:213 -> I (34) qio_mode: Enabling default flash chip QIO
13:51:26:219 -> I (38) boot.esp32s3: Boot SPI Speed : 80MHz
13:51:26:222 -> I (42) boot.esp32s3: SPI Mode       : QIO
13:51:26:228 -> I (45) boot.esp32s3: SPI Flash Size : 16MB
13:51:26:230 -> I (49) boot: Enabling RNG early entropy source...
13:51:26:236 -> I (54) boot: Partition Table:
13:51:26:236 -> I (56) boot: ## Label            Usage          Type ST Offset   Length
13:51:26:244 -> I (63) boot:  0 nvs              WiFi data        01 02 00009000 00006000
13:51:26:249 -> I (69) boot:  1 phy_init         RF data          01 01 0000f000 00001000
13:51:26:255 -> I (76) boot:  2 factory          factory app      00 00 00010000 00300000
13:51:26:263 -> I (82) boot: End of partition table
13:51:26:266 -> I (85) esp_image: segment 0: paddr=00010020 vaddr=3c060020 size=7b220h (504352) map
13:51:26:339 -> I (168) esp_image: segment 1: paddr=0008b248 vaddr=3fc95600 size=033d0h ( 13264) load
13:51:26:344 -> I (170) esp_image: segment 2: paddr=0008e620 vaddr=40374000 size=019f8h (  6648) load
13:51:26:352 -> I (173) esp_image: segment 3: paddr=00090020 vaddr=42000020 size=59840h (366656) map
13:51:26:405 -> I (234) esp_image: segment 4: paddr=000e9868 vaddr=403759f8 size=0fb30h ( 64304) load
13:51:26:420 -> I (246) esp_image: segment 5: paddr=000f93a0 vaddr=600fe100 size=0001ch (    28) load
13:51:26:422 -> I (253) boot: Loaded app from partition at offset 0x10000
13:51:26:428 -> I (253) boot: Disabling RNG early entropy source...
13:51:26:434 -> I (264) octal_psram: vendor id    : 0x0d (AP)
13:51:26:437 -> I (264) octal_psram: dev id       : 0x02 (generation 3)
13:51:26:443 -> I (264) octal_psram: density      : 0x03 (64 Mbit)
13:51:26:449 -> I (266) octal_psram: good-die     : 0x01 (Pass)
13:51:26:451 -> I (270) octal_psram: Latency      : 0x01 (Fixed)
13:51:26:456 -> I (275) octal_psram: VCC          : 0x01 (3V)
13:51:26:459 -> I (279) octal_psram: SRF          : 0x01 (Fast Refresh)
13:51:26:465 -> I (284) octal_psram: BurstType    : 0x01 (Hybrid Wrap)
13:51:26:470 -> I (289) octal_psram: BurstLen     : 0x01 (32 Byte)
13:51:26:473 -> I (293) octal_psram: Readlatency  : 0x02 (10 cycles@Fixed)
13:51:26:479 -> I (298) octal_psram: DriveStrength: 0x00 (1/1)
13:51:26:485 -> I (302) esp_psram: Found 8MB PSRAM device
13:51:26:491 -> I (306) esp_psram: Speed: 40MHz
13:51:26:493 -> I (309) cpu_start: Multicore app
13:51:27:214 -> I (1043) esp_psram: SPI SRAM memory test OK
13:51:27:222 -> I (1052) cpu_start: Pro cpu start user code
13:51:27:227 -> I (1052) cpu_start: cpu freq: 160000000 Hz
13:51:27:228 -> I (1052) app_init: Application information:
13:51:27:234 -> I (1052) app_init: Project name:     RecupControlPanel_IDF
13:51:27:240 -> I (1057) app_init: App version:      1
13:51:27:243 -> I (1061) app_init: Compile time:     Jun 15 2025 13:48:50
13:51:27:248 -> I (1066) app_init: ELF file SHA256:  fa78821aa...
13:51:27:250 -> I (1070) app_init: ESP-IDF:          v5.4.1
13:51:27:256 -> I (1074) efuse_init: Min chip rev:     v0.0
13:51:27:258 -> I (1078) efuse_init: Max chip rev:     v0.99 
13:51:27:264 -> I (1082) efuse_init: Chip rev:         v0.2
13:51:27:270 -> I (1086) heap_init: Initializing. RAM available for dynamic allocation:
13:51:27:274 -> I (1092) heap_init: At 3FC9A160 len 0004F5B0 (317 KiB): RAM
13:51:27:279 -> I (1098) heap_init: At 3FCE9710 len 00005724 (21 KiB): RAM
13:51:27:283 -> I (1103) heap_init: At 3FCF0000 len 00008000 (32 KiB): DRAM
13:51:27:289 -> I (1108) heap_init: At 600FE11C len 00001ECC (7 KiB): RTCRAM
13:51:27:295 -> I (1114) esp_psram: Adding pool of 8192K of PSRAM memory to heap allocator
13:51:27:300 -> I (1121) spi_flash: detected chip: generic
13:51:27:306 -> I (1124) spi_flash: flash io: qio
13:51:27:311 -> W (1127) i2c: This driver is an old driver, please migrate your application code to adapt `driver/i2c_master.h`
13:51:27:317 -> I (1137) sleep_gpio: Configure to isolate all GPIO pins in sleep state
13:51:27:322 -> I (1143) sleep_gpio: Enable automatic switching of GPIO sleep configuration
13:51:27:332 -> I (1150) main_task: Started on CPU0
13:51:27:341 -> I (1170) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
13:51:27:347 -> I (1170) main_task: Calling app_main()
13:51:27:352 -> I (1170) MAIN: Initializing board...
13:51:27:356 -> [I][Panel][esp_panel_board.cpp:0066](init): Initializing board (Jingcai:ESP32_4848S040C_I_Y_3)
13:51:27:365 -> [I][Panel][esp_panel_board.cpp:0235](init): Board initialize success
13:51:27:369 -> I (1190) MAIN: INIT finnished, beginning board:
13:51:27:375 -> [I][Panel][esp_panel_board.cpp:0253](begin): Beginning board (Jingcai:ESP32_4848S040C_I_Y_3)
13:51:27:380 -> I (1200) gpio: GPIO[39]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
13:51:27:388 -> I (1210) gpio: GPIO[47]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
13:51:27:400 -> I (1220) gpio: GPIO[48]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
13:51:27:408 -> [I][Panel][esp_lcd_st7701.c:0026](esp_lcd_new_panel_st7701): version: 1.1.1
13:51:29:186 -> [I][Panel][esp_lcd_touch_gt911.c:0067](esp_lcd_touch_new_i2c_gt911): version: 1.1.1
13:51:29:462 -> [W][Panel][esp_lcd_touch_gt911.c:0144](esp_lcd_touch_new_i2c_gt911): Unable to initialize the I2C address
13:51:30:135 -> [I][Panel][esp_lcd_touch_gt911.c:0401](touch_gt911_read_cfg): TouchPad_ID:0x39,0x31,0x31
13:51:30:433 -> [I][Panel][esp_lcd_touch_gt911.c:0402](touch_gt911_read_cfg): TouchPad_Config_Version:99
13:51:31:169 -> [I][Panel][esp_panel_board.cpp:0463](begin): Board begin success
13:51:31:441 -> I (5110) MAIN: begin finnished, getting lcd, touch, backlight instances:
13:51:31:686 -> I (5430) MAIN: Initializing LVGL...
13:51:34:960 -> E (8740) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
13:51:34:970 -> E (8740) task_wdt:  - IDLE0 (CPU 0)
13:51:34:972 -> E (8740) task_wdt: Tasks currently running:
13:51:34:977 -> E (8740) task_wdt: CPU 0: esp_timer
13:51:34:979 -> E (8740) task_wdt: CPU 1: IDLE1
13:51:34:983 -> E (8740) task_wdt: Print CPU 0 (current core) backtrace
13:51:34:987 -> 
13:51:34:987 -> 
13:51:34:987 -> Backtrace: 0x420446CA:0x3FC96B40 0x42044AE0:0x3FC96B60 0x40377AE1:0x3FC96B90 0x400559DD:0x3FC9CB80 0x4037D3B2:0x3FC9CB90 0x40378D72:0x3FC9CBB0 0x42045B21:0x3FC9CBD0 0x42045B75:0x3FC9CC00 0x4037D019:0x3FC9CC20

esp32 display panel settings from sdkConfig

# ESP Display Panel Configurations
#
# CONFIG_ESP_PANEL_DRIVERS_FILE_SKIP is not set
CONFIG_ESP_PANEL_BOARD_FILE_SKIP=y

#
# Board
#
# CONFIG_ESP_PANEL_BOARD_DEFAULT_USE_NONE is not set
CONFIG_ESP_PANEL_BOARD_DEFAULT_USE_SUPPORTED=y
# CONFIG_ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM is not set
# CONFIG_ESP_PANEL_BOARD_MANUFACTURER_ALL is not set
# CONFIG_ESP_PANEL_BOARD_MANUFACTURER_ESPRESSIF is not set
# CONFIG_ESP_PANEL_BOARD_MANUFACTURER_ELECROW is not set
# CONFIG_ESP_PANEL_BOARD_MANUFACTURER_M5STACK is not set
CONFIG_ESP_PANEL_BOARD_MANUFACTURER_JINGCAI=y
# CONFIG_ESP_PANEL_BOARD_MANUFACTURER_WAVESHARE is not set
# CONFIG_ESP_PANEL_BOARD_MANUFACTURER_VIEWE is not set
CONFIG_BOARD_JINGCAI_ESP32_4848S040C_I_Y_3=y
# CONFIG_BOARD_JINGCAI_JC8048W550C is not set
# end of Board
# end of ESP Display Panel Configurations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions