From 7092c455f987ba794fa322f779ab0d93d628cf17 Mon Sep 17 00:00:00 2001 From: Jean Pierre Dudey Date: Wed, 11 Nov 2020 09:46:21 +0100 Subject: [PATCH] pkg/lvgl: set LVGL thread priority higher than main Using a lower priority than of the main thread would make the LVGL thread to preempt the main thread, for example, if you do a `xtimer_msleep(200);` on the main thread giving any chance for the LVGL thread to preempt it while working with LVGL on the main thread would make the CPU crash. To reproduce the bug just create various widgets, and fill them with data from a sensor that "waits" for data to be ready. Signed-off-by: Jean Pierre Dudey --- pkg/lvgl/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/lvgl/Makefile.include b/pkg/lvgl/Makefile.include index a1ca9d971d..86d3a5807e 100644 --- a/pkg/lvgl/Makefile.include +++ b/pkg/lvgl/Makefile.include @@ -19,7 +19,7 @@ LVGL_MEM_SIZE ?= 5U*1024U # Engine settings LVGL_INACTIVITY_PERIOD_MS ?= 5*MS_PER_SEC # 5s LVGL_TASK_HANDLER_DELAY_US ?= 5*US_PER_MS # 5ms -LVGL_TASK_THREAD_PRIO ?= THREAD_PRIORITY_MAIN-1 +LVGL_TASK_THREAD_PRIO ?= THREAD_PRIORITY_MAIN+1 # Set the CFLAGS variable accordingly CFLAGS += -DLV_COLOR_DEPTH=$(LVGL_COLOR_DEPTH)