Accessing two channels of i2s

Hi,I am using NRF5340 AUDIO DK BOARD and Ihave been trying to access i2s mic and I want to transfer the mic data to Amplifier .Is it possible to do with single I2s ? As I observe nrf5340  has two channels.If it possible how to configure pins for mic and amplifier as I have been using SCK,SDIN,LRCK but if want to configure for Amplifier what pins can I use for it as it doesn't have other SCK,LRCK pins.And I want to know difference between MCK and SCK in i2s configuration,Ihave attached the i2s configuration below.

  • I believe this is possible, yes. You would then need to read the data from the microphone, then take the buffer from the microphone and send it (using i2s_buf_write) to the amplifier. It would require two instances of I2S. This is why, if you don't need the raw data from the microphone, you could try to connect the output of the I2S from the microphone directly to the amplifier, and test if that works. This would reduce the delay, as you wouldn't need first receive then transmit the PCM data.

    BR,
    Edvin

  • In that specified case,No, we cannot connect microphone directly to the amplifier, we need to get the raw data from microphone and process it by adding filters, volume controls which is required in our application.

    We want to know is it possible to do the above explained method with this Single I2S with two channel configuration.?

    So for that processing of raw data and need to send for amplification at same time .So to achieve how can i use the buffer to perform.This is actual case .My sampling Rate is 16khz.

  • I take that back. The nRF5340 only has one I2S instance. Do you need to transmit data both ways for the microphone? Something to set it up? Or is it sufficient to only receive?

    And how about the amplifier? I guess you want the PCM data coming back from the amplifier as well? In that case, this actually may not work. Unless you either bitbang the microphone, or you would need to uninit one device, initialize the other, and keep swapping between these, which means that at least half the time you will not be able to record from the microphone. 

    BR,
    Edvin

  • I take that back. The nRF5340 only has one I2S instance. Do you need to transmit data both ways for the microphone? Something to set it up? Or is it sufficient to only receive?

    OK,I want to receive data from MIC and apply filters to that audio.Here what does instance represent-The  Channels?Because I saw in datasheet nrf5340 has 2-channels.So thought to use one for Rx for mic and one for Tx to Amplifier.So make me confirm we can perform in this controller

    And how about the amplifier? I guess you want the PCM data coming back from the amplifier as well?

    Here I will use Tx and want to transmit data from processed mic data by applying filters and I just want to play that in Speakers.But this I want with no data loss

  • As long as you don't need any data back from the amplifier to the nRF, then I would assume that you can use the RX pin on the microphone, and the TX pin for the amplifier.

    Best regards,

    Edvin

Related