Comments (7)
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.
@cmaglie @sandeepmistry should we remove the wakeup setting from the core and leave it in the library only?
from arduinolowpower.
@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.
from arduinolowpower.
What about breaking older projects/sketches, which "rely" on this bug and are not using LowPower.attachInterruptWakeup on all required pins?
from arduinolowpower.
@trogper Can we include a warning at compile time?
from arduinolowpower.
@sslupsky I personally have used this library only once, so I won't be affected by the change.
How would you differentiate correct usage from incorrect?
When would you show the warning? Always?
Do Arduino users/programmers read warnings if the program compiles and works? (in other words: is warning appropriate?)
Wouldn't warning bother people who use it correctly?
from arduinolowpower.
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"?
from arduinolowpower.
whatever solution is chosen, proper documentation will fix all issues and questions, i think.
another option would be to add an additional (optional) boolean parameter to attachInterrupt like standbyWakeupCapability or something like that. that way it stays in the core and is obvious to anyone who is attaching an interrupt.
from arduinolowpower.
Related Issues (20)
- Add RTC time setting and getting functionality
- Absence of README.md file
- Clock disabling code looks wrong HOT 5
- Allow access to RTC HOT 1
- Boards without SERIAL_PORT_USBVIRTUAL HOT 1
- ArduinoLowPower not working (put in Incompatible list) HOT 1
- LowPower.sleep() on Arduino MKR WiFi 1010 HOT 2
- Add GitHub Action based CI
- LowPower.idle() doesn't work as expected, and the argument to LowPower.idle(millis) has absolutely no effect. HOT 5
- ArduinoLowPower and RTCZERO.h HOT 2
- Arduino Nano RP2040 Connect not working with this library
- Add GitHub Actions workflow to synchronise with shared repository labels
- Serial not working after attachAdcInterrupt HOT 1
- Making Low Power great again HOT 1
- Compile problem in Arduino2.0 [nrf_lpcomp_input_t does not name a type] and more HOT 4
- LowPower.detachAdcInterrupt() casues issues with LowPower.attachInterruptWakeup()
- SAMD21 wrong sleep time with Seeedstudio XIAO
- attaching an InterruptWakeup before and after deepSleep breaks RTCZero::getEpoch HOT 2
- detachInterruptWakeup function HOT 1
- Calling LowPower.attachInterruptWakeup with irq_mode CHANGE causes ISR to be fired
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinolowpower.