Support Question of the Week: Accelerating Bit Rate for Programming SPI Flash

Q: I am using the Aardvark host adapter to program 32MB SPI Flash. The write throughput is much slower than expected, 800KHz instead of 1KB/s. At this speed, it takes about two hours to program a Flash. How can I accelerate the bit rate?

A: Thanks for your question! The Aardvark adapter operates at bit rates up to 8MHz as an SPI master and 4MHz as an SPI slave. The maximum bit rate is achievable within each individual byte; however, the bit rate does not extend across all bytes.

The slower bit rates are probably due to USB latency. Overheads and delays can decrease the overall speed of data transfer, such as the slave select (SS#) assertion for the first clock (10 – 20us), the setup time for each byte (7 – 9us for SPI masters), and the last clock for SS# de-assertion.

  • The Flash Center software writes the data to the Aardvark adapter through successive SPI_write API calls to the device. The SPI_write call is a synchronous function;  it must be completed before the next API call.
  • Each time this function is called, a 2ms round-trip latency is caused by the full-speed USB link between your computer and the Aardvark adapter.

The USB latency of the Aardvark adapter cannot be changed. However, we do offer the Cheetah SPI Host Adapter, which uses a high-speed USB link between the adapter and the computer.

  • The USB latency would be reduced from 2ms to about 250us. It also allows you more control of the timing of the SPI data.
  • An asynchronous interface will further reduce latency. This interface allows  you to queue the data sent by the Cheetah adapter, which allows gapless shifting.

Note - the Cheetah adapter can only be used as an SPI master device.

Please refer to the data-sheets for more details about SPI Signaling Characteristics and APIs. The Cheetah scheme for creating SPI transactions differs from the Aardvark scheme.
Aardvark data sheet
Cheetah data sheet

We hope this answers your question. If you have other questions about our Protocol Analyzers or other Total Phase products, feel free to email us at sales@totalphase.com or support@totalphase.com.

Leave a Reply