Amount of CPU usage in v8.1 vs v8.2


Hello everybody,
I created this topic but did not reach a conclusion
so decided to use LVGL v8.2 and wait for releasing the stable v8.3,
in v8.2 the draw engine has been changed, and with this change, the amount of CPU usage is more than in v8.1, anybody has a suggestion?
Is there a problem is on my side or LVGL?
the CPU usage is about 50 percent in V8.1, while this is about 70 percent in v8.2

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


What LVGL version are you using?


What do you want to achieve?

reduce CPU usage

Hi @REZA_N ,

I have looked at your ‘chart2.txt’ file and tested it in the simulator with the latest LVGL master and it seems to work as expected.

To help you further if you are willing you could send your project (zipped up) to me at so I can look at the way you are collecting data and the general structure of your application and I may be able to advise on how best to optimise it. I have worked with the STM32f429 a number of years ago(I still have an eval board) and I still have System Workbench for STM32 installed on my system. Without knowing the structure of the code it is hard to speculate on how best to improve it. I run a number of charts in my own applications with LVGL on another ARM platform and I have not had any issues with performance with those.

If that is helpful please feel free to send your project if you are able to.

Another option might be to set up some kind of code profiling in your debugging environment if that is possible? This would allow you to get some idea of where the CPU time is being most used.



1 Like

Yes, it would be very helpful. If you can do the profiling please do it for both v8.1 and v8.2.

You can also try the latest master.

hello everyone
I found the main problem: the main problem was from the config of SDRAM, I configure SDRAM according to the stm32f429 discovery example, with this work the CPU usage was less than previous
according to your suggestion, I used the example that is for the stm32f429 discovery board and changed something parts of it to my code

in v8.2 the max CPU usage is about 60 percent after some minutes while in v8.1 this is 55 percent

this is my code:
please add this file (10.7 KB)
also, add these changes to the LVGL code in v8.2 and v8.1:
1-in the “lv_chart.c” , change “lv_chart_set_value_by_id” function to :
void lv_chart_set_value_by_id(lv_obj_t * obj, lv_chart_series_t * ser, uint16_t id, lv_coord_t value){
lv_chart_t * chart = (lv_chart_t *)obj;
if(id >= chart->point_cnt) return;
ser->y_points[id] = value;
invalidate_point(obj, id);

2-in the “lv_hal_disp.h” change "LV_INV_BUF_SIZE: parameter to :
#define LV_INV_BUF_SIZE 255