Beagle Data Center Software Manual v2.20

7 I2C Monitoring

The Beagle I2C/SPI/MDIO Protocol Analyzer is capable of monitoring I2C at up to 4 MHz non-intrusively.

Please note that captured I2C data is 9-bits wide because the ninth bit is the ACK/NACK bit to indicate whether the data was received properly. For this reason, I2C data will appear differently in the General views.

7.1 Performing a I2C Capture

Here are the steps for starting an I2C capture.

  1. Start the Beagle Data Center application.

  2. Connect the Beagle I2C/SPI/MDIO analyzer to the analysis computer. Make sure that the green indicator LED has illuminated.

  3. Connect the Beagle I2C/SPI/MDIO analyzer to the I2C bus. The 10-pin ribbon cable can be connected directly, or the 10-pin split cable can be used to provide individual flying leads.

  4. Click Connection in the toolbar and connect to a Beagle I2C/SPI/MDIO analyzer.

  5. Make sure I2C is selected in the capture protocol pull-down menu.

  6. Click Settings in the toolbar and set the I2C capture settings.

  7. Click on the I2C tab in the transaction window in order to see I2C specific data.

  8. Connect the Beagle I2C/SPI/MDIO analyzer to the target device.

  9. Click on Capture to start the data capture. Once the capture has started, the capture indicator will turn green and an informational transaction will appear in the transaction window which notes when the capture was started.

  10. To stop the capture, click on the Stop button.

7.2 I2C Capture Settings

There are several I2C capture settings that can be set by the user. These settings can be changed in the I2C Capture Settings window (Figure 44). To open this window, click on the Settings button or go to Beagle | Settings… or use the keyboard shortcut <Ctrl>+T.

\includegraphics[clip=true]{i2c-settings}
Figure 44: I2C Settings Dialog Window

Capture Data Limit

This option specifies the maximum amount of memory to allocate for the capture data. Enter a number in the Capture data limit field to set the size of the capture buffer. During capture, once this limit is exceeded, the capture will be automatically stopped.

Total Phase recommends that the maximum size allowed for a capture should be set to no more than half the available memory on the system. On an extremely busy computer, the capture limit should be set even lower to prevent problems. If the application starts swapping memory, incoming capture data may be lost.

Incoming Data Buffer Size

This option will specify the size of the operating system level USB buffer. See Section 4.13 for more information on this option.

Bit-Level Timing

The capture of the bit-level timing is optional. By not capturing bit-level timing data, the Data Center software will have improved performance, reduced memory usage and will be able to capture data for a longer period of time before running into the capture data limit.

To enable or disable the capture of Bit-Level Timing information, simply check or uncheck the box in the Settings window.

Sampling Rate

There are three different sampling rates which can be used to monitor the I2C bus. As a rule of thumb, it is recommended that the sampling rate should be at least 4 times faster than the data rate of the monitored bus. For a 400 kHz I2C bus, a sampling rate of 10 MHz would suffice.

To select a sampling rate, simply select the desired rate from the pull-down menu.

Target Power

It is possible to power a downstream target, such as an I2C or SPI EEPROM with the Beagle analyzer’s power (which is provided by the USB port). It is ideal if the downstream device does not consume more than 20-30 mA.

To enable or disable target power, check or uncheck the box in the Settings window.

I2C Pull-ups

There is a 2.2K resistor on each I2C line (SCL, SDA). The lines are effectively pulled up to 3.3V, so that results in approximately 1.5 mA of pull-up current. For more information about the pull-up resistors, please consult the Beagle I2C/SPI/MDIO Protocol Analyzer datasheet.

To enable or disable the I2C pull-ups, check or uncheck the box in the Settings window.

7.3 Transaction Window

The transaction window (Figure 45) displays all the transactions that were captured on the I2C bus in real time. When a transaction is selected in the transaction window, detailed information about that transaction is displayed in the Detailed window.

\includegraphics[clip=true]{i2c-transactions}
Figure 45: I2C Transaction Window

In the I2C transaction window, the transaction table provides the following information:

Index
The transaction index number. The beginning of the capture is considered index 0.

Time
The time that the transaction was captured. The time counter starts at 0 when a capture is started. Every time a new capture is started, the time is reset to 0.

The time is provided in the following format: min:sec.ms.µs. The timestamp of the transaction is displayed in nanosecond precision in the timing detailed view.

Duration (Dur)
The elapsed time that the transaction was in the bus. The duration value displayed is shown in an abridged format. The full duration to nanosecond precision is displayed in the timing detailed view.

Length (Len)
The number of bytes in the transaction. The I2C slave address and read/write bit are not counted in the length.

Error codes (Err)
Error codes listing abnormal conditions that occurred while capturing the transaction. See Table 1 for the possible error codes.

Start/Stop (S/P)
Whether the start and stop conditions were observed. S indicates the start condition; P indicates the stop condition. Transactions that have no stop condition (in the case of repeated start conditions) will have only S displayed.

Read/Write (R/W)
The Read/Write bit. Indicates if the transaction was a Read or a Write transaction.

Address (Addr)
The I2C address of the slave device that was target of the transaction. This number is in hexadecimal. “None” is displayed for transactions that are zero bytes long, and thus have no address field. An asterisk (“*”) that follows the address indicates that that address byte was NACK’ed.

Data
Only the first 16 bytes of the transaction data are shown in the Data column. Each byte is in hexadecimal. An asterisk (“*”) that follows a byte indicates that that byte was NACK’ed.

