MMlodzinski / Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example

An example to show how to use LCD display and touch with LVGL on ESP-IDF framework for Sunton ESP32-8048S070c devboard.
33 stars 8 forks source link

Crash after boot #5

Closed rkoscikas closed 1 month ago

rkoscikas commented 1 month ago

Hello! I tried to compile you code and ESP crashes with following results right after starting LVGL task:

Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.

Core 0 register dump: PC : 0x4200ae7d PS : 0x00060031 A0 : 0x80377268 A1 : 0x3fca4620
--- 0x4200ae7d: lvgl_port_flush_rgb_vsync_ready_callback at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/espressif__esp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c:424

A2 : 0x3c0a0c10 A3 : 0x00000000 A4 : 0x3fcbeb84 A5 : 0x3fcbbb1c
A6 : 0x00000000 A7 : 0x00000000 A8 : 0x8200ae68 A9 : 0x3fca4600
A10 : 0x00001219 A11 : 0x00060023 A12 : 0xb33fffff A13 : 0x3fca9870
A14 : 0x3fca6e8c A15 : 0x00000001 SAR : 0x00000017 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00001241 LBEG : 0x40056f5c LEND : 0x40056f72 LCOUNT : 0x00000000
--- 0x40056f5c: memcpy in ROM 0x40056f72: memcpy in ROM

Backtrace: 0x4200ae7a:0x3fca4620 0x40377265:0x3fca4650 0x40377472:0x3fca4670 0x403885a2:0x3fca4690 0x40386d85:0x3fca46c0 0x40382d01:0x3fcbd870 0x42034543:0x3fcbd8c0 0x42010a85:0x3fcbd940 0x4200e9e2:0x3fcbda30 0x4203271e:0x3fcbda50 0x42032756:0x3fcbda80 0x420327c9:0x3fcbdaa0 0x42033d45:0x3fcbdac0 0x4202b732:0x3fcbdb40 0x4204ea09:0x3fcbdc00 0x4202c4c4:0x3fcbdc20 0x4202c54c:0x3fcbdc40 0x420313e1:0x3fcbdc80 0x420316e1:0x3fcbddc0 0x42031a6c:0x3fcbdec0 0x42031bd8:0x3fcbdef0 0x4203228a:0x3fcbdf20 0x420175f6:0x3fcbdfb0 0x42017759:0x3fcbdfe0 0x4200a795:0x3fcbe000 --- 0x4200ae7a: lvgl_port_flush_rgb_vsync_ready_callback at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/espressifesp_lvgl_port/src/lvgl9/esp_lvgl_port_disp.c:422 (discriminator 1) 0x40377265: lcd_rgb_panel_fill_bounce_buffer at /home/roman/src/ESP/test2/esp-idf/components/esp_lcd/rgb/esp_lcd_panel_rgb.c:836 0x40377472: lcd_rgb_panel_eof_handler at /home/roman/src/ESP/test2/esp-idf/components/esp_lcd/rgb/esp_lcd_panel_rgb.c:869 0x403885a2: gdma_default_tx_isr at /home/roman/src/ESP/test2/esp-idf/components/esp_hw_support/dma/gdma.c:856 0x40386d85: _xt_lowint1 at /home/roman/src/ESP/test2/esp-idf/components/xtensa/xtensa_vectors.S:1240 0x40382d01: lv_draw_sw_blend_color_to_rgb565 at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/sw/blend/lv_draw_sw_blend_to_rgb565.c:250 0x42034543: lv_draw_sw_blend at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/sw/blend/lv_draw_sw_blend.c:95 0x42010a85: lv_draw_sw_fill at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/sw/lv_draw_sw_fill.c:68 0x4200e9e2: execute_drawing at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/sw/lv_draw_sw.c:506 (inlined by) execute_drawing_unit at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/sw/lv_draw_sw.c:383 (inlined by) dispatch at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/sw/lv_draw_sw.c:463 (inlined by) dispatch at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/sw/lv_draw_sw.c:430 0x4203271e: lv_draw_dispatch_layer at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/lv_draw.c:276 0x42032756: lv_draw_dispatch at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgl__lvgl/src/draw/lv_draw.c:182 0x420327c9: lv_draw_finalize_task_creation at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/lv_draw.c:147 0x42033d45: lv_draw_rect at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/draw/lv_draw_rect.c:191 0x4202b732: lv_obj_draw at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_obj.c:619 (inlined by) lv_obj_event at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_obj.c:872 0x4204ea09: lv_obj_event_base at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_obj_event.c:89 0x4202c4c4: event_send_core at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_obj_event.c:364 0x4202c54c: lv_obj_send_event at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_obj_event.c:67 0x420313e1: lv_obj_redraw at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_refr.c:116 0x420316e1: refr_obj at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_refr.c:1032 0x42031a6c: refr_obj at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_refr.c:1017 (discriminator 1) (inlined by) refr_obj_and_children at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgl__lvgl/src/core/lv_refr.c:820 (discriminator 1) 0x42031bd8: refr_area_part at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_refr.c:753 0x4203228a: refr_area at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_refr.c:647 (inlined by) refr_invalid_areas at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_refr.c:586 (inlined by) lv_display_refr_timer at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/core/lv_refr.c:398 0x420175f6: lv_timer_exec at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/misc/lv_timer.c:326 (discriminator 2) (inlined by) lv_timer_handler at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgllvgl/src/misc/lv_timer.c:107 (discriminator 2) 0x42017759: lv_timer_handler at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/lvgl__lvgl/src/misc/lv_timer.c:71 0x4200a795: lvgl_port_task at /home/roman/src/ESP/test2/Sunton_ESP32-8048S070c_ESP_IDF_LVGL_example/example/managed_components/espressifesp_lvgl_port/src/lvgl9/esp_lvgl_port.c:250

LVGL port version is 2.4.1. Tried with IDF versions 5.3 and 5.4 and LVGL 9.2.0 and 9.2.2 with same results.

Any idea if the problem is with your code or LVGL port/LVGL?

MMlodzinski commented 1 month ago

@tommasoclini have you encountered such a problem during development?

tommasoclini commented 1 month ago

Considering the amount of issues related to lvgl port(https://github.com/espressif/esp-bsp/issues), I believe it's the new version that's causing the problem, my bad for not specifying the exact versions in the component manifest, I'm testing which version works now.

tommasoclini commented 1 month ago

It appears to be version 2.3.3 of esp_lvgl_port that introduced the bug, I'll create a pull request with the updated manifest.

tommasoclini commented 1 month ago

@rkoscikas can you try the fix? As of now it's in my fork's main branch.

rkoscikas commented 1 month ago

You guys are sure reacting quick, thank you. I will try your code as soon as I get home from work, but I was actually able to get the code working yesterday by using lv port 2.3.1, so I am sure your code will work fine. Tried number of different combinations, turns out that LVGL 8.4 works OK with lv port 2.4.1. With lv port 2.3.1 both LVGL 8.4 and 9.2.2 worked fine for me.

tommasoclini commented 1 month ago

Hit me up when you try 2.3.2 with both LVGL 8.4 and 9.2.2.

rkoscikas commented 1 month ago

Confirmed, 2.3.2 works correctly with both LVGL 8.4 and 9.2.2 . I guess this is closed? Thank you!

tommasoclini commented 3 weeks ago

@MMlodzinski can you merge my PR?

MMlodzinski commented 2 weeks ago

done

tommasoclini commented 2 weeks ago

thx