Showing results for 
Search instead for 
Did you mean: 

PDM2PCM Library will not link.

Associate II


I'm working on a STM32F4-Discovery board, and I'm having trouble linking the PDM2PCM Library into my project.

I have run the example project located in the STM32F4-Discovery folder called "Audio_playback_and_record" and it works fine.

I have copied the settings from this project into my new CUBE project, but when I run the compiler I get the following message

arm-none-eabi/bin/ld.exe: cannot find -l:libPDMFilter_CM4_GCC_wc32.a.

below is an image of my settings, can anyone help me solve this issue?0690X00000Aq089QAB.jpg

Associate II

I've been fighting with the SAI sub-system and the PDM2PCM library as well. I can offer some insights on the PDM2PCM library, but I am still having high frequency noise issues.

As I understand it, it is expecting data to be in a byte packet format. This means on a one microphone system you have something like this:

| 8-bits of PDM data | 8-bits of PDM data | ..... | 8-bits of PDM data |

When you call PDM_Filter, you pass in this buffer of data as well as the PCM output buffer. You need to set your decimation factor and your output_samples_number:

PDM1_filter_config.output_samples_number = 1024;

In my case I have 1.536 MHz PDM clock and am decimating by 64. I am using a 8192 byte buffer to hold the PCM data (8192 * 8 bits = 65536 PDM bits)

65536 PDM bits / 64 (decimation) = 1024 PCM samples (16-bit samples).

In my case I'm using two microphones. So the PDM data is packed liks this:

| 8-bits left mic | 8-bits right mic | | 8-bits left mic | 8-bits right mic | ....

Then when you call PDM_Filter, you get:

|16-bit PCM left mic | 16-bit PCM right mic | .....

My problem is I get high frequency noise. It seems like the filter isn't actually filtering. It seems more like it is decimating in time without the low pass filter.


The post is from over a year ago, poster has likely moved on..

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..