earlephilhower / arduino-pico

Raspberry Pi Pico Arduino core, for all RP2040 and RP2350 boards
GNU Lesser General Public License v2.1
1.96k stars 406 forks source link

Looking for dormant mode #2299

Closed umeiko closed 1 month ago

umeiko commented 1 month ago

When I tried to set my rp2040 into sleep mode, I found there's no dormant impliments on ardiono-pico. will you make some dormant function into ardiono-pico?

I also tried to do this with pico-sdk, with hello_dormant.c. But seems pico-extra is not included in ardiono-pico, and the

#include "hardware/rosc.h"

Can't pass the compiler.

xosc_dormant();

Can't get into a ideal low-power state, still with about 20mw. but the hello_dormant.c can get a 6mw.

earlephilhower commented 1 month ago

Pico-extras is not included here, you are correct. If they finalize and QA and move functions to the SDK in the next release, it'll be here. Otherwise this is the expected behavior and if you really need xosc_dormant you'll need to pull in the sources yourself and make it work w/the core, or stick with the raw Pico-SDK + Pico-Extras.

In any case, 6mW feels like an awful high power sleep mode. I would have expected something < 1mW in modern silicon. :(