How to set additional PDM microphone in nRF5340 audio sample

Hello,

As the title, I'm using nRF5340 audio sample to test Walkie Talkie demo.

I know that in nRF5340 audio DK, the microphone is set through CS47L63. Now I want to use the nRF5340 module (custom board) to test the Walkie Talkie demo. I replaced the CS47L63 mic with an additional PDM mic.

I referred to the dmic sample, which seems to just set up a digital microphone and collect a piece of audio from the microphone, and doesn't do anything else with the audio.

It seems that if I want to use an additional PDM microphone to test the Walkie Talkie demo, I need to complete the subsequent audio transmission process by myself. Is this inference correct? Or is there another way to configure an additional PDM microphone?

Parents Reply Children
  • Hello 
    Were you able to interface with the external PDM mic?
    Since the Dmic sample has many limitations with nrf5340 audio DK I am also thinking of using the external PDM mic. It would be very helpful if you guide me on this, where to start.

  • Hi @LandyWang, @Sigurd and @Anushikha,

    Sorry to reopen this old thread, but I am working on exactly the same problem and I’m very interested in the final result.

    I am also using the `nrf5340_audio` sample (Walkie Talkie demo), and I would like to replace the CS47L63 microphone path with an external PDM microphone.

    From this discussion I understand that:
    - The audio application currently expects I2S audio coming from CS47L63.
    - At the time of this thread, PDM microphones were not officially supported in the audio application and the user had to implement the PDM → I2S / PCM path by themselves.

    I would really like to know:

    1. @LandyWang, were you eventually able to interface an external PDM microphone with the `nrf5340_audio` Walkie Talkie demo and get it working?

    2. If yes, could you please:
    - Briefly describe the overall approach (for example: PDM → PCM → I2S Tx, or directly injecting PCM frames into the audio pipeline), and
    - Share any example you are allowed to provide, such as a minimal working project, code snippets (devicetree, Kconfig, initialization, buffer handling), or even just a simplified demo showing the key parts?

    3. @Sigurd, has there been any update since then on official support or recommended examples for using an external PDM microphone (instead of CS47L63) in the `nrf5340_audio` application?

    For context, my current setup is:

    - Board: nRF5340 Audio DK (PCA10121)
    - SoC: nRF5340
    - External PDM microphone: ST MP45DT02
    - nRF Connect SDK: v2.5.2
    - Goal: use the external PDM microphone as the audio source for the `nrf5340_audio` Walkie Talkie application.

    Even a short summary of what worked / did not work for you, or any small working example you can share, would be extremely helpful.
    Thank you very much for your time and for any hints you can share!

    Best regards,
    LjHuang

  • I'm also in a similar situation.

    I've tried the normal walkie talkie demo using two nRF5340 Audio DK ant it works beautifully. Now I'm trying to modify the setup using a nRF5340DK as the unicast server, which has a PDM microphone attached and no hardware codec. The unicast client instead is just receiving the audio and sending it to USB.

    So far I'm trying to exclude the hardware codec and then I'll probably try connecting directly the PDM with the audio pipeline.

  • Hey update: I've managed to hack a bit the sample and get something. It's actually not that much to add. The code is ugly I know, but it works.

    I'm able to record the received audio with Audacity.

    I've published the code at https://github.com/JackHack96/ble-microphone

Related