Hi i am using LTDC in stm32 to drive an RGB 24 bit display in RGB565 mode, so far i was able to get something like this

but there is an alignment issue , what would have caused it? lvgl driver and flush function is set like this
void init_lvgl(void)
{
lv_disp_draw_buf_init(&drawbuf, lvgl_buf,lvgl_buf, LCD_WIDTH * LVGL_BUF_SIZE);
/* Initialize display driver */
lv_disp_drv_init(&dispdrv);
dispdrv.hor_res = LCD_WIDTH;
dispdrv.ver_res = LCD_HEIGHT;
dispdrv.flush_cb = flush_cb;
dispdrv.draw_buf = &drawbuf;
dispdrv.full_refresh = 0 ;
dispdrv.direct_mode = 0 ;
lv_disp_drv_register(&dispdrv);
}
static void flush_cb(lv_disp_drv_t* disp, const lv_area_t* area, lv_color_t* px_map)
{
uint32_t w = (area->x2 - area->x1 + 1);
uint32_t h = (area->y2 - area->y1 + 1);
uint16_t *dst = framebuffer + area->y1 * disp->hor_res + area->x1;
uint16_t src = (uint16_t )px_map;
//HAL_DMA2D_Start(&hdma2d,(src),(dst),w,h);
for (uint32_t y = 0; y < h; y++) {
//HAL_DMA2D_Start();
memcpy(dst, src, w * sizeof(uint16_t));
dst += disp->hor_res;
src += w;
}
lv_disp_flush_ready(disp);
}
any help on this and can you give me some ways to improve the update speed of the UI elements , right now its way too slow , i need to increase the speed on this ,
?
