bbulkow / FastLED-idf

FastLED port to the ESP-IDF 4.0 development environment
https://fastled.io/
MIT License
162 stars 41 forks source link

esp-idf v4.2 rmt_set_tx_thr_intr_en() panic #13

Closed drewandre closed 4 years ago

drewandre commented 4 years ago

Hi @bbulkow, thanks for this great port. Cloning this repo fresh, copying the sdkconfig.4-1 to sdkconfig, and running the example against esp-idf v4.1 results in an rmt_set_tx_thr_intr_en() panic as described on this esp-idf issue (stacktrace copied below). I understand this is an issue introduced in esp-idf v4.1 as you discussed on this other esp-idf issue.

I'm just wondering, what would you suggest users of your fork to do in this situation? It's somewhat difficult to follow where this interrupt handler issue is headed and whether it would be solved by the espressif team, or if your port needs to address it. Should we just stick to v4.0 for now? I have some ota over ble bugs that were fixed in 4.2 and I'm looking to upgrade, but this is the one issue holding me up.

Thanks again!

EDIT: What I'm mainly asking is if there is a way to use fastled with esp-idf 4.2, whether that be this library or not. I was having trouble getting arduino-esp32 to run again esp-idf 4.2 which is why I moved from using the main FastLED library to this port so I could ditch arduino-esp32 entirely. But now there's this RMT issue. So if there is another port or approach to getting fastled and esp-idf to play nicely together, I'm all ears!

 entering app main, call add leds
 set max power
create task for led blinking
W (384) FastLED: controller init
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d55a0  PS      : 0x00060833  A0      : 0x800d4818  A1      : 0x3ffaf8a0
0x400d55a0: rmt_set_tx_thr_intr_en at /Users/drewandre/esp/esp-idf/components/driver/rmt.c:389 (discriminator 2)

A2      : 0x00000000  A3      : 0x3ffb1390  A4      : 0x00000020  A5      : 0x3ffb1390
A6      : 0x000000b0  A7      : 0x00000000  A8      : 0x00000034  A9      : 0x00000000
A10     : 0x00000001  A11     : 0x00009470  A12     : 0x3ff560b0  A13     : 0xefffffff
A14     : 0xfff7ffff  A15     : 0xffffffbf  SAR     : 0x00000020  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffd

ELF file SHA256: 005f4b4fdb53c297

Backtrace: 0x400d559d:0x3ffaf8a0 0x400d4815:0x3ffaf8d0 0x4008294d:0x3ffaf910 0x400d424f:0x3ffaf940 0x400d4641:0x3ffaf9a0 0x400d3b56:0x3ffaf9e0 0x400d1e54:0x3ffafa10
0x400d559d: rmt_ll_set_tx_limit at /Users/drewandre/esp/esp-idf/components/soc/esp32/include/hal/rmt_ll.h:177 (discriminator 2)
 (inlined by) rmt_set_tx_thr_intr_en at /Users/drewandre/esp/esp-idf/components/driver/rmt.c:389 (discriminator 2)

0x400d4815: _ZN18ESP32RMTController4initEv$part$2 at /Users/drewandre/Downloads/my-test-project/build/../components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.cpp:119

0x4008294d: ESP32RMTController::showPixels() at /Users/drewandre/Downloads/my-test-project/build/../components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.cpp:92
 (inlined by) ESP32RMTController::showPixels() at /Users/drewandre/Downloads/my-test-project/build/../components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.cpp:147

0x400d424f: CPixelLEDController<(EOrder)10, 1, 4294967295u>::show(CRGB const*, int, CRGB) at /Users/drewandre/Downloads/my-test-project/build/../components/FastLED-idf/platforms/esp/32/clockless_rmt_esp32.h:359
 (inlined by) CPixelLEDController<(EOrder)10, 1, 4294967295u>::show(CRGB const*, int, CRGB) at /Users/drewandre/Downloads/my-test-project/build/../components/FastLED-idf/controller.h:408

0x400d4641: CFastLED::show(unsigned char) at /Users/drewandre/Downloads/my-test-project/build/../components/FastLED-idf/controller.h:90
 (inlined by) CFastLED::show(unsigned char) at /Users/drewandre/Downloads/my-test-project/build/../components/FastLED-idf/FastLED.cpp:59

0x400d3b56: _fastfade_cb(void*) at /Users/drewandre/Downloads/my-test-project/build/../components/FastLED-idf/FastLED.h:506
 (inlined by) _fastfade_cb at /Users/drewandre/Downloads/my-test-project/build/../main/main.cpp:103

0x400d1e54: timer_process_alarm at /Users/drewandre/esp/esp-idf/components/esp_common/src/esp_timer.c:306
 (inlined by) timer_task at /Users/drewandre/esp/esp-idf/components/esp_common/src/esp_timer.c:327

Rebooting...
drewandre commented 4 years ago

Closing as this was resolved by updating to the esp-idf release/v4.2 branch.