Delta Time and Data Payload Display

When moving the mouse over the transaction window, the transaction that the mouse pointer is over will be highlighted. The time difference between this transaction and the currently selected transaction will be displayed as “Delta time” in the status bar at the bottom of the application window. The time displayed will be the time difference between the start times of the two transactions. The summation of the Length (Len) field inclusively between the two selected transactions will be displayed as “Data payload” in the status bar next to the “Delta time”. Moreover, the calculated bandwidth between the selected transactions is also displayed after the “Data payload” in parenthesis.

The delta time and data payload will only be displayed when the two transactions are from the same capture session. So if you start then stop a capture, then start another capture, these statistics will only be displayed when both the selected transaction and the one the mouse is over are from the same capture session.

7.4 Detailed View

Packet Mode

\includegraphics[clip=true]{i2c-packet}
Figure 46: I2C Details Pane - Packet Mode

The Packet mode (Figure 46) displays the I2C packet as a string of bytes. Typically, it will display the start condition as [S] followed by the device address and read/write flag, then the subsequent data bytes and the stop condition as [P]. No ack conditions will be marked with an asterisk following the corresponding byte.

Data Mode

The Data mode (Figure 47) provides a general hexadecimal and ASCII dump of the contents of the transaction.

\includegraphics[clip=true]{i2c-data}
Figure 47: I2C Details Window - Data Mode

The data is displayed in a standard hexdump format which includes:

Offset
The offset position of the first byte in a row in hexadecimal notation.

0 to F
Bytes 0 through 15 of the row in hexadecimal format. If the byte was NACK’ed, an asterisk (*) will appear next to the byte. There is no special notation if the byte was ACK’ed.

ASCII
The bytes from the row displayed as ASCII characters. If the equivalent ASCII character is a non-printing character, a “.” is printed instead.

Timing Mode

The Timing Mode (Figure 48) provides bit-level timing for the data of the transaction. Each byte of the transaction appears as a row in this mode. All the bytes from the transaction will be displayed in this mode, including start and stop conditions.

The first line of the table displays the transaction timestamp as well as the transaction duration, both to nanosecond precision.

Each row contains the following information:

\includegraphics[clip=true]{i2c-timing}
Figure 48: I2C Details Window - Timing Mode

Offset
The offset position of the byte

Time
The time in nanoseconds from the start of the transaction to the start of the byte.

Value
The hexadecimal value of the byte.

Timing
A graphic display of each individual bit of a byte. Each bit is displayed as being either high or low with the time in nanoseconds from the start of the current bit to the start of the subsequent bit.

The lengths of the timing blocks in the graph are not drawn to scale and are intended merely to provide a hint to the relative time scale of one bit time to the next.

There are a couple of things to note:

  • I2C data is sent MSB first and LSB last. In the column header for the Timing column, the bit order is indicated to be b7 …b0.

  • The timing display for I2C actually shows 9 bits. The last bit is the ACK/NACK bit.

7.5 Filtering a I2C Capture

An I2C capture can be filtered in real-time or after it has been completed. The Data Center software offers an extensive list of filters to help developers filter out extraneous data. All filters are non-destructive; developers are free to apply filters multiple times without losing data.

\includegraphics[clip=true]{i2c-filters}
Figure 49: I2C Filters Palette

Minimum Index
The transaction index number must be greater than or equal to this integer in order to appear in the transaction window.

Maximum Index
The transaction index number must be less than or equal to this integer in order to appear in the transaction window.

Minimum Length
The data of the transaction must have at least this many bytes in order to appear in the transaction window.

Maximum Length
The data of the transaction must have fewer than this many bytes in order to appear in the transaction window.

Minimum Duration
An integer number that filters the transactions based on a minimum transaction duration in nanoseconds. If the user enters 8000, then a transaction’s duration must be greater than or equal to 8 microseconds in order to be included in the transaction window.

Maximum Duration
An integer number that filters the transactions based on a maximum transaction duration in nanoseconds. If the user enters 20000, then a transaction’s duration must be less than or equal to 20 microseconds in order to be included in the transaction window.

Addresses
The transmission must be addressed to one of the specified I2C slave device addresses in order to appear in the transaction window. The addresses shoud be specified in hexadecimal format. Multiple device addresses should be separated by spaces.

Data Pattern
The data of the transaction must match the given data pattern in order for the transaction to be included in the transaction window.

Please note that this filter may affect the performance of the application during a capture. Therefore, it may be necessary to wait until the capture is complete to use the data pattern filter.

See Section 5.2 for details on the syntax of the data pattern field.

Show Info
When checked, the transaction window will display all the information entries. These information entries include when the capture was started and stopped.

Read/Write
Filter the transactions based on whether a transaction was a read or a write. Undefined transactions are transactions which are zero-byte and therefore are neither a read or a write.

7.6 Exporting to an XML Batch File

The Data Center software can export I2C capture data to an XML batch file that can be loaded into the Aardvark Control Center software to recreate the I2C traffic using an Aardvark I2C/SPI Host Adapter.

See Section 4.10 for more information about exporting a capture. Refer to the Aardvark Control Center software manual for information on loading and running an XML batch file.

© 2008 Total Phase, Inc. All rights reserved.
Terms of Use | Privacy Notice
HOME | PRODUCTS | SALES | SUPPORT | COMPANY | CONTACT