Best possible render time with the setup below.
MCU - STM32U585
SPI Display - 128x400 LCD
UI - Custom images and animations on it, like a slider and a progress bar, are prepared.
Custom slider screen render time is around 40ms. On concurrent use of the same, it goes around 70ms. Whereas the actual slider widget render time is around 20ms.
How to achieve the best render time?
What are the possible optimization techniques?
Any reference available for render time calculation and comparison?
However, to measure the render time with default LVGL functionality, when we enable the macros, “#define** LV_USE_SYSMON 1” & “#define** LV_USE_PERF_MONITOR 1”, lv_init() fails.
We are trying to measure render time manually with the GPIO as follows:
HAL_GPIO_WritePin(RENDER_TIME_GPIO_Port, RENDER_TIME_Pin, GPIO_PIN_SET);
lv_timer_handler();
HAL_GPIO_WritePin(RENDER_TIME_GPIO_Port, RENDER_TIME_Pin, GPIO_PIN_RESET);
Please let us know if you have any suggestions.
Please find attached lv_conf.h file for your reference.
Does the display you are using have built in memory? If you don’t know then tell me what the model number is for the display IC and I will tell you if it does or doesn’t.
It sounds like you are using a single buffer that is width * height * bytes_per_pixel in size. If the display you are using has built in memory (GRAM) then you can actually set that size so it is a lot smaller. like 1/10th the size. make 2 buffers that size and allocate them in DMA memory and set up proper double buffering using DMA with setting the render type to PARTIAL in lvgl. Don’t forget you will need to register a callback with the SPI driver for your MCU to get signaled that a transmission has completed. in that callback is when you call the flush ready function in lvgl.
Enabling double buffering using partial buffers is going to be a lot faster. 40mhz SPI is slow to begin with and that is going to be your bottleneck especially with a display that is 128 * 400 in size. That’s a lot of data it is going to be sending at a pretty slow speed.
@kdschlosser ,
We have tried the partial frame buffer, but when the frame was uploaded to display over SPI, only some part of the display got updated, and not the full display. So, this approach does not work for us.
While using the double frame buffer, render time is already coming high. So, it’s not helping much.
Could you help to confirm whether the way we are measuring render time is correct or not? Is there any other way to measure the render time?
When using the default LVGL macro “LV_USE_PERF_MONITOR” to measure it, the LVGL init crashes. Do you have any suggestion that how we can enable it so that the LVGL itself print the render time?