-
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
LowPower.Sleep twice as long as duration is set #18
Comments
Hi @caiello3 , |
Great. Thanks for taking a look and confirming. Looking forward to an update. |
Hi @caiello3 , |
I don't think the serial port status is affecting this. I tried running the sleep function without any of the USB related lines and even with sleep(1), which should be 1 millisecond, I still get a sleep of 1 second or so. It appears that it may just take that long to restart the 48 MHz clock after shutting it down. |
@facchinm, This problem is occurring even when the serial port is not in use at all and never opened. Confirmed with power analyzer. Seen in sleeps of different lengths both under and much over one second. |
Hi! Is there any more information on this? I'm experiencing the same issue with ArduinoLowPower v1.2.2 with an Adafruit Adalogger M0 board. I am using the "TimedWakeup" example in the library, and it always sleeps for ~1s longer than I want. ie: if I modify the sleep call to: I see this power consumption, showing the processor sleeps for ~934ms, not 1ms. Is there any more information on why this happens or how to get sub-1s sleep times with this library? In our application we'd like to poll a sensor 5x per second, and sleep between polling. I've also tried detaching USB before sleep but it did not change this behavior. Thanks! |
Hello,
I am using the Arduino Low Power library with an MKR1000 board. I have found that when I implement the LowPower.sleep function the sleep cycle is lasting twice as long as the duration is set in the code. One other person has confirmed this in a separate sketch test. Please see the forum post with details and code below:
https://forum.arduino.cc/index.php?topic=624855.0
Thanks!
The text was updated successfully, but these errors were encountered: