I2S RX issue

Bill.Zhang
Posts: 2
Joined: Tue Feb 07, 2017 4:07 am

I2S RX issue

Postby Bill.Zhang » Tue Feb 07, 2017 4:31 am

Hi all,

Did anybody test I2S RX? which pin should be used as DATA?

I used example code in peripherals/i2s and changed it to RX mode, then use 'i2s_pop_sample()' to receive I2S data, but got none.

Code: Select all

 
    i2s_config_t i2s_config = {
        .mode = I2S_MODE_SLAVE | I2S_MODE_RX,                                  // Only RX
        .sample_rate = SAMPLE_RATE,
        .bits_per_sample = 32,                                                  //32-bit per channel
        .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT,                           //2-channels
        .communication_format = I2S_COMM_FORMAT_I2S | I2S_COMM_FORMAT_I2S_MSB,
        .dma_buf_count = 14,
        .dma_buf_len = 64,                                                      //
        .intr_alloc_flags = ESP_INTR_FLAG_LEVEL1                                //Interrupt level 1
    };
    i2s_pin_config_t pin_config = {
        .bck_io_num = 26,
        .ws_io_num = 25,
        .data_out_num = -1,                                                          //Not used
        .data_in_num = 22                                                       
    };
    
I suspect the pin is not correct for RX, does anybody know if the pin is okay? or have any other clue to this issue? thanks!

Thanks,
Bill.Zhang

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: I2S RX issue

Postby BuddyCasino » Tue Feb 07, 2017 6:04 pm

I'll also try this with an I2S MEMS microphone chip. I'd be interested in any new findings and will post once I've got something working, could be a few weeks though.

Bill.Zhang
Posts: 2
Joined: Tue Feb 07, 2017 4:07 am

Re: I2S RX issue

Postby Bill.Zhang » Wed Feb 08, 2017 8:29 am

Welcome you to share when you get some results :)

I can't find any information about I2S pins from ESP32 document :( .

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: I2S RX issue

Postby BuddyCasino » Fri Mar 31, 2017 2:01 am

Just tried it, getting no signal at all on the data line though with a ICS-43434. Which hardware are you using? Did you get it to work?

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

Re: I2S RX issue

Postby ESP_Sprite » Fri Mar 31, 2017 3:18 am

FYI, we're aware that there are some issues with Rx on the current I2S driver. We have a merge request in the queue that contains a fair amount of fixes to the I2S driver, including this issue. It may take a few days to be accepted and trickle through to Github, however.

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: I2S RX issue

Postby BuddyCasino » Wed Apr 05, 2017 11:29 am

Thanks for the information, thats good to know.
I've tried the SPH0645LM4H mic in the meantime and while the data line shows signs of life, its mostly noise.

BuddyCasino
Posts: 263
Joined: Sun Jun 19, 2016 12:00 am

Re: I2S RX issue

Postby BuddyCasino » Fri Apr 21, 2017 6:41 am

@ESP_Sprite: any news regarding this issue? You guys do a great job and I don't want to complain, but every day I do a git pull, its the 5 stages of grief all over again.

jaracil
Posts: 11
Joined: Sat Apr 02, 2016 4:24 pm

Re: I2S RX issue

Postby jaracil » Sun Apr 23, 2017 5:14 pm

Hi.
I2S Driver is broken for 32 bit mode.
See technical book (section 8.4.5 page 163) :
https://espressif.com/sites/default/fil ... ual_en.pdf

You can see four posible RX_I2S_FIFO_MOD:

Code: Select all

0 16-bit dual channel data
1 16-bit single channel data
2 32-bit dual channel data
3 32-bit single channel dat
... but I2S Driver only uses 0 and 1 modes.

Code: Select all

I2S[i2s_num]->fifo_conf.rx_fifo_mod = i2s_config->channel_format < I2S_CHANNEL_FMT_ONLY_RIGHT ? 0 : 1;

Who is online

Users browsing this forum: No registered users and 118 guests