Beagle Data Center Software Manual v2.20

8 SPI Monitoring

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

Please note that SPI is a full duplex protocol. For this reason, two bytes appear for every byte. The top byte is MOSI and the bottom byte is MISO. There is no standard higher level protocol for SPI data.

8.1 Performing a SPI Capture

Here are the steps for starting an SPI 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 SPI 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. Select SPI from the capture protocol pull-down menu.

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

  7. Click on the SPI tab in the transaction window in order to see SPI 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.

8.2 SPI Capture Settings

There are several SPI capture settings that can be set by the user. These settings can be changed in the SPI 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]{spi-settings}
Figure 50: SPI 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 1000 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.

Bit Order

Since SPI does not have a high level protocol, it is necessary for the user to specify the bit order of the data bytes in order to have the Data Center software properly parse the captured data.

MSB first means that the Most Significant Bit (MSB) is transmitted first. The byte order would be b7 … b0.

LSB first means that the Least Significant Bit (LSB) is transmitted first. The byte order would be b0 … b7.

Sampling edge

SPI has multiple modes (0, 1, 2, 3) which define the data frame for data transmission. In order for the Data Center software to correctly parse the captured data, the sampling edge of the data frame must be specified.

Mode 0 and 3 are sampled on the Rising edge of the clock and Mode 1 and 2 are sampled on the Falling edge of the clock.

For more information about SPI modes, please refer to the SPI Background section of the Beagle Protocol Analyzer datasheet.

Slave Select Polarity

Different SPI devices use different polarities on Slave Select to activate an SPI slave device. Slave select can be pulled low to activate the SPI slave or it can be pulled high to activate the SPI slave.

8.3 Transaction Window

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

\includegraphics[clip=true]{spi-transactions}
Figure 51: SPI Transaction Pane

In the SPI 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.

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

Data
SPI data is displayed as a pair of bytes. The first byte is the MOSI data and the second byte is the MISO data. The reason that the data is paired is because SPI is a bidirectional protocol and the MOSI and MISO bytes appear on the bus at the same time.

Only the first 8 byte pairs of the transaction data are shown in the Data column. Each byte is in hexadecimal.

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.

8.4 Detailed View

MOSI/MISO Mode

The MOSI/MISO mode provides a general hexadecimal and ASCII dump of the contents of the transaction. The entire contents of both the MOSI and MISO sides of the transaction are displayed in the MOSI/MISO mode.

\includegraphics[clip=true]{spi-mosi-miso}
Figure 52: SPI Details Pane - MOSI/MISO Mode

The data is displayed in a standard hexdump format with the MOSI data on the left and the MISO data on the right, which includes:

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

0 to 7
MOSI bytes 0 through 7 of the row in hexadecimal format.

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

0 to 7
MISO bytes 0 through 7 of the row in hexadecimal format.

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

MOSI and MISO Mode

The MOSI and MISO modes provide a general hexadecimal and ASCII dump of the contents of the transaction. The entire contents of the MOSI or MISO side of the transaction is displayed in these modes.

\includegraphics[clip=true]{spi-miso}
Figure 53: SPI Details Pane - MISO 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.

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 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.

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]{spi-timing}
Figure 54: SPI Details Pane - 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 MOSI and MISO bytes. The first byte is the MOSI value and the second byte is the MISO value.

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 MOSI line is displayed in red and the MISO line is blue.

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.

8.5 Filtering a SPI Capture

A SPI 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]{spi-filters}
Figure 55: SPI 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.

Data Pattern
The given data pattern must match either all of the MOSI data or all of the MISO data in the transaction 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.

8.6 Exporting to an XML Batch File

The Data Center software can export SPI capture data to an XML batch file that can be loaded into the Aardvark Control Center software to recreate the SPI 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