The PROTObus MAG Serial Debug Toolkit is the basic building block upon which many other LeCroy serial trigger and decoder options can then be added. It significantly extends the trigger and decode functionalities of these other packages by providing tools for more complete and faster validation and debugging of embedded designs. It provides the deepest level of insight possible.

Data Extraction and Graphing Tools

Extract data from the serial protocol message stream and use the track functions to graphically plot that data on the oscilloscope display. The digital data is used to create an analog waveform that can then be compared to other electrical signals.

Timing and Bus Measurements

Specific measurement parameters allow you to quickly and easily characterize your serial data system and make gateway measurements. Use the Message-Message parameter to find the time between two messages on the bus or the Message-Analog parameter to correlate bus traffic to an analog signal. Use LeCroy’s measurement statistics and histicons to understand the range of measurements on the protocol bus. Apply a filter to any measurement for more accurate results. Identify a specific ID or ID and Data using the powerful conditional setup for more accurate filtering.

Equipment Requirements

A LeCroy Xi or Zi series oscilloscope with the I2C option and Decode_Measure option keycodes installed.
3 passive Probes
WaveSource 100 demonstration signal source

The WS 100 Demonstration Signal Source

Figure 1:

An outline drawing of the WS 100 demonstration signal source. Use the push button to select one of 6 waveform choices

The WS 100 signal source is a USB powered circuit board which has 6 sets of output waveforms. There are two sets of duplicate output connections on the WS 100 are marked Ch1, CH2, and Trig. Table 1 summarizes all the available outputs. In this tutorial we will use selection S2 (I2C).

Table 1:

The Signal Outputs Available from the WS 100 Demonstration Signal Source

Displays shown in the tutorial are based on the following initial setup on a WaveRunner 6 Zi scope:

  1. Recall the default setup: File pull down > Recall Setup> Recall Default.
  2. Verify that the input coupling on channels 1through 3 is DC 1 MΩ: Touch or click the channel 1 annotation box>touch or click on the coupling field >select DC 1MΩ. Repeat for channels 2 and 3 if necessary
  3. Using the C1 dialog box of the front panel vertical scale control, set the channel 1 vertical scale to 1 V/division and the vertical offset to -3V. Repeat this action for channels 2 and 3.
  4. Touch or click the Trigger annotation box on the display of the oscilloscope. Set up the trigger as follows: Edge-Trigger, Source : C1, Coupling: DC, Slope: Positive, Trigger Level: 2.5 V
  5. Press the Normal button in the Trigger area on the oscilloscope’s front panel.
  6. Connect the WS 100 to a front panel USB connector. If the Found New Hardware Wizard appears press the cancel button. Select S2 (I2C) of the WaveSource100.
  7. Connect one passive probe to Ch1 of the scope and the Ch1test point of the WS 100. Ch1 is the data of the I2C signal
  8. Connect one passive probe to Ch2 of the scope and the Ch2 test point of the WS 100. Ch2 is the clock of the I2C signal.
  9. Connect one passive probe to Ch3 of the scope and the TRIG test point of the WS 100. TRIG is a trigger pulse synchronous with the I2C packet outputs.
  10. Touch or click the Timebase annotation box on the display of the oscilloscope. Set Time/Division: 20 ms, Select Set Maximum Memory and set Maximum Sample Points to 2.5MS.
  11. Press the Stop button in the Trigger area on the oscilloscope’s front panel
  12. This completes the initial setup. The scope display should be similar to Figure 2.
  13. Turn off the channel 2 and 3 traces.

Figure 2:

The acquired I2C signals Channel 1 is the data, channel 2 is the clock and Channel 3 is the Trigger

Use the Analysis pull down menu and select Serial Decode (Figure 3) or press the Decode button adjacent to the WavePilot SuperKnob (WaveRunner 6 Zi only) this will bring up the Serial Decode dialog box.

Figure 3:

In the Serial Decode dialog box check the Decode 1 Decode On check box.
Select the Decode 1 Protocol to be I2C.
If not already selected choose C1 and C2 to be the source channels.
Finally, check the Link to Trigger On checkbox as shown in Figure 4.

Figure 4:

Setting up I2C decode using the serial decode dialog box

