I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
How Can I Best Read the Packets from the USB Power Delivery Analyzer to Ensure I Capture All the Data?
Rena Ayeras

Question from the Customer:

I’m using the USB Power Delivery Analyzer and I have questions about using the Software API.

  • Does the API only read from the hardware buffer of the USB PD analyzer?
  • API - Start Capture - How does this work? Does it start monitoring to save the data from any buffer or a specific buffer (hardware or software buffers)?
  • API - Read USB PD packet – My understanding is this API reads a single packet. Is there a delay between consecutive read requests? My concern, would any packets between read commands be missed? Is there a time limitation, such as a delay, I need to factor in for programming the readings?

As an alternative, could I use the Data Center Software to read all the data packets?

Response from Technical Support:

Thanks for your questions! It is possible to use the Data Center Software to monitor PD data packet captured with the USB Power Delivery Analyzer.  When using the Data Center Software, you can configure the capture size.   When using the API, in addition to Start Capture, there are three specific API commands for reading data from the USB PD Analyzer.

Using the Data Center Software to Configure Capture Size

The capture size is dependent upon your computer’s RAM size.  You can set the capture size limit in the Data Center Software Capture Settings menu.  To configure the capture size:

  1. Choose Analyzer-> Capture Settings.
  2. Use the slide bar to modify the capture size.

Capture Settings via Data Center Software

Using API Functions to Read Capture Data

The internal hardware buffer of the USB Power Delivery Analyzer is 1024 packets, which contains both empty and valid packets. In the hardware buffer, only half of the packets are filled with the incoming packets. To read the packets, read functions must be performed in the mean interval – this avoids the loss of packets.

The Start Capture (pd_capture_start) API function is used to start monitoring packets. About pd_capture_start:

int pd_capture_start (Pd pd);Arguments:

pd  - handle of a PD analyzerReturn Value:

A PD status code of PD_OK is returned on success.

We suggest downloading the USB Power Delivery Analyzer Software API and referring to the example file capture_usbpd. Using this program, you can save the transaction to a file and then analyze the captured information.

API Commands to Read Packets

  • Read USB PD API – reads from the analysis system – the internal buffer
  • Read USB PD API - returns only one packet for a single API call
  • Read USB PD Raw Packet API - reads from the Hardware buffer

More API Information

For more information, please refer the API Documentation section of the USB Power Delivery Analyzer User Manual.   Additional resources that you may find helpful include the following:

We hope this answers your question. Need more information? You can contact us at sales@totalphase.com. You can also request a demo that applies to your application.

Request a Demo