-
Notifications
You must be signed in to change notification settings - Fork 245
Help - Controlling Raspberry Pi Pico Power using RPi5 USBs #627
-
As part of a larger project, I need to have power control of multiple Raspberry Pi Pico. I would like to be able to use the RPi5's USB ports to do this. When testing with a old keyboard, I was able to turn off the device/port (can see from the caps lock light turning off) but when trying with the Pico plugged into the USB ports nothing happens when I run,
sudo uhubctl gets me:
Current status for hub 4 [1d6b:0003 Linux 6.6.31+rpt-rpi-2712 xhci-hcd xHCI Host
Controller xhci-hcd.1, USB 3.00, 1 ports, ppps]
Port 1: 02a0 power 5gbps Rx.Detect
Current status for hub 3 [1d6b:0002 Linux 6.6.31+rpt-rpi-2712 xhci-hcd xHCI Host
Controller xhci-hcd.1, USB 2.00, 2 ports, ppps]
Port 1: 0100 power
Port 2: 0103 power enable connect [2e8a:0003 Raspberry Pi RP2 Boot E0C9125B0D9B]
Current status for hub 2 [1d6b:0003 Linux 6.6.31+rpt-rpi-2712 xhci-hcd xHCI Host
Controller xhci-hcd.0, USB 3.00, 1 ports, ppps]
Port 1: 02a0 power 5gbps Rx.Detect
Current status for hub 1 [1d6b:0002 Linux 6.6.31+rpt-rpi-2712 xhci-hcd xHCI Host
Controller xhci-hcd.0, USB 2.00, 2 ports, ppps]
Port 1: 0100 power
Port 2: 0100 power
I then try to turn off hub 1 and 3 since the pico should be using USB 1.1 (which is 2.0 standard ?).
sudo uhubctl -a off -l 1
Current status for hub 1 [1d6b:0002 Linux 6.6.31+rpt-rpi-2712 xhci-hcd xHCI Host Controller xhci-hcd.0, USB 2.00, 2 ports, ppps]
Port 1: 0000 off
Port 2: 0000 off
Sent power off request
New status for hub 1 [1d6b:0002 Linux 6.6.31+rpt-rpi-2712 xhci-hcd xHCI Host Controller xhci-hcd.0, USB 2.00, 2 ports, ppps]
Port 1: 0000 off
Port 2: 0000 off
and
sudo uhubctl -a off -l 3
Current status for hub 3 [1d6b:0002 Linux 6.6.31+rpt-rpi-2712 xhci-hcd xHCI Host Controller xhci-hcd.1, USB 2.00, 2 ports, ppps]
Port 1: 0000 off
Port 2: 0103 power enable connect [2e8a:0003 Raspberry Pi RP2 Boot E0C9125B0D9B]
Sent power off request
New status for hub 3 [1d6b:0002 Linux 6.6.31+rpt-rpi-2712 xhci-hcd xHCI Host Controller xhci-hcd.1, USB 2.00, 2 ports, ppps]
Port 1: 0000 off
Port 2: 0000 off
With location 2 and 4 saying no device (as expected).
I however am not able to get the pico to turn off (I have an LED hooked up to it's 5V pin with a resistor to ground).
Any ideas what could be causing this/has anyone tried this with similar microcontrollers?
Thank you for any help!
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
From readme:
Raspberry Pi 5 has two USB2 ports and two USB3 ports (total 4). These ports are connected to 4 distinct USB hubs 1,2,3,4 in really weird configuration (but depending on OS and HW revision hubs of interest can be 2,3,4,5).
Because of that:
To turn off VBUS power it has to be disabled across all onboard hubs and ports with:
uhubctl -l 2 -a 0
uhubctl -l 4 -a 0
Note that I recommend to turn off locations 2 and 4 (1 and 3 would work unless you have 1 port USB hub detected at location 1).
Basically, make sure that you turn off all ports on all USB2/3 4 ports hubs you can see. This should completely remove VBUS from any device connected to RPi5 USB ports.
As soon as you enable power on any port, all ports will become powered.
Beta Was this translation helpful? Give feedback.