Go to the Decode Setup tab.
Set the ‘Table # Rows’ entry to 9.
Turn on zoom by pressing the Zoom button on the front panel or by touching the Zoom key on the WavePilot SuperKnob.
Click or touch any entry on the decode table, a popup will appear offering you five choices shown in Figure 5:

Figure 5:

Using the hyperlinked decode table

Off – Turn off serial decode
Zoom – Turn on Zoom and expand the selected decode
Setup – Turn on the Serial Decode dialog box
Export – Save the decode table in .CSV format
Measure – Select a decode related measurement (optional, requires ProtoSync Measure and Graph)
Choose Zoom. Note that the zoom trace is updated to show the selected decode.
You can also use the WavePilot SuperKnob to scroll through the decode table selections.

Serial Triggering

Serial Triggering Touch or click on the Trigger annotation box or press the Setup button in the front panel trigger group. This will cause the trigger dialog box to appear. We have already linked the trigger to the serial decode setup so the I2C tab will be displayed as shown in Figure 6.

Figure 6:

The serial decode trigger setup for I2C

Press the Setup Button.

There are 8 trigger types to choose from. We will setup a trigger based on the I2C address and data content.

Press the button that is labeled Addr+Data in the Trigger type section of the I2C trigger setup.
The grayed out areas in the Address Setup and Data Pattern setup will activate.

Enter the value 20 into the Address field in the Address Setup.

Set the Data Pattern Setup fields to the values shown in Figure 6: Data Condition – Greater than or equal to; At Position – Value; Byte Position – 14; Length – 3 byte; Data Value – 313830.

Push the Single button in the trigger group. The scope should trigger once then go to Stop.

Touch or click the Zoom (Z1) trace annotation box. When the Zoom dialog box appears press the reset zoom button. This will reset the zoom so that the trigger point is centered on the screen. Use the Horizontal In button to expand the zoom trace. The trace will expand about the trigger point so we can see the packet that is aligned with the trigger point as shown in Figure 7. Use horizontal delay on the FP to position the decoded packet, if necessary.

Figure 7:

Displaying the packet corresponding to the trigger point

Your display should be similar to Figure 7. Only packets with address 20 and with Data values equal to or greater than x313830 in the last 3 data bytes will trigger the scope.

Use the Timebase pull down menu and select Horizontal setup or touch the Timebase annotation box to access Timebase dialog box. Change the Time/division setting to 10 ms/division.

Push the Single button in the trigger group. The scope should trigger once then go to Stop.

The most powerful feature of the PROTObus MAG Serial Debug Toolkit is the ability to extract digital data from the serial data message using the Message to Value measurement. Some examples of the usefulness of this capability are: viewing data from a temperature sensor or controller that is sent via an I2C or SPI bus; radio frequency I and Q modulated signal information sent via DigRF 3G; or rotational wheel speed information used by an anti-lock braking system (ABS) and sent via CAN. The ability to convert the embedded digital data in the serial data message to an analog value and view an analog waveform representation of the data is a unique feature that makes the PROTObus MAG Serial Debug Toolkit a necessity for engineers debugging serial protocols.

Our I2C signal from the WS-100 demo board has an embedded message: “LeCroy I2C nnn”. The last three digits are a simple counter. We will use the Message to Value parameter to graph the counter values.

You can evoke the Message to Value in several ways. The first is to point at one of the lines in the decode table or touch it. This will bring up the Decode pop up shown in Figure 5. Select Measure. This will result in the ‘Select Operation to apply on decoder output’ pop up shown in Figure 8. This pop up allows you to select any of the nine PROTObus MAG parameters or the View Serial Encoded Data as Analog Waveform Wizard. The function of each of these selections is summarized as follows:

Figure 8:

Decoder output operations selection provides nine PROTObus MAG parameters and the View Encoded Data as Analog function

Digital to Analog Decode Output Operations

View Serial Encoded Data as Analog Waveform - Automatically sets up a Message to Value parameter and then tracks the assigned measurement. In doing so, a Digital-to-Analog Conversion (DAC) of the embedded digital data is performed and the digital data is displayed as an analog waveform.

Message to Value - Extract and convert a specific portion of the data/payload in the message and display it as an analog value.

Timing Decode Output Operations

MsgToAnalog (Message to Analog) - Computes the time difference from a protocol message to the crossing of a threshold on an analog signal.

