Raspberry Pi Pico Deep Sleep Low Power Tutorial | Rising Signal Wake-Up on the RP2040
In this video, we explore different ’deep sleep’ methods on the Raspberry Pi Pico RP2040. By putting the processor into a ’deep sleep’ we can use less power during times where executing code isn’t important. Deep sleep on the RP2040 allows us to use less power and ultimately make our Raspberry Pi Pico projects way more efficient.
Check out my channel for more videos like this on the Raspberry Pi Pico, ARM Assembly, debugging, and much much more!
Buy the RP2040:
Chapters
0:00 Intro
0:11 Baseline
1:10 Sleep?
1:49 How Does Sleep Work?
2:38 Deep Sleep Library
3:00 RTC Alarm Sleep
4:44 Rising Edge Deep Sleep
6:39 Outro
#raspberrypi #raspberrypipico #rp2040
Join us on Discord:
===
yeah and you’ll see here the results are pretty disappointing actually we lose a little bit of current which means that the power has gone down a little bit but we’re still pulling in the same amount of power as just no opting in a loop so you gotta ask why does that happen well let’s dive into the instructions of the actual sleep code and see how that works so here we are in the picosdk we’re actually at the code that executes the sleep ms function sleep ms is just sleep milliseconds and it ends up just calling sleep microseconds with your time times a thousand if you go to the sleep microseconds function that is just a sleep until function if alarm pools are not disabled which they’re not by default and then if you actually go into the code after a couple checks get done to see if you’ve gotten to the point where you should be done sleeping the code is just the wfe micro instruction which is an assembly instruction in c um and wfe is just wait for event which executes as a knob on the target so again our sleep functionality which you would think gives you lower power consumption faster code execution while sleeping no it’s just a knob now when i was making this video i was starting to get really disappointed because i felt like there was no code in the pico sdk library that actually implemented the deep sleep functionality of the arm cortex processor but then in looking around i discovered that raspberry pi put out this extra library literally called pico extras and it exports this sleep interface and the sleep interface has some functionality one of them is a sleep go to sleep until where you can specify a real-time counter alarm and a callback to execute once the alarm has gone off and within this api they actually use the deep sleep functionality of the processor and you’ll see here in a second the power consumption is significantly lower so basically what this code does here i’ll kind of walk y’all through it we turn the processor on it is not awake we put it into real-time clock sleep we basically say that this is the date now and then we say that this is the time we want to wake up which is just this previous date 10 seconds later we initialize the real time clock and then we set the date time to the time we say it is and then we say go to sleep until this alarm goes off and when it goes off execute the sleep call back the sleep callback just says the global variable awake is true and what that does for us is that means that we should never get here because we should be sleeping until we are awake
===
Теги: raspberry pi,pico,rpi,microcontroller,arduino,maker,craft,hobby,electronics,wires,temperature,safety,project,board,electric,leds,led,thonny,python,micropython,os,ide,onewire,ds18b20,circuitpython,review,launch,measure,probe,rp2040,specs,specifications,how to,guide,programming,Pico emulation,retro games raspberry pi pico,etaprime,eta prime,raspberry pi pico,arm cortex m0 ,low cost
2 views
3607
1185
4 weeks ago 00:12:39 1
DIY Cardboard FM Synth (8 DX7s!) | MiniDexed & Raspberry Pi
4 weeks ago 00:26:46 1
Endless OS | Best Linux Distro That’s Chock Full of Apps
1 month ago 00:29:35 1
FunOS | A Balance of Features and Functionality With Low-resource Usage
1 month ago 00:05:53 1
DON’T Buy a PC Without Watching This Video! youyeetoo X1
1 month ago 00:28:04 1
PCLinuxOS | The Boomer Distro | This Classic Independent Linux Distro is Definitely Worth a Look
1 month ago 00:26:22 1
PikaOS Makes Gaming and Standard Desktop Usage on Linux Fairly Straightforward
1 month ago 00:04:13 1
Transforma tu Raspberry Pi en un detector 360º con LIDAR
1 month ago 00:45:43 1
Полный Айсберг Linux: Что скрывается под поверхностью ОС?
1 month ago 00:29:57 1
Parrot 6.2 Release, The Ethical Hacking Distro Now Introduces Rocket Launcher for Docker Containers
1 month ago 00:27:13 1
ArchCraft is Arch Linux For The Rest of Us
1 month ago 00:04:50 1
5 Best Similar Windows Like Linux OS Distros Users Should Try Out in 2024 | Replace Windows 11 & 10
1 month ago 00:15:24 1
I put ChatGPT on a Robot and let it explore the world
1 month ago 00:34:24 1
Mega OS Sierra is a Really Good Choice For Gamers and Professionals?
1 month ago 00:38:21 2
A First Look At Voyager Live/Linux , It Brings Together GNOME and XFCE Once Again
1 month ago 00:44:11 1
Solus 4.6 “Convergence” Released | Experimental Software Centers | Continued Merged Usr Migration
1 month ago 00:00:55 1
Cooling 14900K Using HEATSINK
1 month ago 00:39:52 1
Mega OS is Able to Run Both Windows and Linux Programs
1 month ago 00:10:39 1
Проверка WiFI на защищенность | WPA2 | Kali Linux | Как защититься от в3л0ма? | UnderMind