Content originally posted in LPCWare by Pacman on Sat Sep 14 00:23:04 MST 2013
I haven't used the NAU811, nor do I have one, but if you look at the NAU8811 datasheet, you'll find that...
It does not have an I2C interface.
It has SPI interface for controlling the chip; those are CSb, SCLK and SDIO.
It has an I2S interface for transferring the audio: BCLK, DACIN (aka RX_SDA), ADCOUT (aka TX_SDA), FS (aka LRCLK)
Here, you're supposed to use only one BCLK and one LRCLK shared on RX_SDA and TX_SDA.
You cannot intermix with the SCLK and SDIO from the SPI, those are completely different signals and use a completely different protocol. SPI stops when it's no longer being used, while the I2S is supposed to keep running all the time.
You usually don't control the chip very often. Most of the time, that's done during initialization and you might never need to change settings while audio is being transferred.
That said, you could wish to adjust the volume or gain now and then.
So... I'd connect BCLK to a I2S_BCLK, DACIN to a I2STX_SDA, DACOUT to a I2SRX_SDA and FS to LRCLK, then let the LPC4330 be the master.
Alright, back to why you asked the question: You want to avoid a 'short' between I2SRX_CLK and I2STX_CLK, right ?
If you look in the UM10503, Table 954 (page 1085), you'll see:
0x2: Select the TX_MCLK signal as the RX_MCLK clock source.
-That is probably what you want.
Try setting up the circuit and start by transmitting a square-wave to the NAU8811. Check the signal with your scope, and see if the NAU8811 outputs audio.
If it does, you can then setup the receiving part; because you know that the audio-clock is already running and working.
Section 42.7.2 in the UM10503 is worth noticing, try looking at Section 42.7.2.2.3 (table 964, page 1097).
If you don't have them already, I'll recommend downloading UM10503 and the datasheet for LPC43x0.