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 Quickly Queue Commands with the Cheetah SPI Host Adapter?
Rena Ayeras

Image by Volker Glätsch from Pixabay

Question from the Customer:

I am using the Cheetah SPI Host Adapter and Control Center Serial Software for communicating with an device. I have been trying to use the Control Center Serial Software in Batch Mode to queue up SPI commands on the Cheetah adapter. I have been able to get Slave Select (SS) lines to toggle in Master Mode, but no success in Batch Mode. Are there examples of using XML code in Batch Mode or documentation available specifically for the Cheetah adapter?

My goals:

  • Use SPI mode 0, 500kHz, active low SS
  • Assert and then de-assert SS0 (I’ll use that for my /reset line)
  • Maximum delay 1500ns
  • Assert SS1, write 9 bytes* ( or write 3 bytes of data 7 times), then de-assert SS1

I found several software examples for the Aardvark I2C/SPI Host Adapter, but I need this program to take full advantage of the Cheetah adapter’s speed and precision.

Response from Technical Support:

Thanks for your question! You can toggle SS lines in Batch Mode, and we’ll provide an example for you. However, for the speed that you seek, we recommend using Cheetah Software API.

Toggling Slave Select in Batch Mode

Here is an example of toggling SS in Batch Mode. The attribute of “ss” indicates the slave select number. For more details, please refer to the script, spi-eeprom-write.xml, which is one of the functional examples provided with Control Center Serial Software.

However, the speed that you mentioned will not occur with this program. The Control Center Serial Software operates in synchronous mode, which causes the latency of executing consecutive commands. The timing between SPI writes will be much longer than 1500ns. To achieve that speed, we recommend using the Cheetah API instead.

Queuing Commands Faster with Asynchronous Software

The Batch Mode of the Control Center Serial Software does not support queuing. However, the rapid burst mode of asynchronous commands is supported by Cheetah API. The API supports many operating systems and programming languages and includes functional examples, which you can use as-is or modify as needed. For details about API commands, please refer to the API Documentation section in the Cheetah SPI Host Adapter User Manual.

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.