cancel
Showing results for 
Search instead for 
Did you mean: 

MP34DT05-A PDM: increase SAI clock frequency

TVare.1
Associate III

Hello everyone,

I have an application that eventually record some audios and is working fine with a pair of MP34DT01. It works over SAI with a clock of 1.024MHz and a decimation factor of 64 (for the PDM2PCM), leading to an audio frequency of 16kHz.

The problem that I have now, is that I'm migrating the MEMS to MP34DT05-A. It seems to actually be working fine so far, but in its datasheets it states a minimum clock frequency of 1.280MHz. Therefore, ideally I should change the frequency of the SAI interface. I've done it and I've also changed the decimation factor to 80, as explained in AN5027 and UM2372. However, with these new configs, I obtained just noise (like a strong beep). I've checked the clock with the osciloscope and it is indeed 1.280MHz.

Is there any other configuration (maybe related to the DMA?) that I'm missing here in order to be able to increase the SAI clock from 1.024MHz to 1.280MHz?

Is it even necessary to do this frequency change? considering that although the datasheets says that, it seems to be working just fine with 1.024MHz.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
SimonePradolini
ST Employee

Hello @TVare.1​ 

Have you already checked X-CUBE-MEMSMIC1 (https://www.st.com/en/embedded-software/x-cube-memsmic1.html)?

There, you can find examples for X-NUCLEO-CCA02M2 expansion board that are valid also for MP34DT05-A microphones.

Check your setup and compare it to the one proposed in the MicrophoneStreaming example for NUCLEO-F401RE.

In particular, have a look at the CCA02M2 BSP files.

For MP34DT05-A the normal mode is not granted at 1.024MHz. It can work, but it is out of its specs.

This value is in the middle between low-power and normal mode, so that it is not granted to work properly always.

The right way to use MP34DT05-a is to setup at least 1.280MHz.

Let me know if the issue persists.

Best regards

In order 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.

View solution in original post

2 REPLIES 2
SimonePradolini
ST Employee

Hello @TVare.1​ 

Have you already checked X-CUBE-MEMSMIC1 (https://www.st.com/en/embedded-software/x-cube-memsmic1.html)?

There, you can find examples for X-NUCLEO-CCA02M2 expansion board that are valid also for MP34DT05-A microphones.

Check your setup and compare it to the one proposed in the MicrophoneStreaming example for NUCLEO-F401RE.

In particular, have a look at the CCA02M2 BSP files.

For MP34DT05-A the normal mode is not granted at 1.024MHz. It can work, but it is out of its specs.

This value is in the middle between low-power and normal mode, so that it is not granted to work properly always.

The right way to use MP34DT05-a is to setup at least 1.280MHz.

Let me know if the issue persists.

Best regards

In order 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.
TVare.1
Associate III

Hello,

Thanks for your answer. Checking that example I realized I was not increasing the PDM Buffer according to this equation:

uint16_t PDM_Buffer[((((AUDIO_IN_CHANNELS * AUDIO_IN_SAMPLING_FREQUENCY) / 1000) * MAX_DECIMATION_FACTOR) / 16)* N_MS ];

With that + the previous configuration of the clock and the decimation factor of the PDM2PCM filter, now is working fine

Thanks!

Best regards