VBus Validation

The VBus Validation software feature gives the user full control of current limit and voltage setpoint for ports 0-5. This feature can be used in two different applications; Within the Power Delivery specification or as a fully programmable power supply.

Use Cases

  • Over voltage testing

  • Under voltage testing

  • 6 channel bench top power supply

Note

This feature has the ability to damage your device. Acroname is not responsible for any damage incurred by using this feature.

This software feature can be exploited through the USBHub3c Port Entity

VBus Validation - Power Delivery Mode

Using the VBus Validation feature within the power delivery mode allows the user to test if their device responds properly when a power source is behaving incorrectly or operating at the edge of specification.

It is important to remember that in this mode the USBHub3c ‘s power delivery engine also has access to these controls and therefore it is important to allow the USBHub3c and the device to finish negotiations before adjusting these values. Additionally, any PD events or errors can trigger re-negotiations which will replace any values the user has set.

This mode should only be used when the Power Delivery connection state is sourcing.

../../../_images/vbus_val_pd.gif

Example

static const int TEST_PORT = 1;

aUSBHub3c stem;
stem.discoverAndConnect(USB);

//Configure the Power mode: Power Delivery (default)
stem.hub.port[TEST_PORT].setPowerMode(portPowerMode_pd_Value);

//Check if we are sourcing power
uint8_t connectionState = 0;
stem.pd[TEST_PORT].getConnectionState(&connectionState);

//Ensure we have an RDO from the remote.
//This ensures we have finished negotiating.
uint32_t rdo = 0;
stem.pd[TEST_PORT].getRequestDataObject(powerdeliveryPartnerRemote, &rdo);

if((connectionState == powerdeliveryPowerRoleSource) &&
   (rdo > 0))
{
    //Do Stuff
    //Set desired port voltage and limit.
    stem.hub.port[TEST_PORT].setVoltageSetpoint(5500000);   //5.5VDC
    stem.hub.port[TEST_PORT].setCurrentLimit(500000);       //500mA
    //Do Stuff

}

stem.disconnect()

VBus Validation - Programmable Power Supply Mode

In this mode the USBHub3c is transformed into a 6 channel programmable power supply capable of supplying 100 Watts per channel.

../../../_images/vbus_val_pps.gif

Example

static const int TEST_PORT = 1;

aUSBHub3c stem;
stem.discoverAndConnect(USB);

//Disable port while we configure
stem.hub.port[TEST_PORT].setEnable(false);

//Configure the Power mode: Programmable Power Supply
stem.hub.port[TEST_PORT].setPowerMode(portPowerMode_ps_Value);

//Set desired port voltage and limit.
stem.hub.port[TEST_PORT].setVoltageSetpoint(5500000);   //5.5VDC
stem.hub.port[TEST_PORT].setCurrentLimit(500000);       //500mA

//enable the port when ready.
stem.hub.port[TEST_PORT].setEnable(true);

//Do Stuff

//Return port to safe state.
stem.hub.port[TEST_PORT].setEnable(false)

stem.disconnect()

Relevant API’s

stem.hub.port[x].setVoltageSetpoint() [cpp] [python] [NET] [LabVIEW] stem.hub.port[x].getVoltageSetpoint()[cpp] [python] [NET] [LabVIEW]

stem.hub.port[x].setCurrentLimit() [cpp] [python] [NET] [LabVIEW] stem.hub.port[x].getCurrentLimit()[cpp] [python] [NET] [LabVIEW]

stem.hub.port[x].setPowerMode() [cpp] [python] [NET] [LabVIEW] stem.hub.port[x].getPowerMode() [cpp] [python] [NET] [LabVIEW]

stem.hub.pd[x].setRequestDataObject() [cpp] [python] [NET] [LabVIEW] stem.hub.pd[x].getRequestDataObject() [cpp] [python] [NET] [LabVIEW]

stem.hub.pd[x].setConnectionState() [cpp] [python] [NET] [LabVIEW] stem.hub.pd[x].getConnectionState() [cpp] [python] [NET] [LabVIEW]