Fuzzy graphics when LvGL buffer on external SDRAM

Fuzzy graphics with external SDRAM.

I was able to develop custom driver for SDRAM on STM32F429 Discovery board with 8MB in size.
The full LCD buffer is located at the external SDRAM as following:

__attribute__ ((section(".SDRAM_data"),used)) uint16_t  Frame_buffer[FB_SIZE];

The LCD driver is based on LTDC and DMA2D for acceleration.

When I host the LvGL draw buffer on the external RAM, I am getting some sort of fuzziness within the picture as shown below:

static lv_color_t buf_1[MY_DISP_HOR_RES*64]__attribute__ ((section (".SDRAM_data")));
static lv_color_t buf_2[MY_DISP_HOR_RES*64]__attribute__ ((section (".SDRAM_data")));

When I use the internal RAM, it is clear as shown:

static lv_color_t buf_1[MY_DISP_HOR_RES*64];//__attribute__ ((section (".SDRAM_data")));
static lv_color_t buf_2[MY_DISP_HOR_RES*64];//__attribute__ ((section (".SDRAM_data")));

As you can see, when internal RAM is used to hold the double draw buffer, is it crystal clear compared to external RAM.

Any idea why the issue?
I tried the following:
Increase decrease the external RAM speed.
decreasing the CPU speed to ensure stability etc,

Any idea how to solve this issue?

I am using latest LvGL version.

Can you rule out a hardware or driver issue? For example, display a picture directly on the screen without using LVGL, and compare and display the differences.

I can rule out hardware issue.
I filled the screen with different color each time, crystal clear. No issues what so ever.
Tried picture, no issue also.

You can try to compare the buffers rendered by LVGL to the screen by bytes to see if there is any difference.

1 Like

Will check that using memory view.

I increased the CPU speed from 168 to 180, reconfigured the SDRAM, now both the screen buffer and the double buffer of LvGL are located in the SDRAM and everything is crystal clear. No noise, no fuzzy graphics.