-
Notifications
You must be signed in to change notification settings - Fork 88
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
Fixed powerDown-Dps2.ino #282
Conversation
Thank you for reviewing the examples. |
However, a 1-second sleep lasts much longer than 1 second. |
I also found that the parameters for LowPower.adcNoiseReduction() and LowPower.powerDown() in lgt_LowerPower/readme.md do not match the allowed parameters. In the examples it's all good. I forgot to say: Thank you for your great work on this library! I took a LQFP32 "Pro Mini" MiniEVB, removed the LEDs and the voltage regulator, supplied it with 5 V and tested the sleep modes with regards to the supply current. This is what I found: Fantastic! |
The error in readme.md comes from the fact that the datasheet does not seem completely clear, so at first I experimented with more variable parameters than what was included in the final version. For example, switching the main clock to 32kHz did not reduce the current draw in DPS0 or DPS1 mode. The another interesting thing for me was that I measured the same current consumption in both DPS0 and DSP1 modes. According to my measurement I measured the same current consumption in DPS0/1/2 modes than you. In a few days I will merge your changes. |
I wrote the examples so that if you don't remove the LED off from D13 output you still measure the same current values in DPS0/1 modes. But not in DPS2 mode. |
You are right. In order to test your examples it makes no sense to remove the LEDs. But the purpose of my tests was different. I wanted to measure how far you get down in power consumption. And for this I didn't want that any LED would comsume power. I tested the different sleep modes with this sketch by uncommenting the relevant lines:
|
The CI broke somehow, I'll fix it soon and release |
released |
Found a bug in powerDown-Dps2.ino:
IOCWK = PORTD2) | PORTD4);
should be
IOCWK = (1<<PORTD2) | (1<<PORTD4);
And some issues in the comments.