Although the following describes the USB Power Delivery between SanDisk USB Type C Flash Drive and Google Chromebook Pixel (2015) with USB Type C receptacles, similar steps can be used for other devices. The goal of this article is to demonstrate how to monitor USB Power Delivery with Power Delivery Analyzer and Sigrok and then to view it with PulseView on Ubuntu Linux 14.04 LTS 64-bit laptop.
In this article the analyzer is USB Power Delivery Analyzer TP350110, the analysis device is Ubuntu Linux 14.04 LTS 64-bit laptop, the target host device is Google Chromebook Pixel (2015) with USB Type C receptacles, and the target device is SanDisk 32GB Flash Drive for USB Type C devices SDDDC-032G-G46. The SW tools include Sigrok and PulseView.
USB Monitoring Guidelines
1. Connect the System units as shown in Figures 10-12.
- Connect Chrome laptop power supply betwen Power Source and Chrome laptop type C receptacle.
- Connect Power Delivery analyzer analysis USB micro B receptacle to Linux laptop USB type A receptacle through micro B male to type A male cable.
- Connect Power Delivery analyzer target host USB type C plug to Chrome laptop USB type C receptacle.
- Connect Power Delivery analyzer target USB type C receptacle to Flash Drive USB type C plug.
2. Launch Ubuntu Linux 14.04 64-bit system.
3. Download the 4 packages below from the USB Power Delivery Analyzer project downloads, and install them in the order below using the Ubuntu Software Center tool by double-clicking the files in the Files Viewer.
Figure 1: Download Tools Packages
Figure 2: Install Tools Packages
4. Download the 4 packages below from the Ubuntu website, and install them in the order below using the Ubuntu Software Center tool by double-clicking the files in the Files Viewer.
5. Capture the USB trace using Power Delivery analyzer and sigrok.
- Open a terminal.
- Launch the sigrok program by typing in the command line: sudo sigrok-cli -d chromium-twinkie --continuous -o test.sr. test.sr is the name of the capture file you plan to record the trace in.
Figure 3: Launch Sigrok
- If you are prompted for the sudo password, then enter it and the capture should begin. On the Power Delivery analyzer: capture mode is indicated by a blinking blue light.
- Unplug and plug Power Delivery analyzer from the Chrome laptop. You should see red/green light and then blinking blue light on the Power Delivery analyzer. On the Power Delivery analyzer: CC1 activity is indicated by a green light, CC2 activity is indicated by a red light, and capture mode is indicated by a blinking blue light.
- Unplug, rotate upside down, and plug Power Delivery analyzer from the Chrome laptop. You should see again red/green light and then blinking blue light on the Power Delivery analyzer.
- Press the Enter key to stop the capture.
6. View the capture using PulseView
- Open a terminal
- Launch the PulseView program by typing in the command line: pulseview test.sr
Figure 4: Launch PulseView
Figure 5: PulseView Window
- Add the decoders for the BMC CC1 and CC2 encoded channels.
- Go to the top left bar of the window and click Decoders, Click Add, and Select pd_bmc.
Figure 6: PulseView-Add Decoder
- Click on the new trace pd_bmc to open the trace dialog box.
- In the trace dialog box change the Name to pd_pmc_cc1.
- In the trace dialog box click on the cc (control channel) button and select CC1.
- In the trace dialog box click on the Stack Decoder button and select usb_pd_packet.
Figure 7: PulseView-Configure Decoder
- Click on the PulseView window, and the decorder should begin to decode the selected channel.
- Repeate steps i-vi above for CC2 channel.
- Move the traces around for organizing the window.
Figure 8: PulseView - Organize Window
- Click the Zoom In button in the top left bar of the Window to zoom in the trace.
- Use the scrool bar to move around in the trace.
- Add Cursors: Go to the top left bar of the window, click View and select Show Cursors.
Figure 9: PulseView-Add Cursors
Figure 10: Power Delivery analyzer system
Figure 11: Power Delivery analyzer and Flash Drive
Figure 12: Power Supply