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

NRF52832 I2S Clocking and Interfacing with a Slave I2S device.

Hi Nordic Team,

I have been working a project where I will need to send audio using I2S protocol to an audio chip.
The audio chip will only accept a select set of values for the I2S Bit clock, none of which could be produced by NRF's I2S clock divisions and ratios.

I2S protocol states that it can work in three topologies (as stated here www.allaboutcircuits.com/.../)
1. The I2S TX providing the Master CLK to the Slave device.
2. The I2S RX providing the Master CLK to I2S TX device.
3. Using an External CLK source for MCK and LRCK for I2S TX and RX devices.

The audio chip uses only audio sampling rate compatible bit clocks such as 5.645, 6.144, 11.289, 12.288, 22.579, 24.576MHz with ratios 32, 64, 128, 256.

1. I tried the first I2S topology initially, but since the I2S clocks and ratios generated by NRF did not match to the required clocks of the audio chip, that was not successful.
2. I tried to use audio chip's Master Clock to NRF to send data from NRF to the audio chip, but this did not send the audio data correctly. I did check this implementation using a loopback example onto another NRF chip and that worked perfectly - with second NRF being RX and provider of MCK and the first NRF being the Data TX.

So, as the third attempt, I am now planning on using an external clock source to synchronize the I2S clocking between the NRF and the audio chip. I would like to know if this setup would work with the NRF given the above two situations. Would the NRF work with external I2S clock source? How else can I sync I2S data transfer between NRF and the audio chip?

My audio configuration is 48kHz, stereo with 16 bits per sample.
Any and all advice would be highly helpful.

Thanks.

- Girish

Parents Reply Children
  • Hi Einar,

    Thank you very much for the reply.

    I have successfully got the nRF52832 to work with an external clock (as MCK and LRCK source) for the I2S with nRF as the I2S Slave and disabling the MCK. Now the nRF and my audio chip communicates well !

    I saw the same exact post long back and did try most the configurations that would apply to my case. But all of them failed because of clocking mismatch. Although the data received was intact, because I was working with audio, I had some aliasing and oversampling issues that was unavoidable.

    Anyways, now I have it working! Thanks again.

    (Marking this post as answered.)

    - Girish

Related