Showing results for 
Search instead for 
Did you mean: 

PDM2PCM(HP) library details

Associate II

Good morning, if possible, I would like more details about the following PDM2PCM(HP version) library used for converting PDM data to PCM.






typedef struct{
uint16_t bit_order// MSB / LSB
uint16_t endianness;// big endian / little endian
uint32_t high_pass_tap;// hig_pass_tap = alpha*(231-1) #alpha[0:1]
uint16_t in_ptr_channels;// number of input PDM channels
uint16_t out_ptr_channels;// number of output PCM channels
uint32_t pInternalMemory[PDM2PCM_INTERNAL_MEMORY_SIZE];// [default 23] I don't know, I need help here










typedef struct{
uint16_t decimation_factor;// decimation factor [16/24/32/48/64/80/96/128] HI_PERF[64/96] do the latter have faster execution times?
uint16_t output_samples_number;// I don't know, I need help here... could it be the number of PCM samples or the number of PCM bytes in output?
int16_t mic_gain;// gain [-12 dB: +51 dB]
int16_t bit_depth;// PCM resolution [16/24/24IN32]






Furthermore, when I go to link the library I can specify (in my case I use CM4) the following libraries:

  • libPDMFilter_CM4_GCC_wc16.a
  • libPDMFilter_CM4_GCC_wc16.a
  • libPDMFilter_CM4_GCC_wc16_softfp.a
  • libPDMFilter_CM4_GCC_wc32.a
  • libPDMFilter_CM4_GCC_wc32_softfp.a

What differences are there between the libraries?


Finally, should the input PDM data be organized into a uint8_t array? because I have seen examples like this, but also different ones...


Thanks for the attention