lvgl / lv_port_esp32

LVGL ported to ESP32 including various display and touchpad drivers
MIT License
1.06k stars 440 forks source link

[ILI9341] Display freeze after a while #309

Closed rodrigtti closed 2 years ago

rodrigtti commented 2 years ago

We use GitHub issues for development related discussions. Please use the forum to ask questions.

Describe the issue Hi there! I used this project to show some mensage after every 4 seconds but after a while (30 min to 2 hours) the display freeze with the last message and it not update anymore , i thought it was the SPI Speed so i slow down first from 40 MHz to 20Mhz with same results and after from 20MHz to 10MHz, same results. Code to reproduce the issue is the same of this projest but i just add my style and added in the loop(another task will change the content of the labels):

while (1) { / Delay 1 tick (assumes FreeRTOS tick is 10ms / vTaskDelay(pdMS_TO_TICKS(10));

    /* Try to take the semaphore, call lvgl related function on success */
   // if (pdTRUE == xSemaphoreTake(xGuiSemaphore, portMAX_DELAY)) {
        lv_label_set_text(label, linha1);
        lv_label_set_text(label2, linha2);
        lv_label_set_text(label3, linha3);
        lv_label_set_text(label4, linha4);
        lv_task_handler();
   //     xSemaphoreGive(xGuiSemaphore);
 //  }
}

Expected Results do not freeze after a while Actual Results

ESP32 Chip version ESP32-WROOM-32U ESP-IDF version 4.3 Development kit used esp32 devkit Development machine OS windows Compilation warnings/errors (if available)

If possible, copy the compilation log into a file and attach it here

another question if i couldn't fix this issue: how could I "reset or refresh" the display after some time, to force the display to unfreeze.

Very thanks!!

rodrigtti commented 2 years ago

Guys I fixed the freezing, it's just a conflicting task when one is modifying the variable another is updating the display Solution: use the xSemaphoreTake/Give on tasks