-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Rapid NeoPixel updates cause apparent hang on ESP32-S3 #9369
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
Comments
In fact, we can get even simpler:
In case it's of significance: most of the time, the LED stays solid white, but sometimes it goes solid blue. |
Good news: it works correctly within |
Workaround found! (it may have relationship with the issue ~ IDF | FreeRTOS related?) void setup()
{
Serial.begin(115200);
Serial.println("");
Serial.println("");
}
void loop()
{
Serial.println("blink slow");
for (auto i = 0; i < 10; i++)
{
digitalWrite( LED_BUILTIN, i & 1 );
//neopixelWrite( 47, i & 1, i & 1, i & 1); // 47 is Lolin S3 onboard LED
delay(100);
}
Serial.println("blink fast");
for (auto i = 0; i < 10; i++)
{
digitalWrite( LED_BUILTIN, i & 1 );
delay(1); // <<<<<<<<<<<<<<<<<< this delay fixes it.
//neopixelWrite( 47, i & 1, i & 1, i & 1);
}
} |
Root cause found... problem is in the |
Confirmed. Thanks, @SuGlider. ps. I also tried the fix in PlatformIO. I don't know whether I need to raise the same issue with those guys, or if you share fixes. |
No need to raise any issue with PlatformIO. They use the code from this repository. I think that @Jason2866 maintains a set of PIO packages that use to be up to date with the changes we add here. |
For core 2.0.x it is easy to use the latest version from here. Just change your setup like this:
|
Thanks @Jason2866 !! |
Closed by #9374 - ready for Core 2.0.15 release. |
Board
Lolin S3 mini
Device Description
Bare Lolin S3 mini board. Nothing attached but USB and a serial monitor.
Hardware Configuration
FTDI cable attached to TX (43), RX (44), and Ground.
Version
v2.0.13
IDE Name
Arduino IDE (also seen with PlatformIO)
Operating System
N/A (but actually Linux Mate)
Flash frequency
240 MHz
PSRAM enabled
Unsure
Upload speed
921600
Description
I have a sketch that blinks a status LED at a rate of 10 Hz (from a Ticker). If the CPU gets busy, the updates get bunched together in a burst and the system locks up. This lock up has not been seen on boards with a conventional status LED.
I've replicated this with the example provided. If the
digitalWrite
in the second loop is commented out, the program continues and the status LED blinks forever. The same effect is seen with theneopixelWrite
variant.Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: