12 I2S Controller (I2S)
Table 12-5. The Register Configuration to Which the Four Modes Correspond
I2S_RX_MSB_RIGHT
0
1
12.4.6 I2S Master/Slave Mode
The ESP32 I2S module can be configured to act as a master or slave device on the I2S bus. The module sup-
ports slave transmitter and receiver configurations in addition to master transmitter and receiver configurations.
All these modes can support full-duplex and half-duplex communication over the I2S bus.
I2S_RX_SLAVE_MOD bit and I2S_TX_SLAVE_MOD bit of register I2S_CONF_REG can configure I2S to slave
receiving mode and slave transmitting mode, respectively.
I2S_TX_START bit of register I2S_CONF_REG is used to enable transmission. When I2S is in master transmitting
mode and this bit is set, the module will keep driving the clock signal and data of left and right channels. If
FIFO sends out all the buffered data and there are no new data to shift, the last batch of data will be looped
on the data line. When this bit is reset, master will stop driving clock and data lines. When I2S is configured to
slave transmitting mode and this bit is set, the module will wait for the master BCK clock to enable a transmit
operation.
The I2S_RX_START bit of register I2S_CONF_REG is used to enable a receive operation. When I2S is in master
receiving mode and this bit is set, the module will keep driving the clock signal and sampling the input data
stream until this bit is reset. If I2S is configured to slave receiving mode and this bit is set, the receiving module
will wait for the master BCK clock to enable a receiving operation.
12.4.7 I2S PDM
As is shown in Figure 12-1, ESP32 I2S0 allows for pulse density modulation (PDM), which enables fast conversion
between pulse code modulation (PCM) and PDM signals.
The output clock of PDM is mapped to the I2S0*_WS_out signal. Its configuration is identical to I2S's BCK.
Please refer to section 12.3, "The Clock of I2S Module", for further details. The bit width for both received and
transmitted I2S PCM signals is 16 bits.
Espressif Systems
I2S_RX_CHAN_MOD
mode0
0
1
+ right channel
2
3
0
1
right channel
+ left channel
2
3
Submit Documentation Feedback
mode1
-
left channel +
left channel
left channel
right channel +
right channel
-
-
right channel +
right channel
left channel +
left channel
-
321
mode2
mode3
-
left channel +
left channel
left channel
+ right channel
right channel +
right channel
-
-
right channel +
right channel
right channel
+ left channel
left channel +
left channel
-
ESP32 TRM (Version 5.2)
Need help?
Do you have a question about the ESP32 and is the answer not in the manual?