-
Notifications
You must be signed in to change notification settings - Fork 9
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
Compatibility with ESP8266 Arduino Core v2.4 #5
Comments
I updated to Arduino IDE 1.8.5 and ESP8266 2.4.1 and tried the input and RDM device examples and did not observe any WDT resets. The RDM device example inserts a call to wdt_reset() at the end of the main loop. I added this to the DMXInputTest example. But, even when commented out, I didn't see any resets when running a continuous fade for several minutes. (The dmx source was another ESP8266 running as an Art-Net node.) |
Also, added the following to the setup() function in the DMXInputTest example: WiFi.forceSleepBegin(); //not using WiFi, sleep to prevent background activity The ESP8266 does some things with WiFi that are external to/hidden from an Arduino sketch. Not sure I have definitive information about how this works. But, if you're not using WiFi in a time critical application, turn it off. |
Thanks for looking into it. With further testing, what I am finding is that everything is fine if I don't ever call Serial.begin() on v2.4, but if I do call Serial.begin() and start receiving DMX data, the main loop stops executing semi-randomly within 5 seconds. On version 2.3 and earlier, you could use the serial port (one way) while receiving DMX data. This is the reset boot info:
Regarding Wifi.forceSleepBegin(), this does not affect my results, although I did notice that I had to #include <ESP8266WiFi.h>, so you may need to add that to your examples. I've attached a text file with the test code I'm running (almost identical to DMXInputTest.ino except for the Serial.begin(250000);). It would be nice to figure out what the issue is, although I realize that the utility of the serial port on ESP8266 is rather limited as it is, so I think for now I will just avoid using it. |
I quickly scanned over the esp8266 Arduino changelog of 2.4.0-rc1 and noticed "Implement Serial RX Buffer (#2239)". I'll look more into this change later. |
I've added a comment to indicate that the library is not compatible with DMX input. If nothing else, Serial.begin will change the baud rate and Serial.print would potentially have conflicts with the UART status register use by this library. |
Hi Claude, have you tested and verified that this library works with the ESP8266 Arduino Core beyond version 2.3? I am using a Wemos D1 Mini, and have found that running the DMXInputTest.ino example results in a WDT reset shortly after DMX packets are received. I tested by adding some Serial.print's to the sketch, and found that shortly after receiving DMX (but not always right away), the main loop seems to stop executing. The gotDMXCallback continues to be called every ~23ms like usual, until the watchdog resets the ESP. I can reproduce this issue with every version of 2.4.X so far (2.4 RC1, RC2, 2.4.1, 2.4.2), but there is no issue on 2.3 or earlier. I may find time to look into this in the next week or two, but figured I'd check if you'd come across it as well. I have been using the Arduino IDE Boards Manager to download and change versions of the ESP8266 Core.
The text was updated successfully, but these errors were encountered: