ADAU1787 + nRF5340 bi-directional I2S: codec transmits audio correctly but receives silence/no output
Hello.
I am bringing up a custom board with an ADAU1787 connected to an nRF5340 over I2C + I2S. I2C programming is working correctly, but I am having trouble getting bi-directional I2S working.
My goal:
I want to establish full-duplex I2S between the ADAU1787 and nRF5340:
nRF5340 = I2S master
ADAU1787 = I2S slave
48 kHz
16-bit stereo
Standard I2S format
For now, the intended signal flow for testing is:
Mic → ADAU1787 ADC → I2S → nRF5340 → I2S → ADAU1787 DAC
The setup:
The board has two analog microphones connected to ADC0 and ADC1. As a sanity check, I connected ADC0 straight to DAC1. This works correctly, and I can hear the microphones through the DAC output.
The board has an oscillator that is fed to the codec's MCLKIN. The rest of the pins are connected as follows:
nRF SCK -> ADAU1787 BCLK0
nRF LRCK -> ADAU1787 FSYNC0
nRF SDOUT -> ADAU1787 SDATAI0
ADAU1787 SDATAO0 -> nRF SDIN
The Nordic firmware simply performs a passthrough: I2S RX → log samples → copy to I2S TX. It is set up as such:
.mode = NRF_I2S_MODE_MASTER,
.format = NRF_I2S_FORMAT_I2S,
.alignment = NRF_I2S_ALIGN_LEFT,
.ratio = NRF_I2S_RATIO_128X, // for 48 kHz
.mck_setup = 0x66666000,
.sample_width = NRF_I2S_SWIDTH_16BIT,
.channels = NRF_I2S_CHANNELS_STEREO,
.clksrc = NRF_I2S_CLKSRC_ACLK,
.enable_bypass = false,
The DSP program sets up the SigmaDSP as follows:
ADC0 (microphone) is routed (with a T connection) to DAC1 as a sanity check, and also to SDSP outputs 2 and 3, which are set up as the ASRC output channels, which are, in turn, routed to the SPT0 output channels.
SAI 00 and 01 are routed to ASRCI 0 and 1. ASRC 0 (left channel) is then routed to the DAC0.
The problem:
The ADAU1787 appears to be transmitting audio to the Nordic correctly, but the return path from the Nordic back to the codec does not work.
Symptoms:
Nordic receives valid samples over I2S
Logged samples look reasonable:
near zero when silent
increase when audio is present
left/right channels are identical (expected since only one mic is currently used)
But audio sent back from Nordic over I2S never reaches the DAC
So it seems:
ADAU1787 → Nordic = works
Nordic → ADAU1787 = not working
What I've tested:
I2S clocks are present and stable.
Codec successfully transmits audio to Nordic and the RX samples look correct.
I tried both ASRC path and direct SPT. In both cases I got the same result: output seems to work but input doesn't.
I have verified that the power control registers ASRCI0_EN, ASRCI1_EN, ASRCO0_EN, ASRCO1_EN, SPT0_IN_EN and SPT0_OUT_EN are all enabled.
Questions
Is there anything obviously wrong in the SigmaStudio routing for a slave I2S configuration?
Is the ASRC required for this setup, or should direct SPT routing work?
What can I do to help debug this issue?
Thanks in advance.
Felipe.
adau_1787.dspproj
hardware
ADAU1787
i2s input
i2s
processors and dsp
Processors and Microcontrollers
Show More
Hello Felipe,
I will have a look at your project in a while.
Below is the project that I quickly created, I used two Eval boards to simulate your setup. This project works fine with bidirectional audio.
Please try this project and see if it works.
Design 1rx.dspproj
If this still doesn't work, then please probe the SDOUT pin from nRF5340 and see if you can see the data coming out from that pin. We will debug this further.
Regards,
Harish
Hello Harish,
Thanks for the quick answer. I tested the program you sent but unfortunately it didn't work, and the same issue persisted: audio seemed to come out of the codec but not into it.
I checked the registers and connections and they all matched up with what I had already (except from MBIAS and PGA for the mics).
I managed to probe the I2S bus with a logic analyzer and everything looks normal to me:
i2s-debug.zip
LRCK is 48 kHz. 16 bit clocks for every left or right frame. Left and right channels are identical (as expected). ("Out" and "In" are labelled from the codec's perspective).
Nothing really stands out to me.
I'll try to replicate this setup with a nRF5340 DK and an ADAU1787 EVAL Kit to rule out possible hardware issues and then get back to you.
If you need me to provide anything else that could help debug this, please ask.
Thanks again.
Felipe.
Please log in to reply.


