raspberrypi / pico-playground

BSD 3-Clause "New" or "Revised" License
445 stars 96 forks source link

Update pico_sleep examples #48

Closed peterharperuk closed 6 days ago

peterharperuk commented 3 months ago

Adds examples that sleep via an alarm or via an AON timer Adds dormant examples that wake on an AON timer or GPIO Fixed to work for RP2040 and RP2350

ullibak commented 1 week ago

It would be nice if there could be an example that shows how to direct the code execution to certain routines after wake-up from a low power state i.e. not to start at main(). This should be possible using POWMAN boot vector described in section 5.2.3 in the datasheet.

peterharperuk commented 1 week ago

powman is a different API. There are some simple examples here https://github.com/peterharperuk/pico-examples/tree/powman Restarting into a ram function is doable but then what? Your hardware was switched off so it all needs to be reset. So you're limited in what you can do and you may as well just run main.

peterharperuk commented 1 week ago

I'm going to merge this...