Hello, I’ve got an issues where my widgets are flickering like in the attached video.
What MCU/Processor/Board and compiler are you using?
STM32H743IIT6 + SDRAM + LTDC Screen (custom board) with ChibiOS and GCC
What LVGL version are you using?
Current master (9.3)
What do you want to achieve?
Remove the flickering
What have you tried so far?
Using direct render mode and double buffering, additionally ported all RTOS functions to ChibiOS
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.
Did you tried single buffer or smaller buffer or use samller buffer in internal ram?
I meet this issue before i think its probably associated about ram band width.
How many bit did you SDRAM have?
Single buffering is way worse, the flickering happens on way more objects.
As for the question about SDRAM im unsure what you mean exactly, its a w9825g6kh-5
//Edit
Played a bit with timings but best I’ve got stable was 120Mhz/CL2 anything above would hardfault.
//Edit 2
Tried now partial mode with two full sized buffers and the issue is gone, however a new artifact appeared on the top of the screen shown on video below. Tried playing around with the size of the buffers but this didnt make the artifact to dissapear.
I think maybe the speed of SDRAM its not enough for LTDC DRIVER and LVGL drawing. If you draw whole screen at a time it probably cause the issue。
I meet this issue in STM32H7 with 1 16 bit SDRAM W9825G6KH,
Then i tried another board witch its also STM32H7 but have 2 W9825G6KH (32 bit).and the issue its gone. so i think its about the speed of SDRAM.
About you new issue, try to move you buffer base address to another place?
it seens like apart of you code its reuse this area ram.
Actually nothing in the sdram (where the frame buffers are) is set via addresses. The linker script has a section for the sdram and the arrays are normally defined in the code.
Use linker section seems be no good idea. Read LTDC appnote about condition for start frames align and optimalization of banks etc.
I pref reserve in linker space for buffers as exclude area. And use direct area address . Is pixel in top bad area static or changing? Introduction to LCD-TFT display controller (LTDC) on STM32 MCUs - Application note
The pixels in the top row are chaning according to the sliders / arc they are not static.
In terms of the declaration of the frame buffers I dont see an issue where something should try accesing their memory space if they are declared in my way.
What exactly would You like to see?
In terms of flushing its handled by the lvgl driver to which I pass two buffers like the lvgl documentation shows. Unless im forgetting something?
For direct render mode, invoke lv_st_ltdc_create_direct() like this:
void * my_ltdc_framebuffer_address = (void *)0x20000000u;
uint32_t my_ltdc_layer_index = 0; /* typically 0 or 1 */
lv_display_t * disp = lv_st_ltdc_create_direct(my_ltdc_framebuffer_address,
optional_other_full_size_buffer,
my_ltdc_layer_index);
my_ltdc_framebuffer_address **is the framebuffer configured for use by LTDC**.
against partial
For partial render mode, invoke lv_st_ltdc_create_partial() like this:
static uint8_t partial_buf1[65536];
static uint8_t optional_partial_buf2[65536];
uint32_t my_ltdc_layer_index = 0; /* typically 0 or 1 */
lv_display_t * disp = lv_st_ltdc_create_partial(partial_buf1,
optional_partial_buf2,
65536,
my_ltdc_layer_index);
**The driver will use the information in the LTDC layer configuration** to find the layer's framebuffer and flush to it.
then if you read carefully for partial LTDC isnt set with this func and require other config… But primary no same buffer as LTDC.