我想吧ESP32的I2S0_CLK输出到GPIO0的CLK_OUT1,吧I2S1_CLK输出到GPIO1的CLK_OUT3,
查找了相关代码,只有APLL输出到GPIO0的CLK_OUT1的代码 REG_WRITE(PIN_CTRL, 6);
手册上的描述对不上
要将I2S0 外设时钟输出到:
CLK_OUT1,配置PIN_CTRL[3:0] = 0x0;
CLK_OUT2,配置PIN_CTRL[3:0] = 0x0 and PIN_CTRL[7:4] = 0x0;
CLK_OUT3,配置PIN_CTRL[3:0] = 0x0 and PIN_CTRL[11:8] = 0x0。
要将I2S1 外设时钟输出到:
CLK_OUT1,配置PIN_CTRL[3:0] = 0xF;
CLK_OUT2,配置PIN_CTRL[3:0] = 0xF and PIN_CTRL[7:4] = 0x0;
CLK_OUT3,配置PIN_CTRL[3:0] = 0xF and PIN_CTRL[11:8] = 0x0。(读/写)
I2S0_CLK输出到GPIO0的CLK_OUT1,吧I2S1_CLK输出到GPIO1的CLK_OUT3,要如何配置PIN_CTRL寄存器
ESP32输出I2S0_CLK和I2S1_CLK
-
- Posts: 184
- Joined: Fri Dec 15, 2017 2:45 am
Re: ESP32输出I2S0_CLK和I2S1_CLK
你好, 直接使用 api esp_err_t i2s_set_pin(i2s_port_t i2s_num, const i2s_pin_config_t *pin), 既可以配置 I2S 的 GPIO。
若输出 MCLK ,则可以使用 esp_err_t i2s_mclk_gpio_select(i2s_port_t i2s_num, gpio_num_t gpio_num); 。
若输出 MCLK ,则可以使用 esp_err_t i2s_mclk_gpio_select(i2s_port_t i2s_num, gpio_num_t gpio_num); 。
Who is online
Users browsing this forum: Baidu [Spider] and 61 guests