Sending a Packet with the USB Power Delivery Analyzer – Total Phase
Sending a Packet with the USB Power Delivery Analyzer

Overview

This document describes how to enable the pull-down resistors in the USB Delivery Analyzer and send single packets. These instructions apply only to the USB Power Delivery Analyzer.While this function is available, it is unsupported and has not been extensively tested.

This procedure will cause an attached Type-C power supply to enable VBUS at 5V, and let you send data to it.

Prerequisites

  • USB Power Delivery Analyzer
  • Ubuntu 16.04 (others likely will work, this is just what has been tested)
    • one of the following: the “screen” command, minicom, or another terminal emulator
  • Power source (we used a Google Chromebook power supply)
  • Recommended: A second Power Delivery Analyzer

Setup

Load the usbserial module, enable it for this device, and open a terminal to interact with it.

  • Run the following two commands, entering your root password when prompted:

                sudo modprobe usbserial

                echo 1679 6003 | sudo tee /sys/bus/usb-serial/drivers/generic/new_id

  • Plug in the Power Delivery Analyzer to your PC via the USB Micro-B connection.
  • Open a terminal and run the command:

                screen /dev/ttyUSB0

Resistor Configuration

This section describes how to configure the Power Delivery Analyzer as a power sink, by enabling the pulldown resistors.

  1. Run the command:

                  tw res rd rd

  • “tw res” configures the resistors
  • the first “rd” indicates pull-down on CC1
  • the second “rd” indicates pull-down on CC2.

Other options (instead of “rd”) are:

  • ra: Enables the 1k pulldown “ra” resistor
  • rd: Enables the 5.1k pulldown resistor
  • rpusb: Enables the pull-up indicating a supply capable of providing default USB current
  • rp1a5: Enables the pull-up indicating a supply capable of providing 1.5A of current
  • rp3a0: Enables the pull-up indicating a supply capable of providing 3A of current

After issuing the “tw res rd rd” command, plug in the power supply

  • A green LED flash on the Power Delivery Analyzer indicates that the power supply was negotiated on the CC1 pin of the Power Delivery Analyzer.
  • A red LED flash indicates data traffic on CC2. Flip the power supply plug to try the other orientation.
  • If you don’t see flashing lights, then your power supply is probably not sending data. A stream of SOURCE_CAP is typically sent when the power source is first attached.

Sending a Packet

To send a a REQUEST packet:

                 tw send 1 1042 1004B12C

  • “tw send” sends a packet.
  • The first parameter (“1”) has no effect - the identical packet will be sent on both CC lines.
  • The second parameter (“1042”) is the header – in this case it’s a REQUEST. You can send any header you want.
  • Finally, any data objects are specified (“1004B12C”). These are formatted as DWORDs, multiple DWORDs can be specified here.

NOTE: Don’t include the CRC data! The CRC and EOP will be automatically appended

Have more questions? Submit a request