Description
I am trying to create my first lvgl user interface. I am able to compile and run the demo programs, and the hardware appears to be working correctly.
Using Squareline I have created a ui with a couple of buttons that swap screens, report button presses, and reports a slider position. This is the result of piecing together info from several separate tutorials, as I was unable to find a single tutorial for the whole process using vscode IDF.
Knowing no better, my starting point was the 08_lvgl_demo_v9 demo program, and I have managed to add the Squareline ui to that, not without difficulty since I lacked an end-to-end tutorial.
My problem is that while the ui appears and initially works, after a short time the touchscreen stops responding, and the lv_timer_handler() call in the main loop appears to have hung. This appears to be happening when I touch the screen.
What MCU/Processor/Board and compiler are you using?
ESP32-P4-WIFI6-Touch-LCD-5
ESP32-IDF in vscode under Linux - fresh install
lvgl version 9.5
This is my main loop:
while(1){
lv_timer_handler();
vTaskDelay(10 /portTICK_PERIOD_MS);
}
What do you want to achieve?
I want to know how to modify my project, or discover an better starting point to recreate my project, so that the touch screen does not hang.
I also want to understand the how and where to properly set the lvlg memory size.
What have you tried so far?
I have tried altering the loop delay. I know the recommended loop delay is 5ms, but deviating from the 10ms I have, just makes the ui lock up sooner.
I have tried turning on lvgl logging, but it has not reported an issue when the program hangs.
After various web searches, including the FAQ, I suspect a memory setting may need altering.
I tried copying lvgl__lvgl/lv_conf_template.h to lvgl__lvgl/lv_conf.h and changing #if 0 to #if 1 as instructed. However, the compiler does not recognise LV_MEM, or LV_MEM_SIZE when I try to print them out.
I do find the instruction “Copy lvgl/lv_conf_template.h as lv_conf.h next to the lvgl folder” a bit ambiguous. ‘next to’? Perhaps I have misunderstood the instruction?
It may be that what I need is proper instruction on how to set the memory LV_MEM.
Code to reproduce
Add the relevant code snippets here.
The code block(s) should be between ```c and ``` tags:
/*You code here*/
Screenshot and/or video
If possible, add screenshots and/or videos about the current state.