cancel
Showing results for 
Search instead for 
Did you mean: 

Interleave audio by connecting STEVAL-MIC008A (Dual MEMS) to STM32N6570-DK (CN5)

Saeid
Associate II

I'm going to use the STEVAL-MIC008A Dual MP23DB01HP MEMS daughter board with the STM32N6570-DK (by connecting to CN5). I looked at the STM32N6570-DK example project MDF_AudioRecorder and noticed that for using on board MIC (only one micophone) it uses instance0 (MDF1_SDIO, Pin PE8) with the following configuration:

  1. Bitstream Matrix: Falling front

  2. Interleaved mode: No (which makes sense since it uses only one MEMS microphone)

Since the STEVAL-MIC008A includes two microphones that share the same data and clock lines, can I still use instance 0 to receive interleaved data (left and right channels) from the STEVAL-MIC008A, or do I need to enable instance 1 as well?

Saeid_0-1760394238603.png

 

1 REPLY 1
Saket_Om
ST Employee

Hello @Saeid 

If you want to use two microphones, you need two instances of MDF (so instance 0 and instance 1 on your case).

You need to configure instance 0 with interleaved at 1 without any other updates.

For instance 1, you don't need to activate serial interface because you will use serial interface of instance 0 (both microphones shared same signal). You don't need also to activate output clock if already done on instance 0. But you need to use same processing clock divider as for instance 0.
Concerning filter bitstream of instance 1, you need to choose bitstream from serial interface 0 and the other edge of instance 0 (you will receive the other front of common microphone signal). The filter of instance 1 must be configured as filter of instance 0.

After initializations of both instances (with HAL_MDF_Init functions), you can start instance 1 in interrupt mode (with HAL_MDF_AcqStart_IT) and start instance 0 in DMA mode (with HAL_MDF_AcqStart_DMA). You will receive samples from both microphones with DMA.

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
Saket_Om