The maximum clock I have seen seems to relate to this comment in section "12.3 The Clock of I2S Module":
This means that if you use the APLL the max is 7.8125MHz and if you use the PLL_F160 (not as accurate) you get 10 MHzWhen ESP32 I2S works in slave mode, the master must use I2Sn_CLK as the master clock and fi2s >= 8 *
fBCK.
My code is setting the I2S to Master mode, but I am unable to get above 10 MHz. Is there a way to have a PDM microphone connected in "master mode" with a higher clock rate?
Code:
Code: Select all
i2s_config_t i2s_config = {
.mode = (i2s_mode_t)(I2S_MODE_MASTER | I2S_MODE_RX | I2S_MODE_PDM),
.sample_rate = sampleRate,
.bits_per_sample = I2S_BITS_PER_SAMPLE_16BIT,
.channel_format = t_channel,
.communication_format = i2s_comm_format_t(I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_PCM_SHORT), //(I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_PCM_SHORT),//
.intr_alloc_flags = 0, //ESP_INTR_FLAG_LEVEL1,
.dma_buf_count = 4,
.dma_buf_len = 512,
.use_apll = false,
.tx_desc_auto_clear = false,
.fixed_mclk = 0,
};