Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11 Slide 12 Product List
Winbond Electronics Serial Flash Memory Part 1: SPI Interface Slide 6

The master sets the clock polarity and phase with relation to the data and the timing diagram as shown here. Clock Polarity and Phase (CPOL) determines the polarity of the clock. The polarities can be converted with a simple inverter. CPOL=0 is a clock which idles at 0, and each cycle consists of a pulse of 1 or the leading edge is a rising edge, and the trailing edge is a falling edge. CPOL=1 is the inverse and idles at 1. CPHA determines the timing of the data bits relative to the clock pulses. For CPHA=0, the output side changes the data on the trailing edge of the preceding clock cycle, while the input side captures the data on the leading edge of the clock cycle. The output side holds the data valid until the trailing edge of the current clock cycle. For the first cycle, the first bit must be on the MOSI line before the leading clock edge. For CPHA=1, it is the inverse. The MOSI and MISO signals are usually stable for the half cycle until the next clock transition. SPI master and slave devices may well sample data at different points in that half cycle. This adds greater flexibility to the communication channel between the master and slave. The combinations of polarity and phases are often referred to as modes with CPOL as the high order bit and CPHA as the low order bit. Most common mode is mode 0 or CPOL = 0 and CPHA = 0.

PTM Published on: 2019-10-28