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 Apply Low Level Commands to Test a Target SPI Device with Retries?
Rena Ayeras

Question from the Customer:

We need to apply low level commands to determine if the target SPI device is awake. Part of that evaluation is the number of retries it takes. We’ve been using the Aardvark I2C/SPI Host Adapter – would it work for this test case? Are there some limitations we should know?

Response from Technical Support:

Thanks for your questions! The Aardvark Software API can provide the level of commands that you are looking to use. We also have a recommendation if you need higher speeds.

Software API Provides Low Level Commands

You can use the Aardvark Software API for your custom application. The Aardvark API supports Windows, Linux, and Mac operating systems, and several languages (C, Python, C#, and VB) and includes example applications that can be used as is or customized as needed.

Regarding sending retries to the target device, you can customize your application with several loop conditions as well as take count of the number of retries.

Aardvark Adapter Operations and Limitations

Here is an overview of the Aardvark adapter.

The Aardvark adapter is a general-purpose device that can actively communicate on an I2C or SPI bus, providing master and slave capability along with other I2C/SPI features.

Speed

  • Supports I2C master/slave up to 800 KHz
  • Supports SPI master up to 8 MHz
  • Supports SPI slave up to 4 MHz

Data Buffers

The Aardvark adapter immediately sends the data to the PC, the PC buffers the data to the OS, and the API reads the data from the OS.

  • The API receive buffer size is 16 Kbyte.
  • The I2C/SPI slave response size is 64 bytes.

Data Rates

The Aardvark adapter can only transfer up to 8 bits SPI data without td delay.

  • The maximum bitrates are only achievable within each individual byte and do not extend across bytes.
  • There are various overheads and delays that decrease the overall speed of data transfer, such as SS# assertion to first clock (t1, 10 - 20 us), setup time for each byte (td, 7 - 9 us for SPI master, 4 us min for SPI slave), last clock to SS# deassertion (t2, 5-10 us), and time between start of bytes (tb, min 10 us for SPI slave).
  • The GUI and the OS may add additional delay due to internal overhead. In addition, the Aardvark adapter also has a 2ms round-trip latency, which is caused by the full-speed USB link between the computer and the Aardvark adapter. These delays will further reduce the throughput across multiple transactions.

Recommended Platform for Greater Speed

For greater speed and other advantages, we suggest taking a look at the Promira Serial Platform. One difference is how their API functions are executed.

Aardvark Software API vs Promira Software API

For Aardvark Software API, everything is a block function that waits for the response from the device. It means any function takes at least USB latency which is 1-2ms. This is a bit slower than other devices, as the Aardvark adapter uses USB Full-speed (12 Mbit/s).

The Promira Serial Platform uses Ethernet and Ethernet over USB, which is faster than Full-speed USB.  In addition, Promira Software I2C/SPI API Active provides queue functionality so that multiple commands can be queued up and shifted to the device at once. For details about queuing, please refer to the Queue Overview section of the Promira Serial Platform I2C/SPI Active User Manual.

More Differences - Compare Total Phase I2C/SPI Tools

What else is different between the Aardvark adapter and the Promira platform? For a quick comparison, here is a table that summarizes the features of the Promira Serial Platform and other Total Phase I2C/SPI tools:

Promira Applications Comparison Chart

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

More questions? More ideas? Send us a message at sales@totalphase.com. You can also request a demo that applies to your application.

Request a Demo