I was able to run LVGL on my board without dma2d

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


What do you want to achieve?

I want to run LVGL on my board using dma2d since some widgets are slow to load. How should I change the LCD flush callback?

What have you tried so far?

Read some codes of stm32f7 UC

Code to reproduce

The previous working project is added.

Previous project

AFAIK the documentation didn’t talk about dma2d yet. -not sure why! maybe @kisvegabor or @embeddedt know- So I’m not sure about it. But I think it’s better than nothing.
Anyway, I hope this file I attached can help you.

lvgl_ex_function.c (14.9 KB)

@Ali_Rostami Thank you for your file.
I dont understand if dma2d is to ease the buffer copy or not.
in the file you posted, there are two parts.

for(i = fill_area->y1; i <= fill_area->y2; i++) {
/Wait for the previous operation/
HAL_DMA2D_PollForTransfer(&Dma2dHandle, 100);
HAL_DMA2D_BlendingStart(&Dma2dHandle, (uint32_t) lv_color_to32(color), (uint32_t) dest_buf_ofs, (uint32_t)dest_buf_ofs, area_w, 1);
dest_buf_ofs += dest_width;

The other part is

err = HAL_DMA_Start_IT(&DmaHandle, (uint32_t)buf_to_flush, (uint32_t)&my_fb[y_fill_act * LV_HOR_RES + x1_flush],(x2_flush - x1_flush + 1));

The first one uses dma2d with for loop ( tone of surprise ) while the other one with dma fills the one line of buffer at once. Correct me if I am wrong.