-
Notifications
You must be signed in to change notification settings - Fork 58
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
One attachInterruptWakeup causes all interrupts to wake from deep sleep #16
Comments
This line makes the interrupt wakeup capable https://github.com/arduino-libraries/ArduinoLowPower/blob/master/src/samd/ArduinoLowPower.cpp#L93 , but it's also called in the core itself (https://github.com/arduino/ArduinoCore-samd/blob/master/cores/arduino/WInterrupts.c#L80) so once EIC clock is not stopped during sleep every configured pin can wakeup the board. |
@facchinm I think that line was added for people not using the low power lib: arduino/ArduinoCore-samd#90 I'm ok with removing it, if you think it's best. |
What about breaking older projects/sketches, which "rely" on this bug and are not using LowPower.attachInterruptWakeup on all required pins? |
@trogper Can we include a warning at compile time? |
@sslupsky I personally have used this library only once, so I won't be affected by the change. |
Good points. Maybe the object can be changed so that when the method is called you specify which external interrupt is attached. The "default" can be "all"? |
whatever solution is chosen, proper documentation will fix all issues and questions, i think. |
I have multiple standard arduino
attachInterrupt
calls and one LowPower.attachInterruptWakeup, however all interrupts cause the arduino to wake up, and none of them, if I have no LowPower.attachInterruptWakeupThe text was updated successfully, but these errors were encountered: