These are chat archives for Makuna/NeoPixelBus

Jul 2018
Jul 02 2018 15:40
Does anyone understand why specifically bitbanging with interrupts disabled (Adafruit lib for example) on WS8266 seems to cause watchdog resets w/in minutes even when only writing to <100 leds? I understand that the WIFI stack doesn't like pauses that long (though why not, if I'm only using UDP? is it something at the lower layer?) but the software watchdog limit is 3s and I can't imagine bitbanging 100leds is going to take longer than .1s.
Michael Miller
Jul 02 2018 17:11
@igorkofman I believe you mean esp8266. Note that the Adafruit implementation was based on my original v1.0 codebase before I ran into this very issue you are mentioning. Each bit takes 12.5us to send. A normal RGB pixel is 24 bits, so a 100 pixels is about 30ms. There is a high priority interrupt used for WiFi that can not be blocked/delayed for longer than around 20us (I forget the actual length, but it was short) without causing problems. Further, this WiFi ISR would take around 12us to do its thing. The Esp8266 has different priorities for interrupts, even if you disable interrupts at a normal high priority level (rather than all), this wifi interrupts still happens which causes flickers as it messes with the timing. You can run a lot code in 20us, but you can't delay.
The history is interesting as at one point, it worked great, but an update to the Esp8266 core libraries broke it; and I was told this was to fix a WiFi bug.
You need to understand, the Esp8266 was meant to just be a WiFi processor for another CPU/uC; but we in Arduino Community seized upon its openness to do more; so there were always going to be things to work around.