01.08.2013 Views

Chapter 24 Multichannel Serial Port Interface (McSPI).

Chapter 24 Multichannel Serial Port Interface (McSPI).

Chapter 24 Multichannel Serial Port Interface (McSPI).

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

www.ti.com Functional Description<br />

<strong>24</strong>.3.1.3.7 Transfer Format With PHA = 0<br />

This section describes the concept of a SPI transmission with the SPI mode0 and the SPI mode2.<br />

In the transfer format with PHA = 0, SPIEN is activated a half cycle of SPICLK ahead of the first SPICLK<br />

edge.<br />

In both master and slave modes, <strong>McSPI</strong> drives the data lines at the time of SPIEN is asserted.<br />

Each data frame is transmitted starting with the MSB. At the extremity of both SPI data lines, the first bit of<br />

SPI word is valid a half-cycle of SPICLK after the SPIEN assertion.<br />

Therefore, the first edge of the SPICLK line is used by the master to sample the first data bit sent by the<br />

slave. On the same edge, the first data bit sent by the master is sampled by the slave.<br />

On the next SPICLK edge, the received data bit is shifted into the shift register, and a new data bit is<br />

transmitted on the serial data line.<br />

This process continues for a total of pulses on the SPICLK line defined by the SPI word length<br />

programmed in the master device, with data being latched on odd numbered edges and shifted on even<br />

numbered edges.<br />

Figure <strong>24</strong>-7 is a timing diagram of a SPI transfer for the SPI mode0 and the SPI mode2, when <strong>McSPI</strong> is<br />

master or slave, with the frequency of SPICLK equals to the frequency of CLKSPIREF. It should not be<br />

used as a replacement for SPI timing information and requirements detailed in the data manual.<br />

When <strong>McSPI</strong> is in slave mode, if the SPIEN line is not de-asserted between successive transmissions<br />

then the content of the Transmitter register is not transmitted, instead the last received SPI word is<br />

transmitted.<br />

In master mode, the SPIEN line must be negated and reasserted between each successive SPI word.<br />

This is because the slave select pin freezes the data in its shift register and does not allow it to be altered<br />

if PHA bit equals 0.<br />

In 3-pin mode without using the SPIEN signal, the controller provides the same waveform but with SPIEN<br />

forced to low state. In slave mode SPIEN is useless<br />

SPICLK Edge Nr.<br />

SPICLK (POL=0)<br />

SPICLK (POL=1)<br />

Sample<br />

Data From the Master<br />

Data From the Slave<br />

Slave Select<br />

(SPIEN) (optional)<br />

Figure <strong>24</strong>-7. Full Duplex Single Transfer Format with PHA = 0<br />

Begin<br />

End<br />

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16<br />

MSB Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 LSB<br />

MSB Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 LSB<br />

t LEAD<br />

Transfer<br />

SPRUH73E–October 2011–Revised May 2012 <strong>Multichannel</strong> <strong>Serial</strong> <strong>Port</strong> <strong>Interface</strong> (<strong>McSPI</strong>)<br />

Submit Documentation Feedback<br />

Copyright © 2011–2012, Texas Instruments Incorporated<br />

t LAG<br />

4129

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!