United States

Data Center Software User's Manual v6.00

8 SPI Monitoring

The Beagle I2C/SPI Protocol Analyzer is capable of non-intrusively monitoring SPI at up to 24 MHz. However, the Beagle analyzer may have difficulty monitoring continuous transactions at a sustained rate of 24 MHz. Please see the Beagle Analyzer datasheet for more details.

Please note that SPI is a full duplex protocol. For this reason, two bytes are recorded by the Data Center application during every 1-byte clock period. When the Data Center application displays these two bytes together, the first byte will be the MOSI byte and the second byte will be the MISO byte. There is no standard higher level protocol for SPI data.

8.1 Performing an SPI Capture

Here are the steps for starting an SPI capture.

  1. Start the Total Phase Data Center application.

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

  3. Connect the Beagle I2C/SPI 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 Connect to Analyzer… in the toolbar and connect to a Beagle I2C/SPI analyzer.

  5. Select SPI from the Protocol Lens pull-down menu under the Transaction Window.

  6. Click Device Settings… in the toolbar and set the SPI capture settings. Make sure SPI is selected in the Capture Protocol pull-down menu.

  7. Connect the Beagle I2C/SPI analyzer to the target device.

  8. Click the Run Capture button 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.

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

8.2 SPI Device Settings

The SPI device settings described below can be configured in the Device Settings dialog (Figure 95). To open this dialog, click on the Device Settings… button.

\includegraphics[clip=true]{spi-device-settings}
Figure 95: SPI Tab of the Device Settings Dialog

Sampling Rate

There are three different sampling rates which can be used to monitor the SPI 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 SPI 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 SPI flash 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 SPI Transaction window (Figure 96) 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 Info pane.

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

For a general description of the Transaction window, see Section 5.1. The general description encompasses the behavior of the SPI Transaction window, with the following caveats for each column:

Data

For the top level SPI Transactions, data is displayed as a sequence of 2-byte words. The first byte of the word is the MOSI data and the second byte is the MISO data. The data is paired because SPI is a bidirectional protocol and the MOSI and MISO bytes appear on the bus at the same time. SPI transactions can be expanded into separate MISO and MOSI records, both of which contain the normal sequence of 1-byte words.

8.4 Details Window

The Details window has some extra features to accommodate the SPI protocol. Refer to section 5.2 for an overview of the Details window, including the Data and Timing panes.

MOSI and MISO Data Panes

The SPI Details window separates the transaction data into the MOSI Data Pane (Figure 97) and the MISO Data Pane (Figure 98).

\includegraphics[clip=true]{spi-mosi-data}
Figure 97: MOSI Data Pane of the SPI Details Window

\includegraphics[clip=true]{spi-miso-data}
Figure 98: MISO Data Pane of the SPI Details Window

Each of these Data panes behaves as the Data pane described in Section 5.2.

Timing Pane

The SPI Timing Pane (Figure 99) overlays the bit timing diagram of the MOSI line with the MISO line. The MOSI line is displayed in red and the MISO line in blue. If a Transaction record is selected, the red and blue MOSI and MISO timing lines will overlap in the diagram. If either a MOSI or a MISO record is selected, only the MISO or MOSI line will be drawn in the Timing pane.

\includegraphics[clip=true]{spi-timing}
Figure 99: Timing Pane of the SPI Details Window

8.5 Filtering an SPI Capture

The following is a description of the parameters that are specific to the SPI protocol. For a description of the General parameters, or for information on how to operate the Filter Pane, refer to Section 5.5. The SPI Filter Pane (Figure 100) has protocol-specific filtering options under the Bus caption in the pane.

\includegraphics[clip=true]{spi-filter-panel}
Figure 100: Filter Pane located in the SPI Navigator Window

MOSI Data and MISO Data

In the SPI Filter pane, there is no Data field in the General parameters section. It is replaced by two Data fields, one that matches only MOSI Data and one that matches only MISO Data. These Data parameters accept the same syntax described in Section .