cancel
Showing results for 
Search instead for 
Did you mean: 

Hello ST Experts , I have a three VM3000 PDM mems interfaced to a STM32f745IETx controller , via I2S2, I2S1 lines and another in SAI2_SAIB block , how do I configure three such in programming while using PDM2PCM middleware , can anybody help me ?

SG.4
Associate II

The help will be greatly appreciated . I have to write this raw data extraction of PCM values in onto sdmmc sd card . And could anyone explain me how does the PDM2PCM functions for the mems than ST PDM microphones? I usually find examples of stm32 controllers with MP45DT02 ? and how do we conclude whether the conversion is accurate and PCM are correct values.

Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Shweta @Community member​ ,

>> I have some basic doubts the middleware PDM2PCM outputting 16 bit PCM, does these sample obtains have any headers present or its just plain or do we need to add the headers?

The .wav file has a proper header containing metadata about the raw PCM file, so I would say that the final .wav has of course ho contain header, but the PDM2PCM outputting has no header so you can process the signal starting from the first byte.

>> I wanted some more help on ublox LARA-R211 4G LTE module testing with the stm32f745 [...]

About this topic, I would suggest you a couple of actions:

  • First, since the 4G LTE module is from u.blox, you should try to ask for help in their community.
  • Second, you can try to post your question in a new Q&A, with the proper STM32H7 tag.

If my reply helped you with your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

-Eleon

View solution in original post

9 REPLIES 9
Eleon BORLINI
ST Employee

Hi @Community member​ ,

did you already check the design tip that explains the use of the STM32Cube PDM2PCM software library?

This explains how the PDM2PCM library converts a PDM bit stream from a MEMS microphone into a PCM audio stream: it provides details about the interface parameters and the configuration of the library. It also shows how to integrate this library into a main program, and applies to microcontrollers of STM32F4, STM32F7 and STM32H7 Series.

-Eleon

Hi @Eleon BORLINI​ ,

Hope you are doing good.

Thanks for your help again in time ,I have gone through that document, yes

Here in the work space have also used codec TLV320adc3140 with STM32f745 ,had just connected those mems microphones bypassing codec on I2S lines

I could receive the WS,PDMCLK(approx 3.25MHz ) ,PDMData(768kHz o 1.025MHz )to on the scope.

But when I debugged the PDMbuffer and PCMbuffer showed zero values ?

..

But final one I have to get connected via the codec ..

not much variations on the PDM mics so I had posted this query /

I am not getting out ,could I be missing out on something.

Thank you for the time and help.

Kind regards

--

Shweta

Hi Shweta @Community member​ ,

the VM3000 microphone is from Vesper, so I suggest you to check also in their forum, whether they can help.

However, I think that all PDM microphones works more or less in the same way, maybe varying the master clock (and sampling) frequency.

You shouldn't need any external codec to connect a PDM microphone to an STM32F7, since the signal is acquired in blocks of 8 samples by using a synchronous serial port (SPI or I2S). Did you correctly configured these interfaces in the initialization part of the code? You might check example of the use of these interfaces in the X-CUBE-MEMSMIC1 function pack, in the \Projects\STM32F746ZG-Nucleo\Demonstration folder.

Please let me know if this can be useful.

-Eleon

SG.4
Associate II

Hi @Eleon BORLINI​ ,

Yes I have checked with the initializations and the examples what you have mentioned.

I have some queries/doubts

>> 1) after the conversion the pcm values .can the log file containing raw PCM values be imported in audacity and played for loopback check?

>> 2) or if else what format the obtained raw PCM values be converted for playback ?

>>3) are there any codes /Libraries that support such conversions of pcm in stm32 or could it be imported as a software packs to convert the raw PCM into a playable formats like mp3 or.wav or any which could be stored and played ?

Thanks & Regards

--

Shweta

Hi Shweta,

to convert raw PCM into a more readable format such as .mp3 or .wav I suggest you to use Audacity tool, and here in their forum it is explained how to do the conversion.

You could try to use also the available example in X-CUBE-MEMSMIC1 such as the Microphones_Streaming demonstration that you can find in the \Projects\STM32F746ZG-Nucleo\Demonstration\CCA02M2\Microphones_Streaming, that streams the audio data on USB and analyze the audio in Audacity.

-Eleon

SG.4
Associate II

Hi @Eleon BORLINI​ ,

I have checked the audacity one ,thank you for that .

>>I have some basic doubts the middleware PDM2PCM outputting 16 bit PCM ,does these sample obtains have any headers present or its just plain or do we need to add the headers .?

>> I wanted some more help on ublox LARA-R211 4G LTE module testing with the stm32f745 using USB_OTG_HS and USB_Host middleware. are there any support examples to detect 6 CDC-ACM modem for mentioned module in support .I am in the very beginning of knowing thus module and its working with stm32 .

I have checked with CDC standalone example.. but further still support if you know any kindly suggest.

Thanks and Regards

--

Shweta

Hi Shweta @Community member​ ,

>> I have some basic doubts the middleware PDM2PCM outputting 16 bit PCM, does these sample obtains have any headers present or its just plain or do we need to add the headers?

The .wav file has a proper header containing metadata about the raw PCM file, so I would say that the final .wav has of course ho contain header, but the PDM2PCM outputting has no header so you can process the signal starting from the first byte.

>> I wanted some more help on ublox LARA-R211 4G LTE module testing with the stm32f745 [...]

About this topic, I would suggest you a couple of actions:

  • First, since the 4G LTE module is from u.blox, you should try to ask for help in their community.
  • Second, you can try to post your question in a new Q&A, with the proper STM32H7 tag.

If my reply helped you with your question, please click on Select as Best at the bottom of this post. This will help other users with the same issue to find the answer faster.

-Eleon

SG.4
Associate II

Hi @Eleon BORLINI​ ,

Ya I have had my doubts cleared ,thanks a lot for your help and the right guidance clearing of the minute details .

I would definitely do that .

Have a nice day .Take care. :) :)

Kind Regards

--

Shweta

Thank you Shweta!

Stay safe you too :)

-Eleon