NAU8822 I2S Codec + ESP32 - no valid data

77 views Asked by At

I've connected a NAU8822 codec to an ESP32 and I'm trying to record audio from a microphone.

schematic of NAU8822 circuit

Following setup:

  • Microphone is biased (working), mono
  • Codec works as I2S master (working)
  • MCLK is generated by ESP32 (working)
  • ESP32 is I2S slave and receiving data
  • standard I2S, 16bit @ 16kHz

Clocks:

  • MCLK is 4.096MHz, as required (256*f_sample)
  • WS/FS is 16kHz
  • BCLK is 512kHz (f_sample * 2 * 16bit)

The problem is:

I receive either 0 or 65535, there is no other value. The I2S data line doesn't show any signs of a frequency higher than 16kHz on the scope, I expect data with BCLK, not WS frequency.

On the scope, there is a clearly visible connection between sound and the pulse density, the signal looks more like a slow PDM modulated signal, not the required PCM. The NAU datasheet has no signs whatsoever of having a PDM output.

Are there any hints what could have gone wrong in this case?

I tried using different sample rates, always the same result. I tried using a different BCLK prescaler in the NAU, same result Disabling / enabling different gain control settings also have no impact.

0

There are 0 answers