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: Configuring the Cheetah SPI Host Adapter Clock Transition (data frame, SPI mode)
Rena

Q: I have questions about the clock edges for your host adapters.

  • Can I select which clock transition (high-to-low, or low-to-high) the unit uses to shift out data?
  • Can I select which clock transition (high-to-low, or low-to-high) the unit uses for sample data?
  • Are the two selections above independent of each other?

It looks like the clock programmability I am looking for is covered in the “Polarity & Phase” sections of the Cheetah user guide.  Please provide details about these features.

A: Thanks for your question!  The clock transition is related to the data frame for the data exchange between the host adapter master and the slave(s). The data frame is configured by selecting the desired Polarity & Phase for the SPI mode.  The same SPI mode must be used by both the Cheetah SPI host adapter and the target device; the SPI modes (clock transitions) for the host adapter and the target device are not independent.

Following is a summary of the SPI modes and how the SPI mode can be configured. For reference:

  • The Getting Started guideline shows that selecting the "Polarity & Phase mode" is part of setting up the Cheetah SPI host adapter.
  • Section 1.1 of the Cheetah SPI Host Adapter Data Sheet provides details about SPI Modes 0-3.
  • Section 3.2 of the Cheetah GUI Software Manual shows how to set up the desired Polarity and Phase mode.
Overview of the SPI Modes, Modes 0–3

Although there is no protocol, for a successful data exchange, the master and slave must agree to the data frame. The data frame is related to the clock transition, which is described by two parameters: clock polarity (CPOL) and clock phase (CPHA). Both parameters have two states; there are four possible combinations (Mode 0–3) as shown in Figure 1.

Cheetah SPI host adapter SPI modes that configure clock transitions Figure 1: SPI Modes

  • Clock polarity (CPOL): 0 indicates the clock is rising then falling; 1 indicates the clock is falling then rising.
  • Clock phase (CPHA): 0 indicates data is sampled on the first edge; 1 indicates data is sampled on the trailing edge.
Configuring SPI Signaling Parameters

The Cheetah GUI Software allows you to configure the SPI signaling parameters of the Cheetah adapter. Figure 2 shows the SPI Control section of the Cheetah GUI software.

Figure 2: SPI Parameters including Clock Transition (SPI Mode)

 

  • To configure the Polarity and Phase (clock transition), select the desired SPI Mode and the other features appropriate for your setup.
  • The "SCK Polarity" figure shows the clock transition of the selected mode: the polarity of the clock and on which clock edge the transition occurs.

For more details about the Cheetah SPI host adapter and using the Cheetah GUI, please refer to the following documents:

Getting Started - Cheetah SPI Host Adapter

Cheetah SPI Host Adapter Data Sheet

Cheetah GUI Software User's Guide

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 support@totalphase.com.