What does full_refresh do?

Important: unclear posts may not receive useful answers.

Before posting

  • Get familiar with Markdown to format and structure your post
  • Be sure to update lvgl from the latest version from the master branch.
  • Be sure you have checked the FAQ and read the relevant part of the documentation.
  • If applicable use the Simulator to eliminate hardware related issues.

Delete this section if you read and applied the mentioned points.

Description

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

What LVGL version are you using?

What do you want to achieve?

What exactly does full_refresh do when you initially set up the driver?
Right now, I think the flush_cb function is called only when there is a change on the screen, can I have the flush_cb function called periodically regardless of the screen change?

What have you tried so far?

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.

The code block(s) should be formatted like:

/*You code here*/

Screenshot and/or video

If possible, add screenshots and/or videos about the current state.

Full refresh will update the whole screen even if only one pixel changed.

To make LVGL continuously redraw the screen, just call lv_obj_invalidate(lv_scr_act()) periodically.

When should I call that function lv_obj_invalidate(lv_scr_act()) to draw it again periodically?

To be sure you can do it right after lv_task_handler()

I’m using the time interrupt callback function, do I write it like this in the callback function?

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
	lv_task_handler();
	lv_obj_invalidate(lv_scr_act());
	lv_tick_inc(5);
}

The entire screen is drawn after modifying the function as you wrote above. However, the drawing time is very slow when attempting to redraw. Do you know how to solve it?

I suggest calling only lv_tick_inc() in the interrupt and lv_task_handler and lv_obj_invalidate in the main while loop.

Which MCU do you use with what kind of display (resolution, color depth, interface)?

I am using STM32L476RG board.
The LCD is 128*128 and the color depth is set to 8. It is used as I2C communication.

As I corrected the code as I said, the HardFault_Handler error appears and does not display.

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
	lv_tick_inc(5);
}

void mian()
{
    (skip another code) 

    while(1)
    {
	lv_task_handler();
	lv_obj_invalidate(lv_scr_act());
    }
}

It’s hard to tell what causes the hardfault without any extra info. Please try the debugger as I suggested in the other topic.