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

It will be: I 2 S bitrate = 32 x 2 x F S if the packet length is 32-bit wide.<br />

Figure 305. Audio sampling frequency definition<br />

sampling point<br />

16-bit or 32-bit Left channel 16-bit or 32-bit Right channel<br />

F S: Audio sampling frequency<br />

32-bits or 64-bits<br />

When the master mode is configured, a specific action needs to be taken to properly<br />

program the linear divider in order to communicate with the desired audio frequency.<br />

Figure 306. I 2 S clock generator architecture<br />

I2SxCLK<br />

8-bit Linear<br />

Divider +<br />

reshaping stage<br />

MCKOE ODD I2SDIV[7:0]<br />

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

Figure 305 presents the communication clock architecture. To achieve high-quality audio<br />

performance, the I2SxCLK clock source can be either the PLLI2S output (through R division<br />

factor) or an external clock (mapped to I2S_CKIN pin).<br />

The audio sampling frequency can be 192 kHz, 96 kHz, or 48 kHz. In order to reach the<br />

desired frequency, the linear divider needs to be programmed according to the formulas<br />

below:<br />

When the master clock is generated (MCKOE in the SPI_I2SPR register is set):<br />

FS = I2SxCLK / [(16*2)*((2*I2SDIV)+ODD)*8)] when the channel frame is 16-bit wide<br />

FS = I2SxCLK / [(32*2)*((2*I2SDIV)+ODD)*4)] when the channel frame is 32-bit wide<br />

When the master clock is disabled (MCKOE bit cleared):<br />

FS = I2SxCLK / [(16*2)*((2*I2SDIV)+ODD))] when the channel frame is 16-bit wide<br />

FS = I2SxCLK / [(32*2)*((2*I2SDIV)+ODD))] when the channel frame is 32-bit wide<br />

Table 123 provides example precision values for different clock configurations.<br />

Note: Other configurations are possible that allow optimum clock precision.<br />

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

F S<br />

Divider by 4<br />

I2SMOD<br />

Div2<br />

sampling point<br />

0<br />

1<br />

0<br />

1<br />

MCKOE<br />

CHLEN<br />

MCK<br />

CK

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

Saved successfully!

Ooh no, something went wrong!