Code: Select all
i2s_config_t i2s_config = {
.mode = I2S_MODE_MASTER | I2S_MODE_TX |I2S_MODE_RX , // Only RX
.sample_rate = SAMPLE_RATE,
.bits_per_sample = I2S_BITS,
.channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, //2-channels
.communication_format = I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_PCM_SHORT,
.dma_buf_count = 8,
.dma_buf_len = 256,
.use_apll = true,
.intr_alloc_flags = ESP_INTR_FLAG_LEVEL1 //Interrupt level 1
};
i2s_pin_config_t pin_config = {
.bck_io_num = 32,
.ws_io_num = 33,
.data_in_num = 34,
.data_out_num = 22,
};
i2s_driver_install(I2S_NUM, &i2s_config, 0, NULL);
i2s_set_pin(I2S_NUM, &pin_config);
es7243 sent out i2s data, but esp32 could not get data using i2s_pop_sample or i2s_read_bytes. I printed the register data and found that the value of the I2S_IN_EOF_DES_ADDR_REG register is 0. More register data is as follows:
Code: Select all
reg[0x3ff4f000] = 0
reg[0x3ff4f004] = 0
reg[0x3ff4f008] = 430b0
reg[0x3ff4f00c] = 8aa
reg[0x3ff4f010] = 0
reg[0x3ff4f014] = 7200
reg[0x3ff4f018] = 0
reg[0x3ff4f01c] = 0
reg[0x3ff4f020] = 181820
reg[0x3ff4f024] = 100
reg[0x3ff4f028] = 0
reg[0x3ff4f02c] = 0
reg[0x3ff4f030] = bb8dc
reg[0x3ff4f034] = bdaa8
reg[0x3ff4f038] = 3ffbb91c
reg[0x3ff4f03c] = 0
reg[0x3ff4f040] = 0
reg[0x3ff4f044] = 0
reg[0x3ff4f048] = 3ffbdac8
reg[0x3ff4f04c] = 3ffbdab8
reg[0x3ff4f050] = bffbbe68
reg[0x3ff4f054] = 3ffbb8dc
reg[0x3ff4f058] = 3ffbb94c
reg[0x3ff4f05c] = bffbb4b4
reg[0x3ff4f060] = 100
reg[0x3ff4f064] = 0
reg[0x3ff4f068] = 800
reg[0x3ff4f06c] = 482fb8dc
reg[0x3ff4f070] = 802fdab8
reg[0x3ff4f074] = 810
reg[0x3ff4f078] = 0
reg[0x3ff4f07c] = 0
reg[0x3ff4f080] = 80007fff
reg[0x3ff4f084] = a0500
reg[0x3ff4f088] = 502a4
reg[0x3ff4f08c] = 8a80339
reg[0x3ff4f090] = a0178a05
reg[0x3ff4f094] = 28
reg[0x3ff4f098] = 0
reg[0x3ff4f09c] = 0
reg[0x3ff4f0a0] = 89
reg[0x3ff4f0a4] = a
reg[0x3ff4f0a8] = 0
reg[0x3ff4f0ac] = fc427
reg[0x3ff4f0b0] = 410208
reg[0x3ff4f0b4] = 1550020
reg[0x3ff4f0b8] = f01b9