Description
Hi!
I’m using version 8.4.1 to develop a software with several screens. After running for some time function refr_invalid_areas() calls:
refr_area(&disp_refr->inv_areas[i]);
where the invalidated area is (0,0)-(0,0). This is happening because In the following cycle:
for(i = 0; i < disp_refr->inv_p; i++) {
/*Refresh the unjoined areas*/
if(disp_refr->inv_area_joined[i] == 0) {
if(i == last_i) disp_refr->driver->draw_buf->last_area = 1;
disp_refr->driver->draw_buf->last_part = 0;
refr_area(&disp_refr->inv_areas[i]);
px_num += lv_area_get_size(&disp_refr->inv_areas[i]);
}
}
disp_refr->inv_p is 1 more than the real number of areas that need to be refreshed, and therefore it’s set to all zeros.
In function refr_area() the loop:
for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row)
with area = {0,0,0,0} will never stop as:
row = area_p->y1 is 0
max_row is 0
row + max_row - 1 is -1
I don’t have a deep knowledge of LVGL so any idea about why this happens will be highly appreciated!
What MCU/Processor/Board and compiler are you using?
STM32U5, STM32CubeIDE, custom board, FreeRTOS, double buffer
What do you want to achieve?
Avoid refreshing an area that should not be refreshed (null values).
What have you tried so far?
I tried to find out why the index is higher than the real invalidated areas, with no luck. Tried to backtrace the calls, but it didn’t bring me anywhere.