It seems sadly I can’t easily use LVGL_ESP32 driver without initializing LVGL as well. I tried several things, but it seems that LVGL_ESP32 init actually goes and initializes a timer that checks if SPI is free for a transaction. This causes it to crash in spi_ready code.
Also not sure why it’s drawing in the same place. Should I try to use the built in screenshot function to see what it " thinks" is on the display?
#define temp_size 100
lv_color_t buf_1[temp_size*temp_size];
void guiTask(void *pvParameter)
{
lvgl_driver_init();
lv_area_t left_top, right_top, middle;
lv_color_t red={0}, green={0}, blue={0};
left_top.x1=left_top.y1=0; left_top.x2=left_top.y2=temp_size;
middle.x1=100; middle.y1=100; middle.x2=100+temp_size; middle.y2=100+temp_size;
right_top.x1=200; right_top.y1=0; right_top.x2=200+temp_size; right_top.y2=temp_size;
red.ch.red=31;
green.ch.green=63;
blue.ch.blue=31;
for (int i = 0; i<temp_size*temp_size; i++){
buf_1[i] = red;
}
disp_driver_flush(NULL,&left_top,buf_1);
for (int i = 0; i<temp_size*temp_size; i++){
buf_1[i] = green;
}
disp_driver_flush(NULL,&right_top,buf_1);
for (int i = 0; i<temp_size*temp_size; i++){
buf_1[i] = blue;
}
disp_driver_flush(NULL,&middle,buf_1);
while(1) vTaskDelay(1000 / portTICK_PERIOD_MS);;
}
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4002bd01 PS : 0x00060031 A0 : 0x8002c73c A1 : 0x3ffcc9b0
0x4002bd01: spi_ready at F:\Programming\ESP32-Sensor-Software\build/../components/lvgl_esp32_drivers/lvgl_tft/disp_spi.c:316
A2 : 0x3ffde224 A3 : 0x3ffcf3cc A4 : 0x22341313 A5 : 0x00000000
A6 : 0x3ffccc00 A7 : 0x00000050 A8 : 0x8002bd01 A9 : 0x3ffcc980
A10 : 0x00000000 A11 : 0x22341313 A12 : 0x22341313 A13 : 0x3ffd8be0
A14 : 0x00060523 A15 : 0x00000000 SAR : 0x0000001d EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x22341313 LEND : 0x3ffd8be0 LCOUNT : 0x4002b465
0x4002b465: _xt_user_exc at F:/Programming/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:633
Core 0 was running in ISR context:
EPC1 : 0x40083ea5 EPC2 : 0x00000000 EPC3 : 0x00000000 EPC4 : 0x00000000
0x40083ea5: panic_print_str at F:/Programming/esp-idf/components/esp_system/panic.c:126
Backtrace:0x4002bcfe:0x3ffcc9b00x4002c739:0x3ffcc9e0 0x4002c8e9:0x3ffcca10 0x4002b586:0x3ffcca40 0x40096bc3:0x3ffd8c80 0x40114cc7:0x3ffd8cb0
0x4002bcfe: spi_ready at F:\Programming\ESP32-Sensor-Software\build/../components/lvgl_esp32_drivers/lvgl_tft/disp_spi.c:308
0x4002c739: spi_post_trans at F:/Programming/esp-idf/components/driver/spi_master.c:579 (discriminator 1)
0x4002c8e9: spi_intr at F:/Programming/esp-idf/components/driver/spi_master.c:613
0x4002b586: _xt_lowint1 at F:/Programming/esp-idf/components/freertos/port/xtensa/xtensa_vectors.S:1111
0x40096bc3: esp_vApplicationIdleHook at F:/Programming/esp-idf/components/esp_system/freertos_hooks.c:50
0x40114cc7: prvIdleTask at F:/Programming/esp-idf/components/freertos/tasks.c:3974
ELF file SHA256: f66a23e3d885963d
CPU halted.