Use sdram to lv_disp_draw_buf_init cause ghost?

static lv_color_t buf_1[MY_DISP_HOR_RES * 480] attribute((at(0XC0000000)));
lv_disp_draw_buf_init(&draw_buf_dsc_1, buf_1, NULL, MY_DISP_HOR_RES * 480);
SDRAM Result
if this object has animeated, it will has this problem.
(but if i scroll page, it will good first time and second time problem has show it)
but if the object is static, it goold.
but if i use mcu internal ram, it good and no this problem.

you invalidated the D Cache?
On STM32 you can do it like this:

thank kisvegabor for reply.

I add it, but it still has this problem.
this problem only show in dashboard tools animated.
when i use lv_chart and add data ervey 1ms, it no ghost problem.

I’ve seen this issue before. Try switching the RAM to 0x60000000 like this. There is an issue with bus contention on the other address, if I recall correctly.

I solve this problem.
this is my sdram is broken.
i use sdram as buffer, if i save 0~10.
if sdram is good, it will save 0~10.
but my sdram will read after save will show 0,0,2,2,4,4,6,6,8,8,10,10 in memory.
i change another sdram, it fix this problem.

2 Likes