Comments (9)
tested on Arduino MKRFOX1200
from arduinolowpower.
To be more precise : it works correctly if I remove power supply and restore power it. But it stops working when the device has been programmed from USB.
from arduinolowpower.
Hi @disk91 ,
this may depend on your operating system/USB connection; the code path in case of USB connection is quite different from the normal one.
Could you try reverting 8cf4c73 and see if the behaviour is the expected one (in your setup)?
from arduinolowpower.
We are seeing a similar problem. We also see that sometimes the first sleep call almost immediately returns.
Current Setup: Feather M0, using Mac to program/power, reverted the commit above as asked--
When powered from a battery (no data signal), the first call immediately returns, subsequent calls work correctly. Same for power by mac after unplugging. However, after you reprogram, the first call will never return. The reset button continues the previous behavior (ie., it does not change it to the unplugged/replug behavior).
from arduinolowpower.
I have the same problem
from arduinolowpower.
I think I have this problem as well. I think it may have something to do with the rtc. Recently I added an rtc.begin() in my setup() and this has stopped the OP’s issue from happening.
from arduinolowpower.
I found another reference to this issue:
https://forum.arduino.cc/index.php?topic=499101.0
Gormd reported that using LowPower.attachInterruptWakeup() also cleared this up. Seem's to me there is a bug here related to declaration or construction of the RTC object?
from arduinolowpower.
You could call
SerialUSB.end(); just before calling LowPower.sleep();
to stop the USB interrupts from happening and continuously waking the system
from arduinolowpower.
Hi @disk91 ,
this may depend on your operating system/USB connection; the code path in case of USB connection is quite different from the normal one.
Could you try reverting 8cf4c73 and see if the behaviour is the expected one (in your setup)?
@facchinm Is there any reason to use USBDevice.standby();
call ? I think it doesn't work in the propper way and in order to avoid issues, I would leave sleep()
function simply as this:
void ArduinoLowPowerClass::sleep() {
USBDevice.detach();
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
__DSB();
__WFI();
USBDevice.attach();
}
If standby
is used, wouldn't it be necessary to have a function to "resume" and call runInStandby()
as well standby
function calls noRunInStandby()
?
from arduinolowpower.
Related Issues (20)
- Add RTC time setting and getting functionality
- Absence of README.md file
- Clock disabling code looks wrong HOT 6
- 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.