AnalogToMsg (Analog to Message) - Computes the time difference from the crossing of a threshold on an analog signal to a protocol message.

MsgToMsg (Message to Message) - Computes the time difference from one protocol message to another protocol message.

DeltaMsg (Delta Message) - Computes the time difference between two messages on a single decoded line.

Time@Msg (Time at Message) - Time from trigger to each protocol message (meeting specified conditions).

Other Decode Output Operations

BusLoad - Computes the load of user-defined messages on the bus (as a percent).

MsgBitrate - Computes the bitrate of user-specified messages on decoded traces.

NumMessages (Number of Messages) - Computes the number of messages which match a user-specified definition in decoded traces.

Select ‘View Serial Encoded Data as Analog Waveform’. You will see another pop up box asking into which function trace (F1-F8) you wish to place the Track of the Message to Value (MsgToVal) parameter. Select the trace F1.

As an alternative to using the setup wizard you can select Decode setup and choosing the Measure/Graph tab as shown in Figure 9:

Figure 9:

Using the Measure/Graph tab in the Serial Decode dialog to setup decoder measurements/graphs

Note that the Measure/Graph Setup tab documents what we have just setup. It will apply the Message to Value parameter to Decode 1 and display it as parameter P1. The track of P1 will be shown in math trace F1.

The graph field of the Measure/Graph Setup tab allows a selection of three different plots, Track, Trend, or Histogram.

The Track functions plots the parameter values as a function of time, synchronous with the source waveform.

The Trend function simply data logs the parameter values, showing one value for each measurement made. It is a plot of parameter values versus measurement number.

Histogram bins the measured parameter values and plots a count of the number of measurements within each bin range as a function of the nominal bin value.

In our example we will use the Track function.

Use the measure pull down to view the measurement setup. Turn off parameters P1 and P2. Turn on Statistics by checking the Statistics check box on the right hand side of the dialog box.

Go to the P3 tab. Select the Main right hand tab. The Filter should be set to Any, this will allows us to measure the message content of all I2C data packets. The other possible selection is to set an ID value, which will only look at packets with specific addresses.

Go to the Value right hand tab. Set it up as shown in Figure 10: Start Position, 112; # Bits 24; Encoding, Unsigned; Units none.

Figure 10:

Setting the MsgToVal parameter to read the 3 digit counter at the end of the data string

These settings limit the MsgToVal parameter to reading the three right most data packets.

Figure 11:

Comparing the selected data packet count to the measured value

Close the Measure dialog. The display should be similar to Figure 11. Note that F1 shows a staircase waveform reflecting the changing count in the last three digits of the nine acquired serial packets. The MsgToVal parameter is decoding the hex of those digits. In the highlighted table selection the hex value of the last three digits is x313833, converting this to base 10 the value is 3,225,651 or 3.235651E6.

Use the Measure dialog box to turn off P3. Turn off F1 and the Zoom trace Z1.

Using the other Decode Related Measurements

Change the Timebase setting to 2 ms/division. Turn on Channel 3. Single trigger the scope.

Bring up the Serial Decode dialog box by clicking on one of the lines in the decode table and selecting Setup. Select the Measure/Graph tab and configure the measurement as shown in Figure 12.

Figure 12:

Setting up the analog to message timing measurement

The analog signal source is the trig signal on channel 3. Source 2 is Decode 1. Touch the measurement graphic and it will open the selection pop up we saw in Figure 8. Select Analog to Message. The destination is parameter P1. When complete press Apply and Configure. This will display the P1 setup as shown in Figure 13.

Figure 13:

Configuring the Analog to Message parameter

The Main tab in the P1 measurement dialog allows us to set a filter for the decode input. This can be Any, as in this case, or a specified ID field or ID plus Data field.

The Analog tab allows us to setup the threshold level for the analog signal. It defaults to the 50% amplitude level.

The holdoff tab allows the user to ignore packets that occur within a specify time or a specific number of packets (events).

Simple markers, turned on in our example, use the blue dashed lines to show where the measurement is being made. In Figure 13 the time is measured from the analog pulse on P3 to the trigger point within the data packet.

You should experiment with several different measurements to gain experience in how to set them up.

This completes this tutorial.