-
Notifications
You must be signed in to change notification settings - Fork 909
Missing an example to set low power states on Pico 2 #530
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Perhaps raspberrypi/pico-playground#48 is what you're looking for? Although I'm afraid I'm not sure if "sleep" and "low power" are actually separate things? 🤷 |
The sleep demo you mention uses some "tricks" to save power an I can not see how the new power management states of the RP2350 are used. Reading the specs of the RP2350 and the SDK documentation, I was expecting some much more high level approach to send the RP2350 into an low power state. So a simple example in the SDK would be very helpful. |
Those sleep examples don't use powman. I don't think we're going to add a powman example. We want to add a new API for low power but ran out of time before the Pico 2 sdk update. In the meantime there are a couple powman examples here peterharperuk@35db8fc |
Hi https://datasheets.raspberrypi.com/pico/pico-2-datasheet.pdf Power state P1.7 should draw only 0.148 mA. In the data sheet they describe the current consumption measurements with All externally accessible GPIOs, SWD and SWCLK are unconnected. The RP2350’s USB PHY has been powered down, I have no GPIO connected. But I do not know how to power down the USB PHY and how to enable the DP and DM pull-downs. Does anyone know how to do this? Thanks! |
That's probably related to section 6.1.4. in https://datasheets.raspberrypi.com/rp2350/rp2350-datasheet.pdf ? However note that it says "This supply must always be provided, even in applications where the USB PHY is never used." |
Thanks, lurch |
I will try and find out where those numbers come from. The best I can achieve is .29mA, by powering the device with 3V3 and disconnecting everything (USB, UART, SWD) and removing R10 (at your own risk) |
I can get 0.36 mA when connecting a Li-Ion battery (4.2V) to VSYS and leave everything else disconnected. In section 1.2.2. of the RP2350 data sheet all the pins are described. The description for the USP_DM and USB_DP pins is: USB controller, supporting Full Speed device and Full/Low Speed host. A 27Ω series termination So there is a way to connect internal pulldowns via software commands. But I could not figure out how to to this. |
I can reproduce the power numbers in the datasheet with this commit. Make sure you disconnect everything except for 5v into vsys peterharperuk@7dccd00 |
Nice! How are others expected to reproduce this? Copy that code? Use a SDK API? |
Thanks a lot! @tannewt: You find the code in https://github.com/peterharperuk/pico-examples/tree/35db8fc31d322de2bcac641d9b6b0f6fdb73062c/powman it is emedded in the example directory tree there. You can copy th whole directory tree and substitute pico-examples. I use a simplified standalone version, see attached zip file. copy these two files plus pico_sdk_import.cmake and pico_extras_import_optional.cmake from the Pico SDK into a directory and you should be able to compile as usual. I use VS Code with the Pico Extension. |
There might be a non-hardware API in future. So you can wait for that or else you'll have to copy that code. |
Powering flash down will allow to save extra 10 uA (mileage may vary), but then when starting from flash, it should be powered up (or released from power down): raspberrypi/pico-sdk#2111 |
I try to enable the low power states on the Pico 2 but without any success. If I read the documentation correctly, power state P1.7 equals 1111 in binary or 15 decimal. Using
returns 0 for i which means that the function was performed successfully, but adding
printf("Power State: %d\n", powman_get_power_state ());
right after the code above returns 0, so that somehow, the power state has not changed.
I am sure that I am missing something so it would be nice to add an example that demonstrates how the Pico 2 could be sent to a low power state for a definded amount of time.
Thanks!
The text was updated successfully, but these errors were encountered: