-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Illegal instruction on dscWrite #246
Comments
Try doing debug prints before the digitalwrite to see what it is that you are attempting to write and to what port. I suspect it's the input data that is at fault. I would also make sure you have a good power supply to the device. Wifi does take a bit more power. |
The digitalWrite is internal in dscKeybusInterface::dscClockInterrupt() function: dscKeybusInterface/src/dscKeybusInterface.cpp Line 690 in 3cf3653
NodeMCU is working with old dsc software for 2+ years already, just wanted to test with new FW and it started this. The exception is always the same, not floating. |
Yes, but wanted to see if the dscWritePin value is correct. LOW is a constant which is fine. |
ok, I suppose it could be a bug in the esp library. I've seen that a few times on updates. You will need to check for other bug reports from other users/projects |
Ok, so my theory is correct - downgraded to 2.7.4 - everything works fine. So it is particularly 3.0.0 update that causes this, perhaps some logic has changed, changelog need to be checked. |
Odd, I just tried 3.0.0 with my own similar library that works on Vista20's and I also use calls to digitalwrite from ISR routine and see no issues. I do see the warnings about the deprecated ICACHE_RAM_ATTR to use instead IRAM_ATTR which is fine. I will add checks later to use the right attribute for ISR functions. |
I do not use digitalWrite in ISR on my own - the dsc library does it, and exception points to that line. Try this example (https://github.com/taligentx/dscKeybusInterface/blob/3cf3653de7f5f346bd99c05af5e9c5f56b43b339/examples/esp8266/VirtualKeypad-Web/VirtualKeypad-Web.ino), make sure DSC pins are hardware connected, ant try to open http interface. I am not sure if this is NodeMCU specific issue, do not have spare Wemos atm, but since they are both 12E ESP's, I assume the issue will persist. |
Not sure when I will get a chance to try it. Also, a major revision change always introduces many breaking changes so I won't rush to update my code to it just yet until at least a minor version comes out with outstanding bugs fixed. |
Ok, I set some time aside and tried your example as well as the Homeassistant-mqtt example. The web keypad crashes as soon as you connect (as you indicated) at the same point at digitalwrite. When I tried the homeassistant-mqtt example, it worked perfectly with no resets. This tells me that the dsc library is not the problem in this case since the same library was used with both. I would suspect either the SPIFF library or another custom component used for the web keypad. I lean more towards the SPIFF handling since it was deprecated with 3.0.0 to something called LittleFS. I don't know, just guessing here. |
Just one comment. Some time ago I was trying to make some modification on the web interface like mixing with telegram notification. The problem I had was with <ESPAsyncWebServer.h> and <ESPAsyncTCP.h>. The problem I have is when trying to connect to the web keyboard, the 12E ESP reset. I was told by someone here that it is some capacity problem of the 12E ESP to manage async comunication with other stuff doing by the ESP, May be this is related also to the capabilty of handle async comunication of 12E with the new core. |
Thank you guys, for narrowing the issue to Web only. Since I am the creator of original Web example, I will port it to LittleFS and check whether it fixes the problem, if not, will continue to investigate what of used components causes this. I am closing the issue, and will pull request once port will be done and checked. |
The interesting part is that the spiffs do work fine when the dsc is not connected. It is possible like hcoiro noted that this is a resource issue as well since the new 3.0.0 might use more ram/iram. I've seen this too with other versions. |
Looks like it might be an issue with the 3.0.0 library specifically the call to calls _stopPWM(). See here: |
Hey there, I have decided to merge some new features for Web example, and found out that current stable (and dev) branches Web example does not work on ESP8266 (NodeMCU) with latest ESP8266 Core 3.0.0. The restart occur on attempt to perform http query (open in browser), failing at:
which translates as:
I am not sure what is the problem here, is it ESP thing (maybe digitalWrite is not supported in ISR routine anymore?)...
The text was updated successfully, but these errors were encountered: