Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I2S configuration CONFIG.CHANNELS ... what is expected behavior if set to LEFT/RIGHT/STEREO ?

I am using the nrf_i2s driver, and it works properly ... with CONFIG.CHANNELS set to stereo.

But for my application, I only need to drive data onto SDOUT left channel.

But I do not see any difference in behavior when I set CONFIG.CHANNELS to Left channel (NRF_I2S_CHANNELS_LEFT).

What I observe is that my transmit buffer contents appear on both Left and Right channel.

I might have expected my transmit buffer contents to only appear on the Left channel (and Right channel to have 0 value ... silence)

What is expected behavior when I have CONFIG.CHANNELS set to NRF_I2S_CHANNELS_LEFT ?

Thanks.

  • I did some more tests changing the pattern of data sent on SDOUT. I think I understand it now.

    It looks like when I set to NRF_I2S_CHANNELS_LEFT, that the sample value in the transmit buffer will be repeated on both the Left and Right channels of the physical I2S interface.

    When NRF_I2S_CHANNELS_LEFT, the transmit buffer will increment to it's next sample position after this LEFT/RIGHT output.

    When NRF_I2S_CHANNELS_STEREO, the transmit buffer is interleaved between L/R channels, and will increment upon each LEFT, then RIGHT sample output.

Related