03.08.2013 Views

MC9S12VR-Family - Data Sheet - Freescale Semiconductor

MC9S12VR-Family - Data Sheet - Freescale Semiconductor

MC9S12VR-Family - Data Sheet - Freescale Semiconductor

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>MC9S12VR</strong> <strong>Family</strong> Reference Manual, Rev. 2.8<br />

Serial Peripheral Interface (S12SPIV5)<br />

End of Idle State Begin Transfer<br />

End<br />

Begin of Idle State<br />

SCK Edge Number<br />

SCK (CPOL = 0)<br />

SCK (CPOL = 1)<br />

SAMPLE I<br />

MOSI/MISO<br />

CHANGE O<br />

MOSI pin<br />

CHANGE O<br />

MISO pin<br />

SEL SS (O)<br />

Master only<br />

SEL SS (I)<br />

Figure 11-13. SPI Clock Format 0 (CPHA = 0), with 16-Bit Transfer Width selected (XFRW = 1)<br />

In slave mode, if the SS line is not deasserted between the successive transmissions then the content of the<br />

SPI data register is not transmitted; instead the last received data is transmitted. If the SS line is deasserted<br />

for at least minimum idle time (half SCK cycle) between successive transmissions, then the content of the<br />

SPI data register is transmitted.<br />

In master mode, with slave select output enabled the SS line is always deasserted and reasserted between<br />

successive transfers for at least minimum idle time.<br />

11.4.3.3 CPHA = 1 Transfer Format<br />

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31<br />

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32<br />

t L<br />

tT tI tL MSB first (LSBFE = 0) MSB Bit 14Bit<br />

13Bit<br />

12Bit<br />

11Bit<br />

10 Bit 9 Bit 8 Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 LSB Minimum 1/2 SCK<br />

LSB first (LSBFE = 1) LSB Bit 1 Bit 2 Bit 3 Bit 4 Bit 5 Bit 6 Bit 7 Bit 8 Bit 9 Bit 10Bit 11Bit 12Bit 13Bit 14<br />

MSB for tT , tl , tL tL = Minimum leading time before the first SCK edge<br />

tT = Minimum trailing time after the last SCK edge<br />

tI = Minimum idling time between transfers (minimum SS high time)<br />

tL , tT , and tI are guaranteed for the master mode and required for the slave mode.<br />

Some peripherals require the first SCK edge before the first data bit becomes available at the data out pin,<br />

the second edge clocks data into the system. In this format, the first SCK edge is issued by setting the<br />

CPHA bit at the beginning of the n 1 -cycle transfer operation.<br />

The first edge of SCK occurs immediately after the half SCK clock cycle synchronization delay. This first<br />

edge commands the slave to transfer its first data bit to the serial data input pin of the master.<br />

A half SCK cycle later, the second edge appears on the SCK pin. This is the latching edge for both the<br />

master and slave.<br />

1. n depends on the selected transfer width, please refer to Section 11.3.2.2, “SPI Control Register 2 (SPICR2)<br />

<strong>Freescale</strong> <strong>Semiconductor</strong> 361<br />

If next transfer begins here

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

Saved successfully!

Ooh no, something went wrong!