Random Crash in LVGL 9.3 on STM32H7 (RGB888, QuadSPI Assets, Asset Handler)

Description

My LVGL 9.3-based project randomly crashes. There’s no log output, and the crash always ends up in the lv_asset_handler function. The issue is not time-dependent and seems unrelated to user interaction or specific asset types. I was thinking about an OS specific Problem.

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

  • MCU: STM32H7
  • Display: 800×480, RGB888 over LTDC
  • Compiler: ARM GCC via STM32CubeIDE
  • External Memory: SDRAM used for buffers, QuadSPI used for asset storage
  • Graphics Layer: DMA2D
  • LVGL version: 9.3
  • OS: FreeRTOS CMSISV2

What do you want to achieve?

stable GUI without random crashes. I want to understand what might cause these unexplained faults in lv_asset_handler and how to debug further.

What have you tried so far?

  • Used both direc` and partial draw modes

  • Increased and decreased LV_MEM_SIZE (tested up to 256 kB)

  • Moved framebuffers into SDRAM

  • Enabled all LVGL logging (no warnings/errors)

  • Used lv_mem_monitor() to check for fragmentation → no significant memory issues

  • Tried 1 and 2 draw buffers with various sizes

Code to reproduce

Add the relevant code snippets here.

/*
#define RESOLUTION_H 800
#define RESOLUTION_V 480
#define BYTES_PER_PIXEL 3

#define FRAMEBUFFER_SIZE (RESOLUTION_H * RESOLUTION_V * BYTES_PER_PIXEL)

uint8_t framebuffer[FRAMEBUFFER_SIZE] __attribute__((aligned(4))) __attribute__((section(".sdram_framebuffer")));


static uint8_t buf_1[147456]
    __attribute__((section(".RAM_D2")))
    __attribute__((aligned(4)));


static uint8_t buf_2[147456]
    __attribute__((section(".RAM_D2")))
    __attribute__((aligned(4)));

lv_init();
lv_tick_set_cb(xTaskGetTickCount);
uint32_t my_ltdc_layer_index = 0; 
volatile lv_display_t * disp = lv_st_ltdc_create_partial(buf_1,buf_2,sizeof(buf_1),my_ltdc_layer_index);
ui_init();




*/