Audio capture on nRF5340-DK with external I2S ADC (PCM1808) - MCK signal quality and VREF stuck at 0V

Hi,

I am working on a project that requires high quality audio capture and wireless transmission using two nRF5340-DK boards running the nRF5340 Audio application (NCS v3.2.1). The BLE LE Audio CIS pipeline is fully working, LC3 at 24kHz with zero packet loss. The remaining challenge is getting clean audio into the pipeline on the transmitter side.

I have gone through several approaches and hit a wall with each one. Posting here in case someone has found a working path I have not tried yet.

PDM microphone (internal peripheral): The nRF5340 PDM hardware is limited to 1.333 MHz clock maximum. This is too low for good audio quality. The resulting audio is muffled and heavily low-frequency biased. I confirmed this is a hardware limit and not configurable in software.

I2S microphone (INMP441, nRF5340 as I2S master): The nRF5340 generates the wrong sample rate. With HFCLKAUDIO at 12.288 MHz and any integer ratio, the actual LRCK comes out at approximately 26.666 kHz instead of 24 kHz. This is a known integer division issue with the ACLK. The audio is pitch-shifted and distorted and I could not find a ratio that lands exactly on 24 kHz.

External I2S ADC with analog microphone (PCM1808, nRF5340 as I2S master, ADC as slave): This is the approach I am currently testing, lowering the sample rate to 16 kHz to reduce clock stress. BCK and LRCK look correct on the oscilloscope. The problem is SCKI, the MCK output on P1.08, which comes out as a distorted sinusoid between 0.5V and 2.5V instead of a clean logic square wave. The PCM1808 requires a valid SCKI to exit power-down and raise VREF to 2.5V. VREF stays at 0V, meaning the chip never starts up. I am planning to add a 74LVC1G04 buffer between P1.08 and the ADC SCKI pin to fix the signal level, but I have not received the component yet.

My questions:

1. Is the sinusoidal MCK output on P1.08 expected behavior on the nRF5340-DK? Is there a drive strength or clock bypass configuration that produces a cleaner logic signal at that pin?

2. For the I2S microphone approach, is there any way to configure the nRF5340 I2S master to produce exactly 24 kHz LRCK with HFCLKAUDIO at 12.288 MHz? Or is the integer division limitation confirmed and unavoidable?

3. For the PDM approach, is there any path to increase the PDM clock beyond 1.333 MHz on the nRF5340, or is that a hard silicon limit?

4. Has anyone successfully captured good quality audio on a standard nRF5340-DK and fed it into the nRF5340 Audio pipeline? Any working configuration would be helpful.

Thanks.

Parents
  • MCK: High drive mode must be enabled via pinctrl (overlay) or manually in the CNF register for the pin. Sinuzuidial signal usually means its in standard drive mode. That also applies to PDM CLK.

    Some I²S codecs have a PLL that allows the chips to work with a wide range of MCLK inputs. No idea if yours can do that here though, but it would allow you to use an HFCLKAUDIO frequency that satisfies both I2S and PDM requirements.

    Where does the 1.333MHz limit come from? I don't see a limit in the electrical specs. I believe I tried up to 48KHz PDM sampling rates but I don't remember if that was with mic hardware attached.

  • Thanks for the input. For the MCK drive mode, I do have H0H1 set in pinctrl for the MCK pin.
    I recently switched to S0S1 to reduce ringing, which helped with undershoot
    but the signal is still sinusoidal. Is there something beyond drive mode
    that would affect the MCK output shape at 8 MHz?
    On the PDM limit, the 1.333 MHz limit came from Nordic documentation and
    a DevZone response stating the PDM peripheral on nRF5340 only supports
    16 kHz output.
    Did you achieve higher PDM sampling rates with a microphone
    actually connected, or just with the peripheral running standalone?
    If 48 kHz PDM is achievable with a real mic on nRF5340, that would change
    things significantly for me!!
    Thanks!

  • S0S1 increases signal rise time too much for most use cases. I believe you can't use this past 1-2 MHz just due to pin capacitance alone. Faster outputs require H0H1 or E0E1 (on supported pins).

    Ringing is often an oscilloscope artifact.

    Quick testing at 32kHz stereo produced audible buffer underrun. No idea why, might indeed be a hardware limit.

Reply Children
Related