Skip to content

Commit 978896a

Browse files
committed
docs(i2s): update i2s cap overview
1 parent 53d2d67 commit 978896a

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

components/esp_driver_i2s/test_apps/i2s_multi_dev/main/test_i2s_multi_dev.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,17 @@ static void test_i2s_tdm_slave(uint32_t sample_rate, i2s_data_bit_width_t bit_wi
182182
};
183183
#if SOC_I2S_SUPPORTS_APLL
184184
i2s_tdm_config.clk_cfg.clk_src = I2S_CLK_SRC_APLL;
185+
/* APLL clock source can only reach upto 125MHz, and the max BCLK among these cases is 6.144 MHz
186+
The BCLK can only be 10 using APLL clock source, see the reason below
187+
Formula: MAX_BCLK = 48K * 32 * 4 = 6.144 MHz. MAX_BCLK_DIV <= (125 /2) / MAX_BCLK */
185188
i2s_tdm_config.clk_cfg.bclk_div = 10;
186189
#else
190+
/* The greater the bclk division is, the greater mclk frequency will be, and the less data latency the slave will have
191+
As the sample rate of the test cases are high, we need a greater BCLK division to reduce the slave data latency,
192+
Otherwise the large data latency will cause the data shifted when receiving on the master side.
193+
However, due to the MCLK limitation(i.e., less or equal than half of the source clock),
194+
the max bclk division is depended on the source clock, sample rate and the bclk ticks in one frame
195+
Formula: MAX_BCLK = 48K * 32 * 4 = 6.144 MHz. MAX_BCLK_DIV <= (160 /2) / MAX_BCLK */
187196
i2s_tdm_config.clk_cfg.bclk_div = 12;
188197
#endif
189198
TEST_ESP_OK(i2s_channel_init_tdm_mode(i2s_tdm_tx_handle, &i2s_tdm_config));

docs/en/api-reference/peripherals/i2s.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ ESP32-C6 I2S 0 I2S 0 none I2S 0 none none
125125
ESP32-S3 I2S 0/1 I2S 0 I2S 0 I2S 0/1 none none
126126
ESP32-H2 I2S 0 I2S 0 none I2S 0 none none
127127
ESP32-P4 I2S 0~2 I2S 0 I2S 0 I2S 0~2 none none
128-
ESP32-C5 I2S 0 I2S 0 none I2S 0 none none
128+
ESP32-C5 I2S 0 I2S 0 I2S 0 I2S 0 none none
129+
ESP32-C61 I2S 0 I2S 0 I2S 0 I2S 0 none none
129130
========= ======== ======== ======== ======== ======== ==========
130131

131132
Standard Mode

docs/zh_CN/api-reference/peripherals/i2s.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ ESP32-C6 I2S 0 I2S 0 无 I2S 0 无 无
125125
ESP32-S3 I2S 0/1 I2S 0 I2S 0 I2S 0/1 无 无
126126
ESP32-H2 I2S 0 I2S 0 无 I2S 0 无 无
127127
ESP32-P4 I2S 0~2 I2S 0 I2S 0 I2S 0~2 无 无
128-
ESP32-C5 I2S 0 I2S 0 无 I2S 0 无 无
128+
ESP32-C5 I2S 0 I2S 0 I2S 0 I2S 0 无 无
129+
ESP32-C61 I2S 0 I2S 0 I2S 0 I2S 0 无 无
129130
========= ======== ======== ======== ======== ======== ==========
130131

131132
标准模式

0 commit comments

Comments
 (0)