-
Notifications
You must be signed in to change notification settings - Fork 83
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
Disable BOD not working #4
Comments
Thank you for the catch! I will address it in my next batch. |
Now when I think about this more - disabling BOD might be a bad idea resulting in a corrupted flash, don't you think? |
During active operation more current will be consumed resulting in a potentially lower voltage of the coin cell. Disabling BOD during sleep (a period with low current consumption) should always result in a higher battery voltage. So disabling BOD during sleep should be safe. After sleep wakeup BOD will be enabled and if the voltage is too low should result in a reset condition. The only think you should thing about is why the CPU is fused to 8mhz as it ius not save for 3V, better run all the time with 1mhz which allows 1,8Volt VCC. (Which a 3Volt coin cell might never reach) |
One addition:
WIll take 4 Seconds instead of the intended 1 second. Can you tell me more about the reason for this delay? I guess you ran some test ;-) |
I think the current implementation violates the "4 clock cycle rule". OR ing the bits takes too much time. This results in an power down current consumption of ~27µA (BOD is active if not disabled by fuses).
I propose the following implementation of the sleep function.
There might still be room for improvement (https://github.com/LowPowerLab/LowPower/blob/master/LowPower.cpp#L41) but this solution works for me.
Now my chirp consumes only 6µA instead of 27µA during power down.
The text was updated successfully, but these errors were encountered: