-
Notifications
You must be signed in to change notification settings - Fork 126
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
SparkFun Qwiic Micro SAMD21 - High Sleep Current #59
Comments
This is great info! I'd like to put this into our hookup guide - giving credit to you, if you don't mind? |
Hi Ed, I don't mind at all! Better yet, should this become a commit to the SparkFun board definitions? Adafruit ended up making the same change to their SAMD board definitions. Unless there's some reason I'm not aware of that requires the pins to be initialized as INPUTs? Cheers, |
That is a good point, I don't see a reason for that to be in there.... I'll update after a conversation with some coworkers around here. Thanks again @adamgarbo 👍. |
I can not believe it's been 28 days - I guess there was a holiday in there 🤔 . I've released a new build or our Arduino boards that has these changes implemented. Thanks again 👍 ! |
Hi there,
This morning I received the SparkFun Qwiic Micro - SAMD21 Development boards I ordered. The first thing I did was to measure the quiescent draw when in deep sleep and I noticed immediately that something was up. After cutting the power LED trace, I placed the board into deep sleep using the Arduino Low Power library. I ended up measuring a sleep current draw of ~350 uA and an active current draw of ~9.0 mA. This definitely gave me a sense of déjà vu, as I encountered the very same issue with my SAMD-based Adafruit Feather boards.
The good news it's a simple fix! The following lines of code need to be commented out in the wiring.c file in the SAMD board definition (lines 83-87). The SAMD21 pins are tri-stated by default, which is their lowest power consumption configuration (Section 42.6 of SAMD21 manual). Commenting out (or removing) these lines of code prevents the digital and analog pins from being set to INPUT mode.
After doing so, I was able to achieve a sleep current of ~60 uA, which is about as low as you're going to get with this board and the AP2112 LDO.
Cheers,
Adam
The text was updated successfully, but these errors were encountered: