How to connect external 3.3V I/F I2S signal to nrf5340-audio-dk

Hello,
devzone.nordicsemi.com/.../set-nrf5340-audio-dk-as-i2s-slave-over-external-bus
Based on this post, I changed I2S to SLAVE setting.
The external I2S I/F level is 3.3V.
When OB/EXT is green, it is noisy when I2S of 3.3V I/F is connected to P5, but we have confirmed that the audio signal is sent to the RX side and the sound is heard.


devzone.nordicsemi.com/.../access-to-i2s-interface-on-nrf5340-audio-dk

Based on this post, I tried changing the I2S port.
If OB/EXT lights up orange, does that mean the port has been changed to P10 instead of P5?

But when OB/EXT is orange, there is no sound even if you forcefully connect the 3.3V I/F to P10.

Also, in order to change the 3.3V I/F to 1.8V I/F, I changed the I2S signal level using TI's TXS0108E.
When I connect the nrF5340 to the enabled I2S port (P5 or P10), I checked with an oscilloscope and found that there is quite a lot of noise on the I2S signal.
Since it is a bidirectional buffer, it seems that the noise component is flowing backwards, or the GND level is not stable and crosstalk noise is being buffered.

Is there a way to run nrF5340-audio-DK with 3.3V I/F?
Or is there a good way to make I2S a 1.8V I/F?

Parents
  • Hello,

    When connected to P5, I found that the output of CIRRUS's CODEC collided with the external 3.3V I/F, causing the audio to be heard mixed with noise.
    With the P5 connection, even if the level shift is correct, noise (output from CIRRUS) will be mixed in the I2S DATA line and no sound will be produced.

    Also, I have connected the P10 to the 1.8V I/F I2S with a software setting that turns OB/EXT orange, but there is no sound.
    Could you please give me detailed steps to use external hardware codec?

  • Hello,

    Just to aid my understanding so that I may best advice you, is your overall goal to interface the nRF5340 Audio DK with an external hardware codec that outputs I2S at 3.3V?

    MontBlanc said:
    Could you please give me detailed steps to use external hardware codec?

    Please follow these steps to work with an external hardware codec:



    Best regards,
    Karl

  • Hello,
    The environment I tried is as follows.

    Environment of external CODEC without using nrf5340
    External HOST(I2S SLAVE) - I2S(L/R) - External DAC(I2S MASTER) - L/R ch audio is output from L/R ch

    Customized nrf5340 software for external CODEC
    External HOST(I2S SLAVE) - I2S(L/R) - nrf5340-audio-dk TX - nrf5340-audio-dk RX(Left) - I2S(Lch) - External DAC(I2S MASTER) - Lch audio is output from Lch
    |
    - nrf5340-audio-dk RX(Right) - I2S(Rch audio is Lch packet) - External DAC(I2S MASTER) - Rch audio is output from Lch

    Environment where I tried to send/receive L/Rch this time
    External HOST(I2S SLAVE) - I2S(L/R) - nrf5340-audio-dk TX - nrf5340-audio-dk RX - I2S(L/R ch packet is incorrect) - External DAC(I2S MASTER) - L/R ch audio is output from L/R ch, However, the sound is mechanical

    Best Regards.

  • Hello,

    Thank you for your extreme patience with this, and for the clarifications.

    MontBlanc said:
    nrf5340-audio-dk RX(Right) - I2S(Rch audio is Lch packet) - External DAC(I2S MASTER) - Rch audio is output from Lch

    Is the only issue here that the R channel audio is output from the L channel? Is the audio quality as expected, and equal to the audio output on the nRF5340-audio-dk RX(left) that is acting as the I2S master?

    MontBlanc said:
    I2S(L/R ch packet is incorrect) - External DAC(I2S MASTER) - L/R ch audio is output from L/R ch, However, the sound is mechanical

    Are you here configuring the headset device to be an I2S slave to the External DAC as the I2S master? In this case, I would assume that the output could be distorted since the nRF5340 is not in control of the I2S interface, and so it can not adjust the frequency of the MCLK to compensate for the drift in the reception timestamp.
    Could you share some of your implementation here, so that I can take a look at how you are handling the packet reception and output?

    Best regards,
    Karl


  • I made the changes below.

    main.c
    #include <hal/nrf_gpio.h>

    and added
    nrf_gpio_cfg_output(21);
    nrf_gpio_pin_set(21);
    inside
    int main(void){}


    audio_system.c
    "ret = hw_codec_init();"
    delete

    hw_codec.c
    Change all "return ret" in to "retuern 0"

    Are there any other changes?


    audio_i2s.c

    .mode = NRF_I2S_MODE_SLAVE, // MODIFIED
    .format = NRF_I2S_FORMAT_ALIGNED, // MODIFIED
    .alignment = NRF_I2S_ALIGN_LEFT,
    .ratio = NRF_I2S_RATIO_256X, // MODIFIED
    .mck_setup = NRF_I2S_MCK_DISABLED, //0x66666000, MODIFIED

  • Hello,

    CONFIG_TRANSPORT_BIS=y was set extra.
    When this setting was removed, L/R monaural transmission was possible.
    The results are below.

    .format = NRF_I2S_FORMAT_I2S
    .alignment = NRF_I2S_ALIGN_LEFT

    .sample_wodth = NRF_I2S_SWIDTH_16BIT
    Lch Silent, Rch OK, No noise

    .sample_wodth = NRF_I2S_SWIDTH_16BIT_IN32BIT
    Lch Silent, Rch OK, No noise

    .sample_wodth = NRF_I2S_SWIDTH_24BIT
    Lch OK, Rch Silent, small noise mixed

    .sample_wodth = NRF_I2S_SWIDTH_24BIT_IN32BIT
    Lch OK, Rch Silent, small noise mixed

    .sample_wodth = NRF_I2S_SWIDTH_32BIT
    Lch OK, Rch Silent, No noise

    I'd like to send and receive in stereo, but it's not working.
    What should I fix?

    Best Regards.

  • In addition, the specifications of I2S are
    LRCK=48kHz
    BCLK=64Fs
    16bit I2S (Left alignment)
    is input to nrf5340 on the sending side.

Reply Children
  • Hello,

    After reviewing the source code again and rewriting it, the sound now plays correctly.
    Referring to the post below, is the bitrate of LC3 default to 96kbps?

    devzone.nordicsemi.com/.../range-of-config_lc3_bitrate

    I'm making the same changes, but the build doesn't work.
    I would like to check the trade-off between delay and sound quality, but what should I do if I want to change the bitrate after changing to external I2S?

  • Hello again, MontBlanc

    Thank you for your extreme patience with this. An error has occured in our system with this ticket when it was assigned between engineers due to the holiday period, and so the request was incorrectly marked as resolved until I happened upon this ticket again manually. I am terribly sorry for the incredible time it has taken to get back to you about this.

    MontBlanc said:
    After reviewing the source code again and rewriting it, the sound now plays correctly.

    I am glad to read that you were able to resolve the issues yourself in the time that has passed since we last spoke.
    Do you still require technical support with the remaining questions, or have you already found the answers you were looking for?
    Just in case, I reply to the previous questions, and I hope you will raise any other questions you might have encountered in the meantime as well.

    MontBlanc said:
    Referring to the post below, is the bitrate of LC3 default to 96kbps?

    The bitrate does indeed default to 96 kbps, you can however overwrite this configuration by setting this kconfig in your prj.conf instead.

    MontBlanc said:
    I would like to check the trade-off between delay and sound quality, but what should I do if I want to change the bitrate after changing to external I2S?

    Which external hardware codec are you using, and what requirements does it have?
    You will likely have to re-configure your hardware codec when you change the parameters of the audio stream.

    Best regards,
    Karl

Related