Refresh smaller areas to not overtax DMA2D/SDRAM-bus


Is there an option to tell the lv_timer_handler to refresh smaller areas? The problem is that the drawbuffers are in the external SDRAM and when using DMA2D in the flush-callback to copy the drawbuffer-content to the displayed screen (also fed from the external SDRAM) the image distorts for a moment (especially if some drawing is going on in the background). I’m pretty sure the bus to the external RAM can’t handle the large amount of simultaneous traffic. So I’d like to “chop” the copying processes into smaller pieces (meaning smaller refresh areas). When I copy the displaybuffer-content in a “primitive” way (pixel-wise in a for-loop) there is no problem but the CPU is under permanent strain. It’s worth mentioning that I use a rather large display (1440 x 900)

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


What LVGL version are you using?


Are you using full screen refresh? LVGL already refreshes certain areas at a time in its draw buffers:

You might try making the size of these buffers smaller, I have found 1/10th or 1/8th of the vertical resolution to be a good middleground. Smaller draw buffer sizes means drawing to the screen will be slower but it will also be less taxing on your processor and use less memory.

1 Like