Data Center Software Series: USB 2.0 Simple and Complex Matching/Triggers

The Data Center Software is Total Phase’s free bus monitoring software that allows users to interface with Total Phase protocol analyzers supporting I2C, SPI, USB, CAN, and eSPI protocols. These analyzers include the Beagle I2C/SPI Protocol Analyzer, the line of Beagle USB Protocol Analyzers, the USB Power Delivery Analyzer, the Komodo CAN Duo Interface, and the Promira Serial Platform with the eSPI Analysis Application.

When monitoring and debugging USB systems, engineers may want to perform triggers on data captures to better understand the bus events, data, or errors that are linked to USB bugs. The Match/Action triggering and filtering capability in the Data Center Software allows developers to trigger the capture, filter data, or set external triggers by matching data patterns, packet types, error types, and much more.

For USB 2.0 debugging, the Data Center Software offers both simple and complex matching and triggers. In this article, we’ll discuss more about these functionalities and the different settings that can be configured in each option.

USB 2.0 Matching Tab

Under the “Analyzer” settings located at the top menu, users can find “Device Settings”. Within this dialog there is an option to configure “Additional Settings”. Here, users can find a variety of different settings for both USB 2.0 and USB 3.0 captures. Focusing on USB 2.0, there are options for both simple and complex configurations.

Triggering capabilities for USB 2.0, which include simple and complex configurations, are only available with the Beagle USB 480 Power Protocol Analyzer - Ultimate Edition or the Beagle USB 5000 v2 SuperSpeed Protocol Analyzer - Standard or Ultimate Edition.

USB 2.0 Simple Matching System

The USB 2.0 Simple Matching System is capable of monitoring and triggering captures on USB 2.0 digital inputs, as well as asserting digital outputs and triggering captures on user-provided packet/data match patterns.

USB 2.0 Matching Configuration Dialog USB 2.0 Matching Configuration Dialog

 

Digital Input Configuration

The Digital Input Configuration option allows the user to individually enable the four digital input lines on the Beagle USB 480 Power Protocol Analyzer and Beagle USB 5000 v2 SuperSpeed Protocol Analyzer hardware. During the capture, if there is a change on one of the enabled input lines, an event transaction will be displayed in the Transaction window with the new input line state.  It is possible to use the Beagle USB 480 Protocol Analyzer to monitor digital inputs, but this does not offer the capability to trigger a capture start.

There is also an additional option to set individual digital inputs to trigger the capture. When configuring the trigger, the user can select whether a rising edge, falling edge, or either should trigger the capture.

USB 2.0 Matching

The USB 2.0 Matching option within the dialog allows users to configure the digital output lines on the Beagle USB 480 Power/5000 analyzer hardware.

Pin 1

When enabled, digital output pin 1 will switch to its active state at the beginning of capture and will stay at the active level until the capture is stopped. The options available on this tab are to set pin 1 to be active high, active low, or to disable the pin.

Pin 2

When enabled, digital output pin 2 will switch to its active state whenever there is a USB packet being transmitted on the bus. The options available on this tab are to set pin 2 to be active high, active low, or to disable the pin.

Pin 3

Digital output pin 3 can be set to match a PID, a device address, and an endpoint address. For example, pin 3 can go active when it observes a DATA0 packet to any device but 0x01 on any endpoint address. Each of the match settings can be set to match if the packet equals the parameter (=), does not equal the parameter (!=), or it can disregard the parameter (X). Pin 3 can also be set to be active high, active low, or to be disabled.

Pin 4

Digital output pin 4 can be set to match a PID, a device address, an endpoint address, and a data payload pattern. As with Pin 3, the PID, device, and endpoint settings can be set to match if the packet equals the parameter ( = ), does not equal the parameter ( != ), or it can disregard the parameter ( X ). The data pattern to match can be set in the “Data Matching Options” once data matching is enabled. Pin 4 can also be set to be active high, active low, or to be disabled.

Data Matching Options

The “Data Match Options” button in the Pin 4 tab of the Digital Output Settings dialog will reveal the data match options. To enable the data match functionality, users can check the “Enable Data Matching” button.

Digital Output Pin 4 Data Tab Digital Output Pin 4 Data Tab

 

In the hex editor, users can specify the data match pattern for output pin 4. XX can be used anywhere in the pattern as a wildcard to match any 1-byte datum at that location. The data match pattern can be up to 1024 bytes in length.

When data pattern matching is enabled, every data packet with the specified PID will have its data payload (not including the PID or the CRC field) matched against as much of the pattern as the data payload size. Therefore, a data packet with an 8-byte data payload will be compared against the first 8 bytes of the data match pattern. Likewise, a data packet with a 64-byte payload will be compared against the first 64 bytes of the data pattern.

Using the “Packet Data” dropdown box, the packet can be set to match if the payload equals the pattern ( = ) or does not equal ( != ) the pattern.

The "Write CSV" button allows the contents of the data match hex editor to be written to a comma-separated values (*.csv) file. The CSV file can be loaded into the data match table by clicking the "Read CSV" button. The "Clear Data" button will clear the contents of the data match table.

USB 2.0 Complex Matching System

The USB 2.0 Complex Matching System provides additional capabilities that allows users to match on specific state-based transactions, errors, events, and timers.

USB 2.0 Complex Matching Configuration Dialog USB 2.0 Complex Matching Configuration Dialog

 

For USB 2.0 captures using the Beagle USB 480 Power Protocol Analyzer - Ultimate Edition or the Beagle USB 5000 v2 SuperSpeed Protocol Analyzer - Standard or Ultimate Edition, users can create flexible state-based event triggers with up to 8 independent states and 6 matches per state. Each state may have 4 data match units, 1 timer match unit, and 1 asynchronous event match unit.

Event Match Action Unit

The Event Match Action Unit matches USB 2.0 events similar to what is available in the USB 2.0 simple configuration. Those events include any of the four digital inputs, the SMA external input, VBUS trigger, and the manual trigger.

USB 2.0 Asynchronous Event Match Action Unit USB 2.0 Asynchronous Event Match Action Unit

 

Timer Match Action Unit

The Timer Match Action Unit matches after a specified amount of time has elapsed. The amount of time can be configured in seconds, milliseconds, microseconds, or nanoseconds.

USB 2.0 Timer Match Action Unit USB 2.0 Timer Match Action Unit

 

Data Match Action Unit

The Data Match Action Unit has both Packet and Error type options. The Packet type match can match on specific PIDs, data patterns, data properties, and CRC conditions. In addition, a packet prefix and handshake can be selected to indicate a desired matching transaction on the bus.

USB 2.0 Packet Match Action Unit USB 2.0 Packet Match Action Unit

 

The Error type match can match on specific error types on any packet that appears on the bus. This can include CRC errors, corrupted PIDs, jabber, and general PHY receive errors.

USB 2.0 Error Match Action Unit USB 2.0 Error Match Action Unit

 

For a demonstration on how to set a multi-state USB 2.0 complex trigger with the Beagle USB 5000 v2 SuperSpeed Protocol Analyzer, watch our video:

Conclusion

The USB 2.0 simple and complex matching and triggers capability within the Data Center Software offers users a more advanced way to debug USB systems. Simple and complex matching settings include various parameters in which users can trigger a capture to streamline debugging efforts. For more information on USB 2.0 simple and complex matching and triggers and how it can help debug your USB 2.0 application, please email sales@totalphase.com.