forked from Aircoookie/WLED
-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I2C support is buggy on "V4" environments (ESP-IDF 4.4.1 / arduino-esp32 2.0.4) #7
Labels
Comments
Discussion on Userinterface aspects is here: Aircoookie#2931 |
softhack007
added a commit
that referenced
this issue
Nov 15, 2023
this is a band-aid fix for random crashes when switching between presets with multiple segments - crossfade disabled. !! adding type initializers fixed it for me on -S3, however I still see (less frequent) crashes on esp32, due to heap corruption. It took me hours to get a meaningful stackdump: assert failed: heap_caps_free heap_caps.c:360 (heap != NULL && "free() target pointer is outside heap areas") Backtrace: 0x40084ee1:0x3ffb2570 0x4008e341:0x3ffb2590 0x40094709:0x3ffb25b0 0x4008534a:0x3ffb26e0 0x40094739:0x3ffb2700 0x400e9037:0x3ffb2720 0x400e917c:0x3ffb2740 0x400eaeeb:0x3ffb2760 0x40117ec5:0x3ffb27c0 0x401184ea:0x3ffb2800 0x4013509d:0x3ffb2820 #0 0x40084ee1:0x3ffb2570 in panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:402 #1 0x4008e341:0x3ffb2590 in esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c:128 #2 0x40094709:0x3ffb25b0 in __assert_func at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/assert.c:85 #3 0x4008534a:0x3ffb26e0 in heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:360 (inlined by) heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/heap/heap_caps.c:345 #4 0x40094739:0x3ffb2700 in free at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/heap.c:39 #5 0x400e9037:0x3ffb2720 in Segment::deallocateData() at wled00/FX_fcn.cpp:189 #6 0x400e917c:0x3ffb2740 in Segment::resetIfRequired() at wled00/FX_fcn.cpp:206 (inlined by) Segment::resetIfRequired() at wled00/FX_fcn.cpp:203 #7 0x400eaeeb:0x3ffb2760 in WS2812FX::service() at wled00/FX_fcn.cpp:1216 (discriminator 2) #8 0x40117ec5:0x3ffb27c0 in WLED::loop() at wled00/wled.cpp:115 (discriminator 3) #9 0x401184ea:0x3ffb2800 in loop() at C:/src/wled00/wled00.ino:20 #10 0x4013509d:0x3ffb2820 in loopTask(void*) at C:/Users/user/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:50 ELF file SHA256: 18c20b536f4c6ef4
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
When using one of the MM "V4 max" configs with 4LD, IMU and games usermod, I see a lot of error messages, when no OLED display is connected but everything is properly configured:
When changing -any- usermod settings in the UI, similar messages appear
On ESP32-S3, the situation is even worse - ESP32-S3 seems to "lock up" during startup, and it takes several minutes before LEDs show any reaction. This also happens when usermods are "disabled".
To Reproduce Bug
-D CORE_DEBUG_LEVEL=4
- this is just to have clearer messages--> error messages related to I2C bus.
--> more I2C errors
Expected Behavior
Install Method
Self-Compiled
What version of WLED?
WLEDMM_0.14.0.9 esp32_16MB_V4_max, build 2212051.
Which microcontroller/board are you seeing the problem on?
ESP32, ESP32-S3, Other
Relevant log/trace output
Anything else?
This seems like a problem in upstream 0.14, which shows ugly consequences when compiling with
platform = espressif32@ ~5.1.1
, either for ESP32 (errors), or for ESP32-S3 (device blocked for several minutes).We need to further investigate this.
Other
1/ Issues on -S3 could be related to this : espressif/esp-idf#8543
2/ looks like the code in set.cpp/cfg.cpp does a very half-hearted job, and always tries to re-init Wire:
WLED/wled00/set.cpp
Lines 506 to 512 in a2c7078
3/ Wire.end() is available in arduino-esp32, maybe we need a different implementation with
#if WIRE_HAS_END
Code of Conduct
The text was updated successfully, but these errors were encountered: