SF32LB52 Nano 52J + CO5300: Official RT-Thread LVGL v9 demo shows persistent black screen and eventually draw_core timeout

Environment

  • Chip/board configuration: SF32LB52JUD6, SCons board is sf32lb52-nano_52j
  • Display driver: SDK built-in CO5300, QADSPI
  • SDK: SiFli-SDK v2.4.6, build ce200146 (Git commit ce20014)
  • Example: SDK official example/multimedia/lvgl/lvgl_v9_demos
  • RT-Thread + littlevgl2rtt + LVGL v9
  • Download/log UART: COM11, 1 Mbps

No modifications were made to the official LVGL demo, CO5300 driver, or LCDC driver source code in this test.

Reproduction Steps

cd example/multimedia/lvgl/lvgl_v9_demos/project
scons --board=sf32lb52-nano_52j -j8
build_sf32lb52-nano_52j_hcpu/uart_download.bat

After downloading via UART to the board, reset it. The project configuration enables:

LVGL_V9=1
LV_USE_DEMO_WIDGETS=1
LV_USE_DEMO_BENCHMARK=1
BSP_USING_EPIC=1
BSP_USING_LCDC=1
LCD_USING_TFT_CO5300=1
LCD_CO5300_VSYNC_ENABLE=1
BSP_LCDC_USING_QADSPI=1
LCD_HOR_RES_MAX=390
LCD_VER_RES_MAX=450

Symptoms

  1. The screen remains black; widgets/benchmark content is not visible.
  2. LCD initialization and the LVGL thread both appear to succeed; the serial output shows CO5300 ID as 0x331100, and the LCD state enters ON.
  3. sysmon continuously reports 60 FPS, with render at about 4 ms and flush at about 10 ms, indicating LVGL is still rendering and submitting refreshes, but the panel shows no visible pixels.
  4. After running for a while, the official LCD driver reports a draw_core timeout and asserts at draw_core:1823.

On the same hardware, using the RT-Thread official CO5300/LCDC driver for a 5-color block cycling refresh (without LVGL) correctly displays red, green, blue, white, and black. Therefore, the panel power supply, reset, QADSPI basic communication, and direct pixel write path are working normally. The issue only appears when switching to the official LVGL v9 demo.

Key Logs

SiFli Corporation build on Sep 11 2026, 2.4.6 build ce200146
[2349] I/drv.epic main: drv_gpu opened.
[2512] I/drv.lcd main: [NONE] -> [OPENING]
CO5300_ReadID 0x331100
[11171] I/drv.lcd lcd_task: Found lcd co5300 id:331100h
[11210] I/drv.lcd lcd_task: [OPENING] -> [INITIALIZED]
[11645] I/LVGL main: [littlevgl2rtt] Welcome to the littlevgl2rtt lib.
[12654] I/drv.lcd lcd_task: display on
[12669] I/drv.lcd lcd_task: [INITIALIZED] -> [ON]
sysmon: 60 FPS (refr_cnt: 19 | redraw_cnt: 19), refr 15ms (render 4ms | flush 10ms), CPU 93
...
[129952] E/drv.lcd lcd_task: draw_core timeout
[129974] E/drv.lcd lcd_task: Error, Clear p_drv_ops 120f5938, sem_v=0
[130002] E/drv.lcd lcd_task: irq_en=0
[130017] E/drv.lcd lcd_task: LCDC1_irq_en=1, active=0, pending=0
[130042] E/drv.lcd lcd_task: hlcdc errcode=0, lock=0, state=2
[130065] E/drv.lcd lcd_task: LCDC STATUS=1,TE=3
[130084] E/drv.lcd lcd_task: HAL dbg cnt b7, b7, b6
[130104] E/drv.lcd lcd_task: DRV dbg cnt b7, b6, b6
[130123] E/drv.lcd lcd_task: LCDC CANVAS TL=0,BR=1c10185,SETTING=a0141,IRQ=0
[130153] E/drv.lcd lcd_task: LCDC LAYER0 CFG=14618ff0,TL=0,BR=1c10185,SRC=60000000,DEC=0
[131398] I/drv.lcd lcd_task: [ON] -> [TIMEOUT]
[131416] E/drv.lcd lcd_task: lcd_timeout_error draw_core, 1822
Assertion failed at function:draw_core, line number:1823 ,(0)

