Could Not allocate memory while calling "lv_disp_drv_register()"

Hi all,
I have just started working on lvgl library with stm32 controller.I have TFT display which is working fine(i have tested it).When i ported the lvgl into my project and start working,during the initialisation i am getting memory related issues.
In init when i called lv_disp_drv_register(),code is getting stuck at LV_ASSERT_MALLOC(disp); function.
I have allocated 10Kb memory for lvgl and around 14Kb RAM and 80Kb flash is free.
Can someone please guide me on this issue?I have attached my lv_conf.h for reference.Aslo see my init function below
void Display_init(int rotation)
{

static lv_disp_draw_buf_t buf;

lv_disp_draw_buf_init(&buf, disp_buf1, NULL, DISP_HOR_RES * 10);

lv_disp_drv_init(&disp_drv);

init();//display driver init

disp_drv.draw_buf = &buf;
disp_drv.flush_cb = tft_flush;
disp_drv.monitor_cb = monitor_cb;
disp_drv.hor_res = DISP_HOR_RES;
disp_drv.ver_res = DISP_VER_RES;
disp_drv.rotated = rotation;
lv_disp_drv_register(&disp_drv);

}
Thanks in advance.
lv_conf.h (25.4 KB)

1 Like