Skip to content
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

Use Adafruit Sleepy Dog library? #466

Open
SRGDamia1 opened this issue May 16, 2024 · 1 comment
Open

Use Adafruit Sleepy Dog library? #466

SRGDamia1 opened this issue May 16, 2024 · 1 comment

Comments

@SRGDamia1
Copy link
Contributor

Try their library instead of writing it all myself: https://github.com/adafruit/Adafruit_SleepyDog

@neilh10
Copy link
Contributor

neilh10 commented Aug 27, 2024

Hey interesting stuff :). ea7449e

I found a whole layered lot of per machine tradeoffs between mega128x, SAMD21 and SAMD51 - typically given the name Hardware Abstraction Layer, and pretty painful. And as you seem to be making work differences between '21 and '51

I found challenges on how to handle the builtin USB interface with low power and sleep.
On SAMD51 I tried lowering the clock speed to save power, to 48MHz I think - which worked. Then I tried to figure out if during sleep I could turn of the USB to save power - which is a major power hog - and then on waking to see if I could poll to see if the USB wires plugged in before turning it on. However that didn't work. For the SAMD51 I couldn't figure out how to turn on the USB reliably after it had been sleeping.
A possible tradeoff is to use USB for upgradeing and simple debugging (with no sleep) and then have an option to turn off USB completely after powerup to save power, and use a UART to debug. Though I haven't got there.
Maybe you have found a different tradeoff that works. :)

I also ran into issues with "time" libs incompatibilities, and used the NAME space to tradeoff between the same name for different libs. #415
Maybe sleepyDog solves that, I haven't looked.
I have had the samd51/Wio Term working for some time, but as a beta, and not sleeping. https://www.envirodiy.org/topic/using-samd51-wio-terminal/

Another way of thinking about this might be to have the whole processor and subsystems turned off. No power used. Then have the external clock activate the power when needed. Its a hardware change - would definitely be no power when off, but might have a high risk for peripherals in being turned off completely. On power up need to detect a "warm boot" v "cold boot". full subsystem initialization. One example "M5 stack station" https://docs.m5stack.com/en/core/station_485

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants