Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the settings for xiao esp32s3 sense #2

Open
mqgw opened this issue Sep 14, 2024 · 2 comments
Open

How to change the settings for xiao esp32s3 sense #2

mqgw opened this issue Sep 14, 2024 · 2 comments

Comments

@mqgw
Copy link

mqgw commented Sep 14, 2024

Recently I tried to reuse the code for xiao esp32s3 sense. Have tried to change the GPIO as below, but failed to wake the chips. Besides these changes, what else needs the change?

chan_cfg.id = I2S_NUM_1;
ESP_ERROR_CHECK(i2s_new_channel(&chan_cfg, nullptr, &rx_handle_));
std_cfg.clk_cfg.sample_rate_hz = (uint32_t)input_sample_rate_;
std_cfg.gpio_cfg.bclk = (gpio_num_t)42; //CONFIG_AUDIO_DEVICE_I2S_MIC_GPIO_BCLK;
std_cfg.gpio_cfg.ws = I2S_GPIO_UNUSED;//(gpio_num_t)CONFIG_AUDIO_DEVICE_I2S_MIC_GPIO_WS;
std_cfg.gpio_cfg.dout = I2S_GPIO_UNUSED;
std_cfg.gpio_cfg.din = (gpio_num_t)41; //CONFIG_AUDIO_DEVICE_I2S_GPIO_DIN;
@78
Copy link
Owner

78 commented Sep 15, 2024

What do you mean by "wake the chips"?
I am not very familiar with I2S either. I have only been working with it for a month. But as far as I know, the WS pin needs to be set. If you are also using INMP441.
XIAO esp32s3 has too few GPIO pins. You should use duplex mode to share the BCLK and WS pins if you have a speaker and a microphone both connected.

@mqgw
Copy link
Author

mqgw commented Sep 22, 2024

Thanks. After several tests, the issue can be solved by changing I2S from std to pdm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants