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
Support Question of the Week: How do I use the API Software for the Cheetah SPI Host Adapter to Filter Data from an SPI Slave Device?
Rena

We are using the CheetahTM SPI Host Adapter with an SPI slave device. This slave device sends FF bytes on MISO as long as it is busy (somewhat similar to  the clock-stretch for I2C), and if it is ready a first byte != FF byte is sent at mark 4. From then on, the data is the valid payload of interest that we want at read-data. The problem we have is that the number of FF bytes varies, and that count is unknown at start of the whole read.

We tried a few combinations with a ch_spi_batch_shift() and ch_spi_queue_array(), but we always get timeouts on the Beagle trace we use. Are the ch_spi_queue_ss() and ch_spi_queue_oe() deassert also needed, or is there another way to accomplish this? How can we filter out the FF bytes with the API software?

Thanks for your question! It is possible to filter the unwanted FF bytes using CheetahTM Software API?. To do so, you can modify the API code. Modification is one of the main features of SPI software - it allows you to "tweak" existing software for your specific application requirements. API software is supported for 32-bit and 64-bit versions of Windows, Linux and Mac OS. With Rosetta Language Bindings and shared libraries, the supported 32-bit and 64-bit software languages are C, C#, Python, .Net, VB NEW and VB6. All software downloads are listed on the our Active Software Downloads page.

Cheetah Software API supports multiple software languages and can be modified for specific user requirements. Figure 1: Cheetah API Software

Currently, the Cheetah adapter reads all the data including the bad data FFs and the good data AA BB CC DD. For example: FF, FF, FF, AA, BB, CC, DD. Following is an outline of how that could be done:

  1. In the C code, filter out (remove) the bad data FFs in the beginning of the data, and keep only the good data. For example: AA, BB, CC, DD.
  2. In the C code, provide the user in your GUI only the good data. For example: AA, BB, CC, DD.

For more information, please refer to the following documents:

Cheetah Host Adapter User Manual

Cheetah Software API

Cheetah GUI Software User Manual

Total Phase Products

Product Selector Guide

We hope this answers your question. If you have other questions about our Cheetah SPI Host Adapter or other Total Phase products, feel free to email us at sales@totalphase.com or submit a request for technical support.