Skip to main content
Associate III
August 2, 2026
Question

STM32N6 Nucleo Board MDF Issue - Mics records noise

  • August 2, 2026
  • 8 replies
  • 113 views

Hi ST Community,

 

I’ve connected a MP23DB01HPTR MEM MIC to the STM32N6 Nucleo’s MDF1_SDI3 and MDF1_CCK0 and here is my connection. 

 

 

I am using“ Projects/STM32N6570-DK/Examples/MDF/MDF_AudioRecorder” as a reference and according to the information on Github, the CCK0 should be 2.048 MHz

 

Which I am measuring almost the same frequency on the CCK0 pin of my board : 2.03393 MHz
 

 

In my project, instead of sending the data to SAI, I am sending the data to USART 1, which I’ve set the BaudRate to 921600. 

My code has three callback functions:

  1. void HAL_MDF_AcqHalfCpltCallback(MDF_HandleTypeDef *hmdf)
  1. void HAL_MDF_AcqCpltCallback(MDF_HandleTypeDef *hmdf)
  1. void HAL_UART_TxCpltCallback(UART_HandleTypeDef *huart)

 

The USART 1 is sending the first half of the MDF buffer when the AcqHalfCpltCallback is triggered, and then the second half when the AcqCpltCallback is triggered. 

on my computer I wrote a python script  where it is receiving the audio raw data via serial port and save it into a WAV file. However, when I play the audio on my computer , I could here a lot of noise. 

I’ve attached my code, .ioc file and an sample of the audio that I’ve recorded. 

Can you please help review and let me know what the issue is ? 

 

8 replies

SaeidAuthor
Associate III
August 2, 2026

Attached is an updated audio file that I can record where I count from 1-4. 
One thing I noticed my USART Tx mode is set to “ Circular Mode” , and I think this is a wrong setting, Is that correct ? 

 


 

As an experiment, I disabled the Circular mode, and I noticed the USART 1 only send out 4096 bytes ( 2KB). After that the USART stop working, however MDF callback is working as I am toggling an LED. 

 



 

 

I would appreciate if someone could review my problem and let me know what the issue is ? 

Visitor
September 23, 2026

I have the same problem with the STM32N6570-DK board.
There is a lot of noise; the actual audio captured by the microphone is practically inaudible.

I have similar code running on the STM32H7S78-DK board, and everything works fine there.

Has anyone managed to solve this problem?

 

Associate II
September 23, 2026

Listening to ​@Saeid .wav recording the mic is picking up a lot of noise from the running MCU PCB, it is most likely coming to the mic via power and signal lines:-

you could go through these suggestions:-

  1. make sure your serial comms is at a reasonable speed like 1 MBaud or even less.
  2. provide an independent clean power supply to the mic (and well decoupled)
  3. set the MCU ports communicating with the mic for slow transitions
  4. use opto isolators for the serial comms to the mic with lowest working baud rate
  5. check standard designs for connecting mems mic’s

Hope that gives you some ideas.

Visitor
September 23, 2026

I am not sending data to the serial port; I am using the BSP_Audio_*** functions.

I read data from the microphone and play it back immediately.
I hear mostly noise; if I tap near the microphone, a barely audible sound comes through. By comparison, on the STM32H7S78-DK, the microphone picks up sounds from several meters away.

I disabled ICache and DCache just to be safe.

I am using STM32Cube_FW_N6_V1.4.1.

Associate II
September 23, 2026

Ah got it and BSP_Audio is a software layer that can use any hardware type of connection to the mic.  The STM32N6570-DK has a 3.5mm analogue jack to connect a mic that supplies the small amount of power needed by the mic (known as MICBIAS) so your board and the BSP_Audio is probably using this 3.5mm Jack socket as input.

The connection is analogue, into a codec type A to D converter so the mic wiring can pick up noise.

In your case I would suspect the mic Jack plug and the wiring from the Jack plug to the mic, maybe its the wrong type of Jack plug or the wire is broken.  Check the type Jack plug needed on the STM32N6570-DK and try a different mic if you can.

Visitor
September 23, 2026

I am using the built-in MP23DB01HPTR digital MEMS microphone on the STM32N6570-DK board.
The sound output is very faint; I have to actually blow into it for it to register anything.

Associate II
September 23, 2026

Maybe your software config is such that it’s not actually using the on board digital MEMS microphone.

If it had selected the analogue input (with nothing plugged in) by mistake it would be very noisy.

Suggest you double check the software to make sure the MEMS microphone is actually selected.

Also check that any power or clock needed by the MEMS is enabled.

Another thing you could do is look for an ST example app that uses the MEMS and try that.

On the bright side its very unlikely the MEMS is broken, far more likely is some small software setting is blocking you.

Good luck with it hope you get it going.

mƎALLEm
ST Technical Moderator
September 23, 2026

Another thing you could do is look for an ST example app that uses the MEMS and try that.

Indeed.

@velfinnix please look at the MDF_AudioRecorder example provided in the github link:

https://github.com/STMicroelectronics/STM32CubeN6/tree/main/Projects/STM32N6570-DK/Examples/MDF/MDF_AudioRecorder

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.