![Nations N32G43 Series Скачать руководство пользователя страница 561](http://html1.mh-extra.com/html/nations/n32g43-series/n32g43-series_user-manual_3408051561.webp)
Nations Technologies Inc.
Tel
:
+86-755-86309900
:
Address: Nations Tower, #109 Baoshen Road, Hi-tech Park North.
Nanshan District, Shenzhen, 518057, P.R.China
538
/
631
The channel corresponding to the currently transmitted data can be confirmed by the SPI_STS.CHSIDE bit. When
the SPI_STS.RNE flag bit is set to 1, the SPI_STS.CHSIDE value is updated.
The operation of reading data depends on the selected I
2
S standard. See Section 24.4.1 for details.
When I
2
S function is turned off, different audio standards, data length and channel length adopt different operation
steps:
Data length is 16 bits, channel length is 32 bits (SPI_I2SCFG.TDATTLEN = 00, SPI_I2SCFG.CHBITS = 1),
LSB alignment standard (SPI_I2SCFG.STDSEL = 10).
1.
Wait for the penultimate RNE flag (SPI_STS.RNE) bit to be set to' 1'.
2.
Software delay, waiting for 17 I
2
S clock cycles.
3.
Turn off I
2
S (SPI_I2SCFG.I2SEN=0).
The data length is 16 bits, the channel length is 32 bits (SPI_I2SCFG.TDATLEN = 00 and
SPI_I2SCFG.CHBITS = 1), the MSB alignment standard (SPI_I2SCFG.STDSEL = 01), I
2
S Philips standard
(SPI_I2SCFG.STDSEL = 00) or PCM standard (SPI_I2SCFG.STDSEL = 11)
1.
Wait for the last RNE flag (SPI_STS.RNE) bit to be set to' 1'.
2.
Software delay, waiting for 1 I
2
S clock cycle.
3.
Turn off I
2
S (SPI_I2SCFG.I2SEN = 0).
Other combinations of SPI_I2SCFG.TDATLEN and SPI_I2SCFG.CHBITS and any audio mode selected by
SPI_I2SCFG.STDSEL:
1.
Wait for the penultimate RNE flag (SPI_STS.RNE) bit to be set to' 1'.
2.
Software delay, waiting for 1 I
2
S clock cycle.
3.
Turn off I
2
S (SPI_I2SCFG.I2SEN = 0).
Slave mode
The receiving process of the slave mode is similar to that of the master mode, with the following differences:
The CHSIDE flag (SPI_STS.CHSIDE) indicates which channel corresponds to the currently transmitted data.
Compared with the master mode receiving process, in the slave mode, SPI_STS.CHSIDE depends on the WS signal
of the external master device. When the I2S function is turned off, clear the SPI_I2SCFG.I2SEN bit to 0 when the
SPI_STS.RNE flag is 1.
Status flag
There are the following 4 flag bits in the SPI_STS register for monitoring the status of the I2S bus.
TX buffer empty flag (TE)
When the send buffer is empty, this flag is set to 1, indicating that new data can be written into the SPI_DAT register.
When the send buffer is not empty, this flag is cleared to 0.
RX buffer not empty flag (RNE)