Electronic – SPI: TI or Motorola mode

armembeddedflashspi

I am programming a Cortex M3 bare-metal to talk with SPI Flash. One of the configuration bits of an SPI control register is FRF (Frame format). It can either be set to SPI Motorola mode (0) or to SPI TI mode (1). (See the ARM reference manual page 695 here.)

The datasheet of the SPI Flash (available here) does not give indication regarding which mode I should use.

What are the two different modes, and which should I use for the specific Flash chip I am using?

Best Answer

Motorola and TI mode refer to different configurations of clock polarity (CPOL) and clock phase (CPHA). The clock polarity dictates whether a high or low signal marks a clock, the phase tells the device when to sample the data line.

According to your ARM datasheet, you can set CPOL and CPHA for your SPI controller.

Your flash chip (See chapter 3) supports {CPOL=0, CPHA=0} or {CPOL=1, CPHA=1}.

For more information, http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Clock_polarity_and_phase