PD Builder

The PD Builder feature allows the user to modify all Power Data Objects (PDO) presented by the USBHub3c. This includes both sourcing and sinking PDOs of the USBHub3c.

Use Cases

  • Designing PDOs for you own device

  • Exposing DUTs to PDOs

  • Restricting DUTs from PDOs

Editable Items

PDO Types

PDO Flags

PDO Limits

Fixed

Unchuncked message support

Voltage

Variable

Dual role data

Current

Battery

USB communications possiable

Power

APDO

External power

USB suspend

Dual role power

High capability

Fast role swap current

HubTool

HubTool allows the user to visually build a PDO without needing to know anything about the Power Delivery specification. Once created you can immediately apply it to the USBHub3c.

../../../_images/pd_builder_create.gif

Example

static const int TEST_PORT = 1;
static const uint32_t MY_CUSTOM_SOURCE_PDO = 0x0001912C;
static const uint32_t MY_CUSTOM_SINK_PDO = 0x0002D12C;

aUSBHub3c stem;
stem.discoverAndConnect(USB);

//Change local SOURCE PDO 1 to MY_CUSTOM_SOURCE_PDO
stem.pd[TEST_PORT].setPowerDataObject(powerdeliveryPowerRoleSource, 1, MY_CUSTOM_SOURCE_PDO)

//Change local SINK PDO 1 to MY_CUSTOM_SINK_PDO
stem.pd[TEST_PORT].setPowerDataObject(powerdeliveryPowerRoleSink, 1, MY_CUSTOM_SINK_PDO)

//Do Stuff

stem.disconnect()

Relevant API’s

stem.hub.pd[x].setPowerDataObject() [cpp] [python] [NET] [LabVIEW]
stem.hub.pd[x].getPowerDataObject() [cpp] [python] [NET] [LabVIEW]
stem.hub.pd[x].setPowerDataObjectEnabled() [cpp] [python] [NET] [LabVIEW]
stem.hub.pd[x].getPowerDataObjectEnabled() [cpp] [python] [NET] [LabVIEW]