You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This behaviour is new since commit esp8266/Arduino#2239, which causes wdt reset whenever serial.begin() was called again, however, this has been fixed in esp8266/Arduino#2307. Prior to all these commits NeoEsp8266AsyncUart800KbpsMethod worked fine. Currently DMA and normal UART work fine, but using async and calling serial.begin() again, even with the same serial speed, and making the stip buffer dirty, causes a wdt. @me-no-dev has suggested that the RX buffer interrupt that is now being used is shared between both Serial and Serial1. When serial is changed, something is getting messed up...
sketch below causes it
#include<NeoPixelBus.h>//NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(20, 2); // does not wdt //NeoPixelBus<NeoGrbFeature, NeoEsp8266Uart800KbpsMethod> strip(20, 2); // does not wdt
NeoPixelBus<NeoGrbFeature, NeoEsp8266AsyncUart800KbpsMethod> strip(20, 2); // causes wdtbool triggered = false;
uint32_t timer = 0;
voidsetup() {
Serial.begin(115200);
Serial.println("BEGIN 115200");
strip.Begin();
strip.Show();
}
voidloop() {
if (millis() - timer > 500) {
Serial.println("working.....");
timer = millis();
}
if (!triggered && millis() > 5000) {
if (Serial) {
Serial.println("Changing Serial\n\n");
Serial.flush();
Serial.begin(115200);
}
strip.Dirty(); // this is important.. otherwise it works. can set a color too...
strip.Show();
triggered = true;
}
}
The text was updated successfully, but these errors were encountered:
sticilface
changed the title
Using NeoEsp8266AsyncUart800KbpsMethod> and changing calling Serial.begin() again causes wdt reset.
Using NeoEsp8266AsyncUart800KbpsMethod> and calling Serial.begin() again causes wdt reset.
Jul 22, 2016
In general, calling Serial.begin() will reset hardware state which Dma and Uart methods rely on. For DMA method it is documented that you can't call Serial.begin() after calling NeoPixelBus.Begin() due to this.
The work around is to destruct the NeoPixelBus before calling Serial.begin(), and then recreate it afterwards.
The fix for this requires changes in the Esp8266 hardware serial core code to expose a model of sharing the single shared interrupt. This work is actively under construction.
This behaviour is new since commit esp8266/Arduino#2239, which causes wdt reset whenever serial.begin() was called again, however, this has been fixed in esp8266/Arduino#2307. Prior to all these commits NeoEsp8266AsyncUart800KbpsMethod worked fine. Currently DMA and normal UART work fine, but using async and calling serial.begin() again, even with the same serial speed, and making the stip buffer dirty, causes a wdt. @me-no-dev has suggested that the RX buffer interrupt that is now being used is shared between both Serial and Serial1. When serial is changed, something is getting messed up...
sketch below causes it
The text was updated successfully, but these errors were encountered: