Skip to content
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

Neopixel crash with >75 pixels using ESP32 Core 3.0.x #402

Open
Nourbakhsh-Rad opened this issue Sep 13, 2024 · 6 comments
Open

Neopixel crash with >75 pixels using ESP32 Core 3.0.x #402

Nourbakhsh-Rad opened this issue Sep 13, 2024 · 6 comments

Comments

@Nourbakhsh-Rad
Copy link

Nourbakhsh-Rad commented Sep 13, 2024

I am running into an issue where after upgrading the ESP32 package from 2.0.17 to 3.0.x, Neopixel sketches with an LED count of 76 or more get into a crash loop

I am using the Adafruit_NeoPixel 'simple.ino' sketch for testing

Board: ESP32 Dev Module (ESP32-devkitC-v4)
Hardware Configuration: ESP32 Dev Module
Version: v3.0.4
IDE Name: Arduino IDE 2.3.2
Operating System: Windows 10
Flash frequency: 80
PSRAM enabled: no
Upload speed: 921600

Note that, I am using the latest version of the Adafruit_NeoPixel library and the Arduino ESP32 core 3.0.4

when using ESP32 package 2.0.17 everything is ok
with ESP32 package 3.0.x and LED_COUNT <76 everything is also ok

Similar issue reported in #401 and #9903 and #9906, the full explanation about this problem is here

@imjustger
Copy link

I encountered the same issue. My project, which uses a XIAO ESP32S3 board running ESP32 2.0.17 by Espressif Systems, worked fine until I updated the firmware yesterday. Without noticing, I upgraded to Arduino’s 3.0.5 version for the board, which now causes my microcontroller to crash whenever the Neopixel library is invoked.”The microcontroller crashes and triggers a stack overflow error (ERROR A stack overflow in task loopTask has been detected.) when running even the most basic NeoPixel control sketches.

Steps to Reproduce:
1. Set up an LED strip (SK6812 RGBW) with the XIAO ESP32S3.
2. Install NeoPixel library version 3.0.5.
3. Upload a basic sketch controlling the LED strip (e.g., a simple color wipe).

Expected Behavior:

The LEDs should work without issue, and the system should remain stable.

Actual Behavior:

•	The ESP32S3 microcontroller experiences a stack overflow error, causing crashes.
•	The error is consistently reproducible with version 3.0.5.

Temporary Fix:

Rolling back to NeoPixel v2.0.17 resolves the issue entirely. With version 2.0.17, the microcontroller operates as expected, without crashing or showing any signs of instability.

Environment:

•	Board: XIAO ESP32S3
•	NeoPixel Library: v3.0.5 (issue), v2.0.17 (working)
•	Arduino IDE: 2.3.2
•	LED Strip: SK6812 RGBW

It seems that version 3.0.5 of the NeoPixel library has compatibility or memory management issues with the XIAO ESP32S3, specifically leading to a stack overflow. Please investigate the changes in v3.0.5 that might be causing this issue. I’m happy to provide additional details if needed.

@Nourbakhsh-Rad
Copy link
Author

Nourbakhsh-Rad commented Sep 20, 2024

The problem seems to be with the esp32-hal-rmt library of the new ESP32 core (3.0.x)

@sanchosk
Copy link

sanchosk commented Oct 1, 2024

For SK6812 LED strips with white leds, the library fails the same way after 56 LEDs.

@plin2
Copy link

plin2 commented Oct 7, 2024

Same problem here:

Arduino IDE 2.3.3

Chip is ESP32-D0WD-V3 (revision v3.1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz

Set of 4 WS2812B tiles with 8x8 pixels.

Tried several ESP32 boards (hardware as well as boards in Arduino).

8x8 works fine, anything like 16x8, 8x16, 16x6 crashes.

@k11o
Copy link

k11o commented Oct 29, 2024

I've got same issue. And I dealed this with this forked library.

@plin2
Copy link

plin2 commented Oct 29, 2024

I went a completely different way. For what I need WLED is doing the job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants