Illustration by Geralt
Question from the Customer:I am using the Aardvark I2C/SPI Host Adapter and Aardvark Software API, specifically the aardvark.c file. I am following the examples on the Total Phase website to create a set of SPI transactions. However, configuring one of the SPI devices requires 24-bit transactions. To do so, I send three consecutive 8-bit words. The issue I am having is that the signal select (SS) line is not staying low for the duration of the 3-byte transactions. Instead, the SS line toggles.
I am using the aa_spi_write command. Can you suggest how to keep that SS line logically low?
Response from Technical Support:Thanks for your question! The Aardvark adapter only supports 8-bit SPI data, which is why you see the SS link toggle between 8-bit transactions. It is possible to keep the SS line low by adding pull-down resistors to your setup or running the Aardvark adapter in GPIO mode.
In the Aardvark adapter, there are two pull-up resistors on each line, 2.2Kohm and 100Kohm in parallel. The 2.2Kohm resistor is configurable - it can be turned on and off. However, the 100Kohm resistor, which is extremely weak, is not configurable – it cannot be turned off when the Aardvark adapter is in SPI mode.
The 100Kohm pull-up resistor ensures the lines provide a logic high state when nothing is connected on the other side of the connector. Otherwise, the signal level could be in a floating state, neither logical high nor low, which would affect communication.
There are two ways to resolve this with the Aardvark adapter:
If adding resistors to your setup is an issue, or if a faster transfer rate would be effective, we have another recommendation - the Promira Serial Platform.
The following sections describe how the Aardvark adapter and the Promira platform work with SPI data, and why we recommend the Promira Serial Platform.
Here is a summary of how the Aardvark adapter handles data:
The setup time is required between each byte, which adds to the transmission time for multiple bytes. In terms of bits, the Aardvark adapter transfers up to 8 bits of data without td delay. Maximum bitrates are only achievable within each individual byte. That bitrate does not extend across bytes. The delay between each byte of data sent is due to the characteristics of the Aardvark device – it cannot be removed.
Here is a diagram of an SPI waveform:
SPI waveform timing:
Here is an illustration of SPI byte timing:
SPI byte timing:
For your application, to send 24 bits in a single transaction, we recommend the Promira Serial Platform. This device can be licensed up to the level of capability that you need:
The Promira Serial Platform provides options that support your requirements:
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.