Open EfanovIvan opened 1 year ago
Possibly this issue was reported and addressed in https://github.com/espressif/esp-idf/pull/10997
The backport is available in the release/v5.0 branch as well: https://github.com/espressif/esp-idf/commit/7bfc40b5fb98da81521e86bbe0b66b5e61d0c95e
@suda-morris Thanks for the quick response!
I updated to the last commit but unfortunately the fix did not help
I (977) cpu_start: ESP-IDF: v5.0.1-464-gef4b1b7704-dirty
I also looked at the pullquest and did not find the function
esp_err_t function there i2s_channel_init_pdm_rx_mode(i2s_chan_handle_t handle, const i2s_pdm_rx_config_t *pdm_rx_cfg)
This function also sets the interrupt flag
ESP_GOTO_ON_ERROR(i2s_init_dma_intr(handle, ESP_INTR_FLAG_LEVEL1), err, TAG, "initialize dma interrupt failed");
I tried changing I2S_INTR_ALLOC_FLAGS
to this value but it didn't help
Hi @EfanovIvan, I can't reproduce the issue only by initializing I2S and USB console, not sure if I missed anything, here is my test codes, could you give more details to reproduce this issue?
#include <stdio.h>
#include "esp_check.h"
#include "driver/i2s_pdm.h"
#include "driver/usb_serial_jtag.h"
#include "esp_console.h"
void init_i2s()
{
i2s_chan_handle_t rxHandle = NULL;
i2s_chan_config_t chanCfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER);
ESP_ERROR_CHECK(i2s_new_channel(&chanCfg, NULL, &rxHandle));
i2s_pdm_rx_config_t pdmRxCfg = {
.clk_cfg = I2S_PDM_RX_CLK_DEFAULT_CONFIG(16000),
/* The default mono slot is the left slot (whose 'select pin' of the PDM microphone is pulled down) */
.slot_cfg = I2S_PDM_RX_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_MONO),
.gpio_cfg = {
.clk = 1,
.din = 2,
.invert_flags = {
.clk_inv = false,
},
},
};
ESP_ERROR_CHECK(i2s_channel_init_pdm_rx_mode(rxHandle, &pdmRxCfg));
ESP_ERROR_CHECK(i2s_channel_enable(rxHandle));
}
void init_usb_serial_jtag()
{
esp_console_repl_t* pRepl = NULL;
esp_console_repl_config_t replCfg = ESP_CONSOLE_REPL_CONFIG_DEFAULT();
esp_console_dev_usb_serial_jtag_config_t usbjtag_config = ESP_CONSOLE_DEV_USB_SERIAL_JTAG_CONFIG_DEFAULT();
ESP_ERROR_CHECK(esp_console_new_repl_usb_serial_jtag(&usbjtag_config, &replCfg, &pRepl));
ESP_ERROR_CHECK(esp_console_start_repl(pRepl));
}
void app_main(void)
{
init_usb_serial_jtag();
init_i2s();
}
Hello @L-KAYA I will build a test project and upload it.
I have the same issue using a full duplex ES8388 codec in parallel with TUSB in midi configuration, is this still open?
Answers checklist.
IDF version.
v5.0.1
Operating System used.
Windows
How did you build your project?
Command line with idf.py
If you are using Windows, please specify command line type.
CMD
Development Kit.
ESP32-S3-WROOM-1-N16R8
Power Supply used.
USB
What is the expected behavior?
Simultaneous operation of USB and i2s.
What is the actual behavior?
I am getting the following error when initializing i2s
Initialization code
Steps to reproduce.
Initialize usb
After that i2s, the code is shown above
Debug Logs.
No response
More Information.
No response