Hi everyone ,
I have created one task as below but i dont know why it is stopped working after 10 or 15 mints. i have put a printf statement in the task but nothing is coming .I want to know the reason why this task is not calling after sometime.
lv_task_create(label_refresh_task, 500, LV_TASK_PRIO_MID, NULL);
lv_task_handler still being called? Does the whole library freeze (i.e. no UI updates) or just this task?
Which version of LVGL do you use?
Does you program do a “lot of stuffs” or it just shows a static screen for 15 minutes without any user-related things in the background?
I am using v6.0.1.
I am displaying date and time in task after every 1 seconds.
struct tm *tmp ;
time_t t ;
void dynamic_display(void *args)
t = time(0);
tmp = localtime(&t);
// using strftime to display time
strftime(date_time, sizeof(date_time), "%d/%m/%y %H:%M%p", tmp);
printf("Date & Time: %s\n", date_time);
After 10/15 mints i am getting date and time in PC terminal by printf statement but it is not flashing on display, it stopped time.
The same thing i have tested with creating a thread using pthread but getting the same problem.
Where is the issue ?
It seems not the task stops working if printf works there.
So there is an OS. Are there LVGL calls in other threads than where
lv_task_handler is called? If so have you used mutex to protect concurrent calling? (See here)
What happens is you use
there is nothing problem with the lv_label_set_text. I am not calling any LVGL call in lv_task_handler.
If i am using pthread instead of “lv_task_create” then everything is working fine but by using “lv_task_create” ,screen gets freeze .
Without debugging what happens in the deep I have no idea.
lv_label_set_text works, let’s use it.