09.12.2012 Views

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

RM0090: Reference manual - STMicroelectronics

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.

<strong>RM0090</strong> Serial peripheral interface (SPI)<br />

LSB justified standard<br />

This standard is similar to the MSB justified standard (no difference for the 16-bit and 32-bit<br />

full-accuracy frame formats).<br />

Figure 297. LSB justified 16-bit or 32-bit full-accuracy with CPOL = 0<br />

CK<br />

WS<br />

SD<br />

MSB LSB MSB<br />

Channel left<br />

Figure 298. LSB Justified 24-bit frame length with CPOL = 0<br />

CK<br />

WS<br />

SD<br />

Transmission Reception<br />

May be 16-bit, 32-bit<br />

8-bit data<br />

0 forced<br />

Channel left 32-bit<br />

24-bit remaining<br />

MSB LSB<br />

● In transmission mode:<br />

If data 0x3478AE have to be transmitted, two write operations to the SPI_DR register<br />

are required from software or by DMA. The operations are shown below.<br />

Figure 299. Operations required to transmit 0x3478AE<br />

First write to Data register<br />

conditioned by TXE = ‘1’<br />

Transmission Reception<br />

0xXX34 0x78AE<br />

Only the 8 LSB bits of the half-word<br />

are significant. Whatever the 8 MSBs<br />

a field of 0x00 is forced instead<br />

Channel right<br />

Channel right<br />

Second write to Data register<br />

conditioned by TXE = ‘1’<br />

● In reception mode:<br />

If data 0x3478AE are received, two successive read operations from SPI_DR are<br />

required on each RXNE event.<br />

Doc ID 018909 Rev 3 822/1416

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

Saved successfully!

Ooh no, something went wrong!