What MCU/Processor/Board and compiler are you using?
- ICE Driving Board connected through SPI
- ED043WC3 ePaper display
- arm-gcc with -O1
I have an ultra-low power application that keeps the MCU in Standby mode as much time as possible.
The aim is to wake up for a push of a button, change the screen only where I have to and go back to Standby.
In Standby mode, the MCU loses all the RAM content so I have to reinitialize the system all time, including LittlevGL.
E.g. I have two labels like this:
“The target temperature is”
If the user pushes the
Target temperature increase button, I have to wake up and update only the “21” to “22”. (As it is an ePaper)
LittlevGL tries to render the full screen at every initialization, but I would need to change only a part of the screen.
It is a problem because the full update time from Standby mode is too long and gives very bad experience.
What do you want to achieve?
Do only partial updates on the screen after initialization.
Ideas about getting more control over refresh objects
Object-based event-driven refresh instead of lv_disp_refr_task.
I could set what objects and when shall be rendered. I would wake up, create label with “22” and pass it to refresh function like: lv_disp_refr_objects(lv_obj_t * disp, …);
OR Initialize Lvgl as the screen is validated by default.
Like this, I create the label only when it is changed. An only that part of the screen changes.
OR Validate function which could set the display to valid.
Not so nice way to do this, but the idea is when I create the display I immediately validate it with a function.
The same can be done with any object when it is created, but there is no need to render.
OR Able to turn on/off rendering.
The idea is that I create all the labels on the screen while the rendering is off.
After this, I turn on the rendering, change the text of the label from “21” to “22” and the LvGL will update only the temperature part.
Another way: Create any load/store functionality
I was wondering if I can store the memory of the LvGL and set it back during the initialization. LvGL would not render these objects, only if changes made on them.
What have you tried so far?
- 80 MHz clock
- Max possible size of display buffer in RAM (one-quarter of the screen)
- Max possible speed of SPI (20MHz)
- O1 optimization
Do only partial update on the screen after initalization.
- Remove lv_obj_invalidate(disp->act_scr) from lv_disp_drv_register. >> Didn`t work
- Add lv_refr_set_disp_refreshing(NULL); to hal_init assuming that I can trick(turn off) the refresh temporary. >> Didn`t work
- Add if(en_refr == true) condition to lv_disp_refr_task and switching on/off the refresh as I need. >> Doing now, but it is not so elegant way
I would be happy for any help, idea, suggestion.