I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
Support Question of the Week: How Do I Support Reading 16-Bit SPI Data Samples at Higher Frequencies with an SPI Host Adapter?
Rena

I am trying to sample IMU (inertial measurement unit, M-G362PDC1 by Epson) data at 100 Hz but my setup misses some of the 16-bit SPI data samples.  Here’s my setup:

  • I am using a MacBook as the host and the AardvarkTM I2C/SPI Host Adapter is connected for SPI communication between the computer and the IMU. The Aardvark is the master; the IMU is the slave and is powered by USB.
  • The MacBook is running the Data CenterTM Software and I am using Aardvark Software API. The Aardvark interrupts the MacBook when DRDY signal is asserted. Pin1 of Aardvark is used as GPIO interrupt.
  • The output data rate for IMU is 1000 samples per second. I should get six samples per read but I only receive four. I am reading two bytes at a time.
  • The data samples I receive are correct, but some data samples are missing. At lower frequencies it works fine, there is no sample missing issue - but at higher frequencies I do have this problem.

Looking at section 3.8.4 of the AardvarkTM Host Adapter User Manual, it looks like samples are missing because of USB scheduling delays. What can I change in the setup to read all the SPI data samples at the higher frequencies?

Thanks for your question! For your application, we recommend using the CheetahTM SPI Host Adapter. The preliminary Epson IMU that you are using sends 16-bit data without any clock delay. However, the Aardvark adapter requires some delay (td 7 to 9us) after 8-bit data as described in section 2.4 of the Aardvark adapter manual. Therefore, the IMU does not provide the required SPI signaling characteristics to the Aardvark adapter. The Aardvark adapter is a general purpose device, that can actively communicate on the bus, and provides master and slave capability along with I2C/SPI features. The Aardvark adapter can transfer up to 8 bits of data without td delay. The Aardvark can not transfer 16-bit data without a td delay.

Use SPI Software and Cheetah SPI Host Adapter to Program Unsupported Chips Figure 1: Cheetah SPI Host Adapter

The Cheetah adapter actively communicates on the bus, operates at high speeds up to 50 MHz, can provide gapless shifting, and provides control over the timing of the data that is shifted out. The Cheetah adapter can send multiples of 8- and 16-bit data without requiring a delay. For additional information, please refer to section 2.5 of the Cheetah Host Adapter User Manual.

For an example of using the Cheetah adapter to read/write to the IMU, please refer to Writing and Reading from SPI Flash Using Cheetah Adapter and Cheetah GUI. You will need to modify the instructions according to the IMU datasheet.

Regarding the API code, it will need to be converted from Aardvark Software API code to Cheetah Software API code.

For additional information, please refer to the following documents:

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 submit a request for technical support.