| Prev: I2C Monitoring | Table of Contents | Next: CAN 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.
Here are the steps for starting an SPI capture.
Start the Total Phase Data Center application.
Connect the Beagle I2C/SPI analyzer to the analysis computer. Make sure that the green indicator LED has illuminated.
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.
Click Connect to Analyzer… in the toolbar and connect to a Beagle I2C/SPI analyzer.
Select SPI from the Protocol Lens pull-down menu under the Transaction Window.
Click Device Settings… in the toolbar and set the SPI capture settings. Make sure SPI is selected in the Capture Protocol pull-down menu.
Connect the Beagle I2C/SPI analyzer to the target device.
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.
To stop the capture, click on the Stop button.
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.
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.
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.
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.
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.
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.
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.
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:
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.
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.
The SPI Details window separates the transaction data into the MOSI Data Pane (Figure 97) and the MISO Data Pane (Figure 98).
Each of these Data panes behaves as the Data pane described in Section 5.2.
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.
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.
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 .
| Prev: I2C Monitoring | Table of Contents | Next: CAN Monitoring |
|
© 2012 Total Phase, Inc. All rights reserved. Terms of Use | Privacy Notice | Site Map |
|
|