Nations Technologies Inc.
Tel
:
+86-755-86309900
:
info@nationstech.com
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
527
/
631
I
2
S function description
The block diagram of I2S is shown in the figure below:
Figure 24-13 I
2
S block diagram
The I2S interface uses the same pins, flags and interrupts as the SPI interface. Setting the SPI_I2SCFG.MODSEL =
1 selects the I2S audio interface.
I2S has a total of 4 pins, 3 of which are shared with SPI:
CLK: Serial clock (shared with SCLK pin), CLK generates a pulse every time 1-bit audio data is sent.
SD: Serial data (shared with MOSI pin), used for data send and receive;
WS: Channel selection (shared with NSS pin), used as data control signal output in master mode, and used as
input in slave mode;
Tx buffer
Shift register
Rx buffer
SPI_STS
Communication circuit
BUSY
OVER
MODER
R
CRC
ERR
UNDER
CHSIDE
TE
RNE
MODCFG[1:0]
STDSEL[1:0]
CLK
POL
TDATLEN[1:0]
CH
BITS
LSBFF
SPIEN
MSEL
CLK
POL
CLK
PHA
BIDIR
MODE
BIDIRO
EN
CRCEN
CRC
NEXT
DATFF
RONLY
SSMEN
SSEL
Baud rate generator
Main controller
SPI_CTRL1
MOSI/SD
MISO
NSS/WS
CLK
LSBFF
control bit
16-bit
Address and data bus
BR[2:0]
-
-
-
-
-
-
MOD
SEL
I2SEN
I2S clock generator
MCLK
MODSEL
I2Sx CLK
SPI_I2SCFG
SPI_I2SPREDIV
16-bit
MCLK
OEN
ODD_
EVEN
LDIV[7:0]