Here, the submission and completion counts in HAL/DRV differ by 1, and IRQ=0, suggesting the last LCDC refresh did not receive a completion event.

Questions I’d Like to Ask

  1. For sf32lb52-nano_52j + CO5300, which official board/config is recommended for directly running the LVGL v9 demo?
  2. Do the current official board configuration values LCD_HOR_RES_MAX=390 and LCD_VER_RES_MAX=450 apply to this CO5300 panel? Our panel pixel specification is 410×502; could this resolution difference cause the current black screen or loss of the LCDC EOF?
  3. Do LCD_CO5300_VSYNC_ENABLE, TE polarity/delay, QADSPI frequency, or framebuffer address need further adjustment for this panel?
  4. For the above LCDC STATUS=1, TE=3, IRQ=0 and a completion count difference of 1, does the official team have a known fix or suggested patch?

If needed, I can continue to provide the complete .config, main.map, and the full serial logs.

Using SiFli-SDK v2.4.6, build ce200146 (Git commit ce20014) did not reproduce the display failure of v9_demo.

Your screen data is 410×502, which differs from the default screen driver’s specification of 390*450. This affects the commands sent to the screen IC and may cause a black screen.

Replies to the questions:
1: sf32lb52-nano_52j + CO5300 uses SiFli-SDK/customer/boards/sf32lb52-nano_52j.
2: If the screens only differ in size, you only need to modify the default value of LCD_USING_TFT_CO5300 in the config LCD_HOR_RES_MAX/LCD_VER_RES_MAX in SiFli-SDK/customer/boards/Kconfig_lcd.
3: If the IC is the same, no adjustment is needed.
4: You need to provide the project/build_xxx folder, one for rt_driver and one for v9_demo, then I will analyze further to see if there is more information.

@zhenpeng Hello, as suggested, I have completed the 410×502 configuration and rebuilt. The details are as follows:

Basic Environment

  • SiFli-SDK v2.4.6, commit ce20014
  • Board: sf32lb52-nano_52j
  • LCD: CO5300, QADSPI
  • Panel: AM213Q410502LK, 410×502
  • This time only modified the default size of LCD_USING_TFT_CO5300 in customer/boards/Kconfig_lcd to 410×502

Build Results

  • rt_driver: complete build_sf32lb52-nano_52j_hcpu
  • lvgl_v9_demos: complete build_sf32lb52-nano_52j_hcpu
  • The .config of both builds have been confirmed:
CONFIG_LCD_USING_TFT_CO5300=y
CONFIG_LCD_HOR_RES_MAX=410
CONFIG_LCD_VER_RES_MAX=502

Additional Retest

After reflashing with the provided rt_driver build, the CO5300 ID and resolution are recognized correctly:

CO5300_ReadID 0x331100
Lcd info w:410, h502, bits_per_pixel 16, draw_align:2

But after the first framebuffer refresh of about 118 ms, the following appears:

draw_core timeout
LCDC STATUS=1,TE=3
LCDC CANVAS TL=0,BR=1f50199
Assertion failed at function:draw_core, line number:1823

The current build has CONFIG_LCD_CO5300_VSYNC_ENABLE=y enabled, while the .config.old in the build directory is disabled. There is another difference: the panel manufacturer’s initialization code uses X window 0x0016..0x01AF, while the current driver uses COL_OFFSET=0x00. Please help confirm whether the TE configuration and X offset are applicable to this panel.

Attachment

The archive contains two complete build directories, .config, patch, full COM7 serial log, panel documentation, and checksum values.

Filename: sf32lb52j_nano52j_co5300_410x502_lvgl9_rtdriver_ce20014.zip

  • Size: 21,363,283 bytes
  • SHA-256: EE309F86ADB076515D6B687256E3F4D0E1D68A969B21DC7AA5892DBFC96E4A65

The forum’s current file size limit is 1000MB, but the actual file size is 200MB, so it cannot be uploaded. Therefore, the following link is used:

File shared via cloud drive: sf32lb52j_nano52j_co5300_410x502_lvgl9_rtdriver_ce20014.zip
Link: https://pan.baidu.com/s/1ZCKQNWRWO0K5JkPX7I2wBA?pwd=5ntw Extraction code: 5ntw