The USB-C supply (VBUS), USB Power Delivery and the RP2040's temperature. More...
Classes | |
| class | STUSB4500 |
| Driver for the on-board STUSB4500 USB-PD sink controller (U6). More... | |
Functions | |
| vbus_volts () | |
| Reads the USB input voltage supply voltage (VBUS, also on the header's VIN pin). | |
| cpu_temperature () | |
| Gets the RP2040's internal temperature. | |
| usb_pd () | |
| The board's STUSB4500, set up on first use. | |
The USB-C supply (VBUS), USB Power Delivery and the RP2040's temperature.
A USB-PD charger can be asked for 9-20 V with usb_pd(). VBUS also feeds the header's VIN pin, so VIN follows the contract.
| vbus_volts | ( | ) |
Reads the USB input voltage supply voltage (VBUS, also on the header's VIN pin).
The USB voltage is measured by the MAX11635 (channel 3) through a 100 kOhm / 10.2 kOhm divider. The USB voltage can range between 5V to 20V depending on the power profile negotiated by the USB power delivery controller (STUSB4500). The default voltage is 5V unless another voltage is negotiated.
| OSError | The external ADC did not respond. |
| cpu_temperature | ( | ) |
Gets the RP2040's internal temperature.
The RP2040 has its own temperature sensor, which runs warmer than the room (about 10 C above it in testing). Single readings jump by a few degrees; average several for a steady value.