I2C SPI USB CAN eSPI Cable Testing View All Videos Quick Start Guides Software Downloads App Notes White Papers User Manuals Knowledge Base Sales Support About Us
Products Blog Sales Support Contact Search
How Do I Gather and Interpret Data from Adapters and Analyzers to Debug and Analyze SPI Devices?
Rena Ayeras

Image of a hardware circuit with software

Image by Geralt

Question from the Customer:

We are using the Cheetah SPI Host Adapter and the Beagle I2C/SPI Protocol Analyzer to analyze communication between SPI devices. We could use help for the issues we observed.

The setup:

The microcontroller is the master device.

The ASIC is the slave device.

  • When we connect the microcontroller and the Beagle I2C/SPI analyzer, we see communication on the Beagle I2C/SPI analyzer.
  • When we connect the Cheetah adapter and the ASIC, we see communication on the Cheetah adapter.
  • However, we have some communication/data issue when we connect the microcontroller, the ASIC, and Beagle I2C/SPI analyzer.

To debug this issue, we connect the Cheetah adapter, the ASIC, and the Beagle I2C/SPI analyzer:

Respectively, the MOSI, MSIO signals of the Cheetah adapter are connected to the Beagle I2C/SPI analyzer’s MOSI and MISO signals. Below are screenshots of what we see on the GUI – we were not able to check the signals on an oscilloscope.

  • However, the Beagle I2C/SPI analyzer shows incorrect and incomplete data in the Data Center Software:

    Data Center Serial Software shows errors and incomplete data from Beagle I2C/SPI analyzer

Our questions:

  • How should we connect both the Beagle I2C/SPI Protocol Analyzer and the Cheetah SPI Host Adapter to monitor SPI data?
  • Also, can you tell us about running XML commands in batch mode for the Cheetah adapter?
Response from Technical Support:

Thank you for your questions! Information about the issues are provided in error codes. We will provide details about the error codes, as well as information about using XML files with the Control Center Serial Software for analysis and debugging.

Errors Codes for SPI Device Communication

The errors displayed in the Err column provide information relevant for diagnostics. Here are descriptions of what was shown in the Data Center Software:

  • T indicates timed out errors. The capture for transactions timed out while waiting for additional data. The timeout period used by Data Center Software is 250ms.
  • M signifies Middle of packet errors. The Middle of packet (M) errors indicate data collection started in the middle of a packet.
  • P (P1, P2, P3 .... P7) indicate Partial last byte (P) errors. Since the analyzer operates at a byte level, the P error means that the analyzer was not able to capture an entire byte. The number following the P represents how many bits of the last byte were captured. The Beagle I2C/SPI analyzer uses the SPI slave select line to frame each transaction. For example, if the Beagle analyzer sees one bit and then sees the slave select line goes inactive, then it pads the rest of the byte with 0s. In summary – the partial last byte occurs when the last byte in the buffer is incomplete. The number of bits of data captured did not align to the expected data size.

For more information about all the error codes, please refer to Table 1 under section 6.1 Transaction Window of the Data Center Software User Manual.

We recommend analyzing your system and design to figure out the root cause of the displayed errors.

As a first step, increase the 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. To select a sampling rate, select the desired rate from the pull-down menu.

Using Batch Code for Device Communication Analysis

Information about XML commands are provided directly in the Control Center Serial Software, which is accessed by clicking the Help button. Here is a screenshot of that dialog:

Batch Help Instructions dialog from Control Center Serial Software

For more information, please refer to section 4.5 Batch Mode of the Control Center Serial Software User Manual.

Batch Code Examples

Functional examples of batch code are provided with the Control Center Serial Software, which can be used as is or modified as needed. Here is a list of the SPI scripts (I2C scripts are also available):

  • spi-eeprom-read
  • spi-eeprom-write
  • spi-flash-25P32-read
  • spi-flash-25P342-sector()-erase
  • spi-flash-25P32-write

This video shows an example of how to apply batch scripting:

This video uses the Promira Serial Platform – the process is similar with the Cheetah adapter.

Using a Host Adapter and an Analyzer Together

This video shows an example of using the Aardvark adapter with the Beagle I2C/SPI adapter to evaluate an I2C device. The process is similar when using the Cheetah adapter to analyze an SPI device.

We hope this answers your questions. Additional resources that you may find helpful include the following:

If you want more information, feel free to contact us with your questions, or request a demo that applies to your application.