Skip to content
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

ISR not in IRAM issue ESP8266 #17

Open
phenotypic opened this issue May 19, 2019 · 2 comments
Open

ISR not in IRAM issue ESP8266 #17

phenotypic opened this issue May 19, 2019 · 2 comments

Comments

@phenotypic
Copy link

Hi there,

I'm having problems using the library with the newest ESP8266 release (v2.5.1). Specifically, when trying to call:

void handleInterrupt() {
  ot.handleInterrupt();
}

It seems others have been having this issue in similar situations as you can see here. I get a very similar error message to the one I linked - something like:

ISR not in IRAM!

Abort called

>>>stack>>>

As I understand it, the correct way to solve this issue is to change the library to move the ISR into IRAM, otherwise the script never proceeds past this interrupt function. However, I'm unsure how you would do this otherwise I would've made a pull request to resolve the issue.

Do you have any ideas?

Kind regards,
Tom

P.S. I am using ESP8266 v2.5.0 for now as the issue is only with the newest version

@verner-lall
Copy link

verner-lall commented May 26, 2019

I'm not sure if this helps you since I am not using this library, but adding ICACHE_RAM_ATTR to my interrupt handler helped me. If it does not help you, maybe you need to add it to the libraries interrupt handler aswell.

void ICACHE_RAM_ATTR handleInterrupt() { //handle }

I got this information from here: esp8266/Arduino#6087 (comment)

@phenotypic
Copy link
Author

phenotypic commented May 26, 2019

@verner-lall Thank you, that does seem to fix the problem! However, it looks like a bit of a bodge - as you say, I think the better solution is to add it to the library's interrupt handler.

Any ideas on how that could be done within the library?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants