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 Can I Make the Cheetah SPI Host Adapter Run Faster When Queuing Data in Smaller Data Blocks?
Rena

Question from the Customer: I am using the Cheetah SPI Host Adapter to send large data blocks at maximum speed. I find that I'm getting reliable SPI transmission for long blocks at 40Mb/sec, which corresponds to 5MB/second - these results are OK.

However, the fastest I can queue data to send using ch_spi_queue_array, in blocks of less than 64KB - since num_bytes is only a U16, is about 1.4MB/second.

What causes this difference in speed, and what can I do to improve the performance for queuing data in smaller data blocks?

About my setup:

  • The laptop is running Windows 7, 64-bit
  • The Cheetah adapter is connected to the laptop via USB.
  • The slave device is an FPGA device. I am only blasting transmit data to the FPGA - I am ignoring what the slave might output on the MISO line.
Response from Technical Support: Thanks for your question! The difference in speed is related to how data is managed with the Cheetah Software API library and interacting with the operating system, a trait that we cannot change. However, there is a solution to improve the programming speed. For your setup, we recommend using the asynchronous API, which allows you to stream data at higher rates. An example of asynchronous API is provided in the API package: “async”. Examples in C, C#, and Python are available.
Cheetah SPI Host Adapter Figure 1: Cheetah SPI Host Adapter

The key to high performance streaming is to asynchronously submit data to the Cheetah adapter, and then create the next queue while the adapter is shifting out the bytes. Then, before the current queue is completely shifted out, would then submit the next queue for delivery.  Good luck with your application!

Additional resources that you may find helpful include the following:

We hope this answers your question. If you have other questions about our host adapters or other Total Phase products, feel free to email us at sales@totalphase.com, or if you already own one of our devices and have a technical question, please submit a request for technical support.