i2s mclk output voltage level is uncorrect when output frequency >12.288mhz

yureny
Posts: 2
Joined: Thu Dec 07, 2023 9:29 am

i2s mclk output voltage level is uncorrect when output frequency >12.288mhz

Postby yureny » Thu May 23, 2024 6:12 am

i'm now using i2s interface to build my project.I create my project according to the official example "i2s_std". however, i found that the mclk (gpio1) cannot output the stble frequency (>=12.288mhz).the maximum output level is 2.2v(<3.3v). the minimum ouptut level is 700mv(>0v).is this correct?
here,i show you the waveform captured by logic analyzer.
void i2s_init(void)
{

/* Setp 1: Determine the I2S channel configuration and allocate both channels
* The default configuration can be generated by the helper macro,
* it only requires the I2S controller id and I2S role */
i2s_chan_config_t chan_cfg = I2S_CHANNEL_DEFAULT_CONFIG(I2S_NUM_AUTO, I2S_ROLE_MASTER);
ESP_ERROR_CHECK(i2s_new_channel(&chan_cfg, &tx_chan, &rx_chan));
/* Step 2: Setting the configurations of standard mode, and initialize rx & tx channels
* The slot configuration and clock configuration can be generated by the macros
* These two helper macros is defined in 'i2s_std.h' which can only be used in STD mode.
* They can help to specify the slot and clock configurations for initialization or re-configuring */
i2s_std_config_t std_cfg = {
.clk_cfg = I2S_STD_CLK_DEFAULT_CONFIG(48000),
.slot_cfg = I2S_STD_PHILIPS_SLOT_DEFAULT_CONFIG(I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO),
.gpio_cfg = {
.mclk = GPIO_NUM_1, // some codecs may require mclk signal, this example doesn't need it
.bclk = SPEAKER_BCK,
.ws = SPEAKER_WCK,
.dout = SPEAKER_DI,/*ESP的DO是原理图上的DI*/
.din = I2S_GPIO_UNUSED,
.invert_flags = {
.mclk_inv = false,
.bclk_inv = false,
.ws_inv = false,
},
},
};

ESP_ERROR_CHECK(i2s_channel_init_std_mode(tx_chan, &std_cfg));
ESP_ERROR_CHECK(i2s_channel_init_std_mode(rx_chan, &std_cfg));
ESP_ERROR_CHECK(i2s_channel_enable(tx_chan));
}
Attachments
捕获.PNG
WAVEFORM
捕获.PNG (421.2 KiB) Viewed 786 times

ESP_Sprite
Posts: 9727
Joined: Thu Nov 26, 2015 4:08 am

Re: i2s mclk output voltage level is uncorrect when output frequency >12.288mhz

Postby ESP_Sprite » Thu May 23, 2024 6:50 am

Note that that signal is not a square wave: I think you have too much capacitance (either from the LA probe or otherwise) on that pin for the signal to properly go high or low in the timespan given by that frequency.

Who is online

Users browsing this forum: Baidu [Spider] and 85 guests