29.01.2015 Views

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

STM32F101xx, STM32F102xx, STM32F103xx, STM32F105xx and ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

RM0008<br />

Serial peripheral interface (SPI)<br />

Figure 224. Operations required to receive 0x3478AE<br />

First read from Data register<br />

Second read from Data register<br />

conditioned by RXNE = ‘1’ conditioned by RXNE = ‘1’<br />

0x0034<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 />

0x78AE<br />

Figure 225. LSB Justified 16-bit extended to 32-bit packet frame with CPOL = 0<br />

CK<br />

WS<br />

SD<br />

16-bit data<br />

0 forced<br />

MSB<br />

Transmission<br />

16-bit remaining<br />

Reception<br />

LSB<br />

Channel left 32-bit<br />

Channel right<br />

When 16-bit data frame extended to 32-bit channel frame is selected during the I 2 S<br />

configuration phase, Only one access to SPI_DR is required. The 16 remaining bits are<br />

forced by hardware to 0x0000 to extend the data to 32-bit format. In this case it corresponds<br />

to the half-word MSB.<br />

If the data to transmit or the received data are 0x76A3 (0x0000 76A3 extended to 32-bit),<br />

the operation shown in Figure 226 is required.<br />

Figure 226. Example<br />

Only one access to SPI_DR<br />

0X76A3<br />

In transmission mode, when TXE is asserted, the application has to write the data to be<br />

transmitted (in this case 0x76A3). The 0x000 field is transmitted first (extension on 32-bit).<br />

TXE is asserted again as soon as the effective data (0x76A3) is sent on SD.<br />

In reception mode, RXNE is asserted as soon as the significant half-word is received (<strong>and</strong><br />

not the 0x0000 field).<br />

In this way, more time is provided between two write or read operations to prevent underrun<br />

or overrun conditions.<br />

Doc ID 13902 Rev 9 605/995

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

Saved successfully!

Ooh no, something went wrong!