Wiki · Read the guide: Anatomy of a USB Power Delivery PDO

USB-PD Decoder

Decode and encode USB Power Delivery Power Data Objects (PDOs), with a 32-bit field map and negotiation simulation. Demonstration tool.

1 · Hex PDOs

Paste the power profiles advertised by the source, one per line in hexadecimal, with or without the 0x prefix.

2 · Decoded

Negotiator (sink → source)

Choose the voltage and current requested by the receiving device, or maximum power. The simulation uses the profiles entered in the Decode tab.

What is a PDO?

A Power Data Object is a 32-bit word a USB-C source uses to advertise a power profile (the Source Capabilities). Bits 31-30 give its type; a sink selects a PDO and replies with a Request Data Object (RDO). This tool decodes and rebuilds PDOs, but handles neither the packet nor the physical layer of the protocol.

What are the PDO types and how do they scale?

Field scaling depends on the family:

Type bit 31-30 Voltage Current / Power
Fixed Supply0050 mV10 mA (current)
Battery0150 mV250 mW (power)
Variable1050 mV10 mA (current)
SPR PPS (APDO)11 · 00100 mV50 mA (current)
EPR AVS (APDO)11 · 01100 mV1 W (PDP, power)

The EPR Fixed (28/36/48 V) uses the same encoding as Fixed, with voltage > 20 V. For PPS, note that the runtime adjustment step is 20 mV, but the encoding of the limits in the APDO is at 100 mV — distinct things. For EPR AVS the available current varies with voltage, so the offer is expressed in power (PDP), not current.

Fixed PDO structure

The first Fixed PDO also carries the capability flags (USB-PD R3.1 Source layout):

b31-30  PDO type (00 = Fixed)
b29     Dual-Role Power
b28     USB Suspend Supported
b27     Unconstrained Power
b26     USB Communications Capable
b25     Dual-Role Data
b24     Unchunked Extended Messages
b23     EPR Mode Capable
b22     Reserved
b21-20  Peak Current
b19-10  Voltage      (50 mV/unit)
b9-0    Max Current  (10 mA/unit)

How does PDO → RDO negotiation work?

The negotiator above applies a simplified selection: for a requested voltage it prefers the exact Fixed, then a programmable APDO (PPS/AVS) covering the value, finally Variable/Battery; with “maximum power” it picks the PDO with the highest available power. It is not the full Policy Engine state machine: it is meant to read which PDO would be selected and the resulting RDO. EPR allows up to 13 PDO positions.

What are the tool’s limitations?

  • Decodes/encodes only the 32-bit PDO/RDO: no CRC, packet header or BMC physical layer.
  • No real electrical sanity check of the source: values are those declared in the bits.
  • EPR AVS is expressed in power (PDP); current at a given voltage is derived as P/V.
  • The negotiator is an educational selection, not the full USB-PD negotiation with messages and timers.

References

  • USB Power Delivery Specification R3.1 / R3.2 — USB-IF (Source Capabilities, PDO/RDO, APDO).
  • Fixed PDO flag layout aligned with the Linux kernel include/linux/usb/pd.h.