Use differents cores with lv_tasks

Description

It is possible to use differents cores in a lv_tasks? For example with freertos you can use in a xTasks the xTaskCreatePinnedToCore, for core specific use in a task. My problem is in one project I have an exception that I can’t solve with a wifi task in ESP32 if I use xTask of freertos, but if I use lv_tasks I don’t have exceptions, but some tasks (display touch or data label update) take some seconds to responds because they are waiting the end of the other task, because I have a semaphore in lv_task_handler ();.

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

ESP32 with Arduino IDE

What LVGL version are you using?

v.7.9.0-dev

What do you want to achieve?

Take advantage of 2 cores of ESP32

Code to reproduce

    xSemaphoreTake(xSemaphore, portMAX_DELAY);
    lv_task_handler ();
    xSemaphoreGive(xSemaphore);
    delay(5);

     reads = lv_task_create(readMeasurements, 2000, LV_TASK_PRIO_HIGH, NULL);
     lv_task_set_repeat_count(reads, -1);
     lv_task_ready(reads);

     chartPoints = lv_task_create(indexPoints, 60000, LV_TASK_PRIO_MID, NULL);
     lv_task_set_repeat_count(chartPoints, -1);
     lv_task_ready(chartPoints);
    
     wifiTask = lv_task_create(beginWIFITask, 60000, LV_TASK_PRIO_LOW, NULL);
     lv_task_set_repeat_count(wifiTask, -1);

LVGL tasks cannot be used on different cores. You would need to use FreeRTOS tasks for that.

However, users have reported corruption issues in the past when LVGL is used by both ESP32 cores (even with mutexes). We have never been able to track down the exact problem. I suspect it is some type of caching issue, but I’m not familiar enough with the ESP32 architecture to fix it.

The workaround is usually to avoid using LVGL from two cores.