I plan to use the Cheetah SPI Host Adapter to generate traffic on a 4-wire Mode 0 SPI bus at 8 MHz. The communication pattern is specialized. The protocol being used is not a full duplex. The master sends 3 bytes on the MOSI and then reads 3 returned bytes on the MISO. It looks like the Cheetah only returns the bytes seen on MISO when there is a write on MOSI, essentially assuming only a Write/Read operation.
My application does not Write/Read. Instead, it does a Write then a Read. I’m looking for a way to make this work. What do you advise? Also, to monitor the traffic, I’m looking at the Beagle I2C/SPI Protocol Analyzer – any comments about that?
Response from Technical Support:Thanks for your questions! The Cheetah adapter instantly reads from MISO when the MOSI is shifted out to the bus. It does not directly support reading MISO data after a specific delay after MOSI data. MOSI write and MISO read cannot take place independently.
Once a MOSI is set, MISO is read concurrently byte-by-byte. This is valid for all our platforms that can generate SPI traffic - the Aardvark I2C/SPI Host Adapter and the Promira Serial Platform, as well as the Cheetah SPI Host Adapter.
For your setup, you can send dummy bytes on MOSI to read the MISO bits from the next clock cycles. Note: this method may be affected by the operational limits of your slave device.
To send 3 bytes on MOSI and then read 3 bytes in MISO, send 6 bytes on MOSI (3 actual data bytes + 3 dummy bytes to read the MISO data). Similarly, to read 4 bytes on MISO, send a total of 8 bytes on MOSI, the last 4 being the dummy bytes.
Example: if MISO read has to be 01 02 03 after MOSI sends 0A 0B 0C, it will be reflected as follows (format: MOSI/MISO).
0A/00 0B/00 0C/00 00/01 00/02 00/03
Note: the extra dummy bytes must be equivalent to the number of bytes that are actually read by the slave.The Promira Serial Platform may provide some advantages for your setup. Comparing the features of these two devices:
About the Beagle I2C/SPI Protocol Analyzer:
Additional resources that you may find helpful include the following:
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.