-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
[sdk 1.5] - Random crashes when using SoftwareSerial #1326
Comments
may same as: #1211 you can create an objdump to see the function where the problem is; |
I've seen ctx:sys, Exception 0 (IllegalInstructionCause) with You can confirm if this is the case for you once you have the objdump On Tue, Dec 29, 2015 at 10:21 AM, Markus notifications@github.com wrote:
|
the current exception trace is pointing exactly to those functions
i also tried to add ICACHE_RAM_ATTR to both functions, yet - i get again exception, but this time, strangely it is in micros
i will create an issue with this information in the other repository and until it is fixed then stick with HardwareSerial or SDK 1.3 (unfortunately i lack the skills to fix it myself) |
Micros is also in flash and had to be moved into RAM since it is called On Wed, Dec 30, 2015, 14:30 vlast3k notifications@github.com wrote:
|
Great ! |
The library should still use micros, and micros should be moved to RAM. On Wed, Dec 30, 2015, 21:39 vlast3k notifications@github.com wrote:
|
Again I haven't tried to build this, but I'm guessing they are "section
conflict" errors causing the failure to build when you add the attribute on
micros. I got errors like that when moving other bits of code defined in a
.h jnto RAM.
The error was confusing as both functions that were named were in the same
section. I ultimately moved the code from .h file to .cpp file, which
resolved things. Ivan, is that the right way to avoid the conflict error?
|
actually it was due to my low C skills :) |
#1326 (comment) |
I changed in core_esp8266_wiring.c
just added the ICACHE_RAM_ATTR (apparently no including of stuff is needed, i was wrong before) |
But micros() just calls and returns system_get_time(). And also, does this not apply for millis() then? |
this is an SDK method and is apparently already in the RAM, and thus - can be invoked by interrupt handlers |
I continue to face some strange issues with SDK 1.5. Now i am using SoftwareSerial from this repository
https://github.com/plerup/espsoftwareserial to communicate with a serial device using 9600 baud
This is the code sample. i am invoking in a loop, with 200 ms delay
after several iterations (usually between 20 - 30 seconds after it started). The ESP will crash with the stack below, after dumping "read"
If happens with the latest Git, with the git few changelists after introducing SDK 1.5
With the changelist right before introducing SDK 1.5 and with the SDK 1.3 binaries it works.
The text was updated successfully, but these errors were encountered: