29.6.1 Principle of Operation
The I2S uses three or four communication lines for synchronous data transfer:
- SDm for receiving or transmitting in Serializer m (m=0..1)
- SCKn for the serial clock in Clock Unit n (n=0..1)
- FSn for the frame synchronization or I2S word select, identifying the beginning of each frame
- Optionally, MCKn to output an oversampling clock to an external codec
I2S data transfer is frame based, where a serial frame:
- Starts with the frame synchronization active edge, and
- Consists of 1 to 8 data slots, that are 8-, 16-, 24-, or 32-bit wide.
Each data slot is used to transfer one data sample of 8, 16, 18, 20, 24 or 32 bits.
Frame based data transfer is described in the following figure:
I2S supports multiple data formats such as:
- 32-, 24-, 20-, 18-, 16-, and 8-bit mono or stereo format
- 16- and 8-bit compact stereo format, with left and right samples packed in the same word to reduce data transfers
In mono format, Transmit mode, data written to the left channel is duplicated to the right output channel. In mono format, Receiver mode, data received from the right channel is ignored and data received from the left channel is duplicated in to the right channel.
In mono format, TDM Transmit mode with more than two slots, data written to the even-numbered slots is duplicated in to the following odd-numbered slot.
In mono format, TDM Receiver mode with more than two slots, data received from the even-numbered slots is duplicated in to the following odd-numbered slot.
Mono format can be enabled by writing a '1' to the MONO bit in the Serializer m Control register (SERCTRLm.MONO).
I2S support different data frame formats:
- 2-channel I2S with Word Select
- 1- to 8-slot Time Division Multiplexed (TDM) with Frame Sync and individually enabled slots
- 1- or 2-channel Pulse Density Modulation (PDM) reception for MEMS microphones
- 1-channel burst transfer with non-periodic Frame Sync
In 2 channel I2S mode, number of slots configured is one or two and successive data words corresponds to left and right channel. Left and right channel are identified by polarity of Word Select signal (FSn signal). Each frame consists of one or two data word(s). In the case of compact stereo format, the number of slots can be one. When 32-bit slot size is used, the number of slots can be two.
In TDM format, number slots can be configured up to 8 slots. If 4 slots are configured, each frame consists of 4 data words.
In PDM format, continuous 1-bit data samples are available on the SDI line for each SCKn rising and SCKn falling edge as in case of a MEMS microphone with PDM interface.
1-channel burst transfer with non-periodic Frame Sync mode is useful typically for passing control non-auto data as in case of DSP. In Burst mode, a single Data transfer starts at each Frame Sync pulse, and these pulses are 1-bit wide and occur only when a Data transfer is requested.
Sections I2S Format - Reception and Transmission Sequence with Word Select, TDM Format - Reception and Transmission Sequence and I2S Application Examples describe more about frame/data formats and register settings required for different I2S applications.