Hi Kevin,
On 8 Sep 2016, at 10:41, Kevin Townsend wrote:
Hi Sterling,
I'm sure it's in the planning, but there should definately be some
sort of callback at the BSP level before going into a lower sleep
state (deep sleep or halt), as well as after wakeup. This will allow
you to configure pins accordingly to disable external pullups, avoid
as much leakage current on the GPIOs as possible, perhaps switch to a
lower voltage if you're using a special dual voltage regulator to save
power, etc. And then when we wakeup the wake callback can be used to
put the pins back to their pre-sleep state.
I assume that's what you meant though by "application hook for each
system state", but we should probably be aware of both entering and
exiting a specific state since there is BSP specific work on both
ends.
Thanks, yep - that’s the idea. I was thinking that even the drivers
wouldn’t automatically suspend, we would just provide a helper
function for the user implementing these hooks to “suspend all
drivers.” But that the shutdown / wakeup order would be per-BSP or
per-App depending on setup.
Cheers,
Sterling