Ssd1963(800x480) lvgl very slow

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the FAQ and read the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.

Description

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

stm32f407 disco cubeide

What LVGL version are you using?

lvgl 9

What do you want to achieve?

ssd1963(800x480) high fps on lvgl

What have you tried so far?

fsmc+dma

Code to reproduce

Add a code snippet which can run in the simulator. It should contain only the relevant code that compiles without errors when separated from your main code base.

The code block(s) should be formatted like:

I moved stm32f407 discovery,ssd1963(800x480) lvgl. I am using fsmc+dma. Lvgl is very slow.

#define LV_MEM_SIZE (48U * 1024U)
#define FB_SIZE 10
void LV_tft_init(void)
{

static lv_color_t buf_1[ SSD1963_SCREEN_WIDTH * FB_SIZE];
     static lv_color_t buf_2[ SSD1963_SCREEN_WIDTH * FB_SIZE];
     static lv_disp_draw_buf_t disp_buf;
lv_disp_draw_buf_init(&disp_buf, buf_1,buf_2,SSD1963_SCREEN_WIDTH * FB_SIZE);

lv_disp_drv_init(&disp_drv);
disp_drv.draw_buf = &disp_buf;
disp_drv.flush_cb = tft_flush_cb;
disp_drv.monitor_cb = monitor_cb;

disp_drv.hor_res = 800;
disp_drv.ver_res = 480;
//disp_drv.sw_rotate = 1;//SCREEN
//disp_drv.rotated = LV_DISP_ROT_180;

lv_disp_drv_register(&disp_drv);
}

static void tft_flush_cb(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_p)
{
int32_t act_x1 = area->x1 < 0 ? 0 : area->x1;
int32_t act_y1 = area->y1 < 0 ? 0 : area->y1;
int32_t act_x2 = area->x2 > SSD1963_SCREEN_WIDTH - 1 ? SSD1963_SCREEN_WIDTH - 1 : area->x2;
int32_t act_y2 = area->y2 > SSD1963_SCREEN_HEIGHT - 1 ? SSD1963_SCREEN_HEIGHT - 1 : area->y2;

x1_flush = act_x1;
y1_flush = act_y1;
x2_flush = act_x2;
y2_flush = act_y2;
y_flush_act = act_y1;
buf_to_flush = color_p;

/*Use DMA instead of DMA2D to leave it free for GPU*/
HAL_StatusTypeDef err;

      SSD1963_Set_Address(x1_flush, y_flush_act, x2_flush, y_flush_act + 1);

err = HAL_DMA_Start_IT(&hdma_memtomem_dma2_stream0,(uint32_t)buf_to_flush, (uint32_t)lcdAddr, (x2_flush - x1_flush + 1));

if(err != HAL_OK)
{
while(1);
}

}

I made #define LV_MEM_SIZE (48U * 1024U) ,60U
#define FB_SIZE I did 10 .30, nothing changed.
lvgl is still very slow, what should I do to speed it up?

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.


ssd1963.zip (933.9 KB)

What is clock speed of FSMC?
FB_SIZE should be at least 48. (Usually I recommend 1/10 screen sized buffer)

FSMC init
Timing.AddressSetupTime = 15;
Timing.AddressHoldTime = 15;
Timing.DataSetupTime = 255;
FB_SIZE 48
static lv_color_t buf_1[ SSD1963_SCREEN_WIDTH * FB_SIZE];
// static lv_color_t buf_2[ SSD1963_SCREEN_WIDTH * FB_SIZE];
static lv_disp_draw_buf_t disp_buf;
lv_disp_draw_buf_init(&disp_buf, buf_1,NULL,SSD1963_SCREEN_WIDTH * FB_SIZE);

no change

Timing.AddressSetupTime = 15;
Timing.AddressHoldTime = 15;
Timing.DataSetupTime = 255;
I changed the values of fsmc, still the same,

FB_SIZE 48
FB_SIZE 70 is still the same
ram overflow when FB_SIZE becomes 80

I did FB_SIZE 35. Because ram is limited, I doubled the buffer. Still slow, screen refresh is obvious. What is my maximum speed with this hardware, what should I do for faster screen refresh.