Did anybody test I2S RX? which pin should be used as DATA?
I used example code in peripherals/i2s and changed it to RX mode, then use 'i2s_pop_sample()' to receive I2S data, but got none.
Code: Select all
i2s_config_t i2s_config = {
.mode = I2S_MODE_SLAVE | I2S_MODE_RX, // Only RX
.sample_rate = SAMPLE_RATE,
.bits_per_sample = 32, //32-bit per channel
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, //2-channels
.communication_format = I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB,
.dma_buf_count = 14,
.dma_buf_len = 64, //
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1 //Interrupt level 1
};
i2s_pin_config_t pin_config = {
.bck_io_num = 26,
.ws_io_num = 25,
.data_out_num = -1, //Not used
.data_in_num = 22
};
Thanks,
Bill.Zhang