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.

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

The I 2 S shares three common pins with the SPI:<br />

● SD: Serial Data (mapped on the MOSI pin) to transmit or receive the two timemultiplexed<br />

data channels (in half-duplex mode only).<br />

● WS: Word Select (mapped on the NSS pin) is the data control signal output in master<br />

mode and input in slave mode.<br />

● CK: Serial Clock (mapped on the SCK pin) is the serial clock output in master mode<br />

and serial clock input in slave mode.<br />

● I2S2ext_SD and I2S3ext_SD: additional pins (mapped on the MISO pin) to control the<br />

I 2 S full duplex mode.<br />

An additional pin could be used when a master clock output is needed for some external<br />

audio devices:<br />

● MCK: Master Clock (mapped separately) is used, when the I 2 S is configured in master<br />

mode (and when the MCKOE bit in the SPI_I2SPR register is set), to output this<br />

additional clock generated at a preconfigured frequency rate equal to 256 × FS , where<br />

FS is the audio sampling frequency.<br />

The I 2 S uses its own clock generator to produce the communication clock when it is set in<br />

master mode. This clock generator is also the source of the master clock output. Two<br />

additional registers are available in I 2 S mode. One is linked to the clock generator<br />

configuration SPI_I2SPR and the other one is a generic I 2 S configuration register<br />

SPI_I2SCFGR (audio standard, slave/master mode, data format, packet frame, clock<br />

polarity, etc.).<br />

The SPI_CR1 register and all CRC registers are not used in the I 2 S mode. Likewise, the<br />

SSOE bit in the SPI_CR2 register and the MODF and CRCERR bits in the SPI_SR are not<br />

used.<br />

The I 2 S uses the same SPI register for data transfer (SPI_DR) in 16-bit wide mode.<br />

27.4.2 I2S full duplex<br />

To support I2S full duplex mode, two extra I 2 S instances called extended I2Ss (I2S2_ext,<br />

I2S3_ext) are available in addition to I2S2 and I2S3 (see Figure 287). The first I2S fullduplex<br />

interface is consequently based on I2S2 and I2S2_ext, and the second one on I2S3<br />

and I2S3_ext.<br />

Note: I2S2_ext an I2S3_ext are used only in full-duplex mode.<br />

Figure 287. I2S full duplex block diagram<br />

I2Sx_SCK<br />

I2S_ WS<br />

1. Where x can be 2 or 3.<br />

SPI/I2Sx<br />

I2Sx_ext<br />

817/1416 Doc ID 018909 Rev 3<br />

SPIx_MOSI/I2Sx_SD(in/out)<br />

I2Sx_extSD(in/out)<br />

MS19910V1

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

Saved successfully!

Ooh no, something went wrong!