-
Notifications
You must be signed in to change notification settings - Fork 8
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
Interrupts broken on latest Arduino Libraries #11
Comments
Hi @davidgs It's been awhile I've not played with my Arduino(s). Does it happens at compile time? Or while uploading or running the program? |
It happens at runtime because the interrupt handlers now need to be defined: The library doesn't handle this new RAM_ATTR setting for callback handlers. This will also impact how values are handled since you can't really |
The external handlers (registered with However indeed the _internal_handlers are true interrupts and are not defined with I try a fix and I'll invite you to test it. PS. Can you tell me which board do you use to test? This seems a esp8266 related only issue. source1 source2 source3 (to install the board: instructions) |
@davidgs could you test the library with the patch from the branch https://github.com/MonsieurV/ArduinoPocketGeiger/tree/ESP8266_irq? (To test with this library, download or clone the repository from the branch I've added the |
I'm running it now, and it throws no errors (progress!) but it also registers nothing. I can even tap on the sensor and it generates no noise interrupts. |
Hum, interesting. I wonder if the interrupts are well defined and/or registered. If you add a debug Can you have a way to validate the wiring by creating a simple sketch program just to see if IRQ are working? (For eg. setting an IRQ on the noise pin, then incrementing a counter or setting a flag and printing it from the main loop, just to see if the IRQ is triggered) |
I'm running this code, and interestingly, if I tab on the sensor, I get the series of
|
Oh, very interesting! Seems like it's now doing something. And if you remove the debug statement, does it works now? |
Yes, without the debug it seems to work just fine. It's been running now for 24 hours without incident. I believe the same interrupt situation is going to present itself on ESP32 systems. I'm about to move this over to an ESP 32 so I'll let you know. A conditional Macro for ESP32 might also be required. I'll let you know what I find. |
Ok, so our fix seems to work. We can easily roll out to other platforms if needed. I'll wait for your test on ESP32 before merging and releasing a new version :) |
Move interrupt handlers to RAM for ESP8266 platform #11
I've released a new version with the patch. Thanks for the report @davidgs! 👍 Feel free to re-open / open a new issue for ESP32. |
On the latest Arduino Libraries, using interrupts has changed significantly. Your code generates : `ISR not in IRAM!
Abort called`
I'm looking at how to fix it, but so far have not found a solution.
The text was updated successfully, but these errors were encountered: