Power-saving possibilities using the arduino-pico core #1544
Replies: 6 comments 23 replies
-
Just to be clear, I'm not opposed to adding sleep stuff to the core. I just don't have the equipment to do any testing so wouldn't know if it was doing anything or not. So, if someone wants to submit the deep sleep stuff as a PR, I'd be a happy camper. :) FWIW the most important thing is not to start things you don't need. For example, once an There's also lots of interesting goodies in the RP2040 datasheet (not the SDK). You can power down individual SRAM banks, for example. |
Beta Was this translation helpful? Give feedback.
-
It is not a big deal to isolate few files from Pico-SDK (pico-extra) and build an Arduino library for RP2040 'dormant' mode like I did: then I can use the library as follows:
However, the RP2040 does not look like a very power efficient SoC.
|
Beta Was this translation helpful? Give feedback.
-
Does this make sense for you ? - |
Beta Was this translation helpful? Give feedback.
-
FWIW, I have been trying various things in my sleep code to whittle down power consumption. I don't have dormant mode working yet, which ought to be the best possibility. But I did figure out that slowing the system clock before sleep is a huge win for power consumption in my fw. Right before sleep it goes to 18mhz:
And then returns to 133mhz on wakeup:
(It might be possible to go slower than 18mhz, but some lower values caused hangs/crashes so I stopped tuning it there.) I also pause PWM & DMA usage, and of course power down peripherals and LEDs and such. I haven't tried powering off the flash yet, but that's next. ATM, power consumption during sleep is 8ma . I also tried dormant mode, but I found that some interrupt kept waking it up prematurely. (If I call Or maybe it's a USB thing; I hadn't tried |
Beta Was this translation helpful? Give feedback.
-
Yesterday I managed to whittle the sleep consumption even lower, from 8ma down to 3ma. • I got the most improvement by halting the USB PLL during sleep and restarting it on wakeup. This drives the other main clock besides clock_sys. So far, this seems reliable, and it saved about 4ma. to sleep:
to wake:
• I'm pretty sure I'm not allowed to drop the sys_clk speed any lower than 18mhz with my 12mhz xtal, but I did turn the RPI's internal voltage regulator from 1.1v down to 0.9v during sleep, which saved maybe another 0.5ma. (This is done after slowing the system clock.) to sleep:
to wake:
• Putting my flash chip into power-down mode seems to save a tiny scrap of power; datasheet says 0.1-0.5ma . YMMV. Consult your flash chip datasheet and the sdk doc for With this, current consumption during sleep is down to 0.003A on my ammeter. I still haven't tried powering down SRAM. I'm not sure how to power down only the SRAM that I'm not using. Also I'm not sure how to estimate the potential power savings. But I'd love to hear about anybody else's experiments with that! |
Beta Was this translation helpful? Give feedback.
-
Hi, I have added a few things to achieve a functionality similar to the ESP32's deep sleep mode: The example also addresses time-keeping using the integrated RTC. Cheers, |
Beta Was this translation helpful? Give feedback.
-
Hi,
I know that sleep and dormant modes are not supported in this core and I don't want to talk about that here. There are more than enough threads on that by now.
What I'm interested in is, what possibilities are there to save power using this core as it stands right now? Something like, disabling peripherals, not using the second core, downclocking the Pico as much as possible, etc.
I know there are things like
__wfi()
andsleep_ms()
(which doesn't really enable any low-power modes), but honestly, I don't know of much more. So please enlighten me if you know of anything else :)Feel free to delete this question if you had enough talking about that lol
Beta Was this translation helpful? Give feedback.
All reactions