5.3 I2SC Supported Sample Rates and Data Formats
I2SC supports a wide range of audio sample rates, including 32 kHz, 44.1 kHz, 48 kHz, 88.2 kHz, 96 kHz and 192 kHz.
In Master mode, the I2SC can generate a 32*fs to 1024*fs master clock (I2SMCK) that provides an over-sampling clock to an external audio codec or a digital signal processor (DSP).
It supports multiple data formats that include 32-bit, 24-bit, 20-bit, 18-bit, 16-bit and 8-bit mono and stereo formats. The 16-bit and 8-bit compact stereo formats are supported with left and right channel samples packed in the same word to reduce data transfers.
The slot length in an I2S frame can be defined as the number of bits occupied per channel, which includes both the actual data bits and the unused pad bits (zeros). The slot length in I2SC is configurable using the bit field DATALENGTH in the mode register (I2SC_MR). The table below shows the possible values for the DATALENGTH field and their corresponding slot lengths.
| I2SC_MR.DATALENGTH |
Word Length (useful data) |
Slot Length (useful data + pad bits) |
|---|---|---|
| 0 | 32 bits | 32 |
| 1 | 24 bits |
32 if I2SC_MR.IWS = 0 24 if I2SC_MR.IWS = 1 |
| 2 | 20 bits | |
| 3 | 18 bits | |
| 4 | 16 bits |
16 |
| 5 | 16 bits compact stereo | |
| 6 | 8 bits |
8 |
| 7 | 8 bits compact stereo |
The data words are right-justified in the receive holding register (I2SC_RHR) and the transmit holding register (I2SC_THR). The I2SC_RHR and I2SC_THR registers are used for data reception and transmission, respectively.
For the 16-bit compact stereo data format, the left sample uses bits 15:0, and the right sample uses bits 31:16 of the same data word. For the 8-bit compact stereo data format, the left sample uses bits 7:0, and the right sample uses bits 15:8 of the same data word.
The I2SC supports the mono audio format where only the left channel is used. When the Transmit Mono bit (TXMONO) in I2SC_MR is set, data written to the left channel is duplicated to the right output channel.
When the Receive Mono bit (RXMONO) in I2SC_MR is set, data received from the left channel is duplicated to the right channel.
