Hi All,
We're looking to implement a low-power version of 'deepsleep' for the Feather M0 Express (which uses the Atmel SAMD21). Our first approach has been to use the watchdog timer, following the approach taken in the Adafruit "Sleepydog" library (we'd prefer to use the lowest-power, 'standby' sleep modes, but this seemed the easiest place to begin). So far, we've been successful in being able to sleep the board from within Circuitpython -- we're just not able to wake it up again
Various readings into implementations of 'deep sleep' in Micropython have led us to believe that our problem might be with the way that Circuitpython and Mircopython handle interrupts, and possible conflicts with our call to the WFI instruction when putting the board to sleep.
Any advice / guidance/ gotchas around writing sleep functionality within Micropython would be greatly appreciated!
Our fork of Circuitpython, implementing our attempted sleep code, is here: https://github.com/edgecollective/circuitpython
Cheers,
Don & Craig