I'm working on a project with an ESP32-dev-kit-C which should receive data from an ICS-52000 MEMS mic array.
Because the TDM format of the ICS-52000 is not directly supported by the IDF, I tried to invert the I2S-bit clock
for receiving stereo audio from 2 ICS-52000 in daisy chain.
In changed the I2S driver to set the I2S_TX_BCK_IN_INV bit in the I2S_TIMING_REG.
To test, if it worked, i read this bit and it can be set correctly.
I have to configure the I2S interface as master with
Code: Select all
i2s_config_t i2s_config = {
.mode = I2S_MODE_MASTER | I2S_MODE_RX,
.sample_rate = I2S_SAMPLE_RATE,
.bits_per_sample = I2S_SAMPLE_BITS,
.communication_format = I2S_COMM_FORMAT_I2S,
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,
.intr_alloc_flags = 0,
.dma_buf_count = 2,
.dma_buf_len = 1024,
.use_apll = 1,
.bck_inv = 1 // invert i2s bit clock for TDM input
};
So is this bit only for slave mode, when the I2S receives a bit clock in the wrong polarity?
Could you think of a way to implement a TDM format on the ESP32 like the one used by a ICS-52000 array?
I could not find any extra information about this bit outside of the technical reference manual, so I would really appreciate your help.