what format is the return buffer of the PDM2PCM function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-02-17 2:12 PM
Hello,
I am trying to understand how the PDM_Filter() function works.
If I am using 48Khz with a decimation factor of 64 and a output samples = 16
If I call the function like this...
uint16_t MidBuffer[16];
uint16_t pdmRxBuf[128];
PDM_Filter(&pdmRxBuf[0],&MidBuffer[0], &PDM1_filter_handler);
is the MidBuffer a 16 bit array or a 16 byte array
I am trying to store the PCM data into bytes that I can eventually send out of my UART.
Could anyone please help explain this to me? I have read the app notes and am still confused.
my configuration is below
void MX_PDM2PCM_Init(void)
{
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/**
*/
PDM1_filter_handler.bit_order = PDM_FILTER_BIT_ORDER_MSB;
PDM1_filter_handler.endianness = PDM_FILTER_ENDIANNESS_BE;
PDM1_filter_handler.high_pass_tap = 2104533974;
PDM1_filter_handler.in_ptr_channels = 1;
PDM1_filter_handler.out_ptr_channels = 1;
PDM_Filter_Init(&PDM1_filter_handler);
PDM1_filter_config.decimation_factor = PDM_FILTER_DEC_FACTOR_64;
PDM1_filter_config.output_samples_number = 16;
PDM1_filter_config.mic_gain = 0;
PDM_Filter_setConfig(&PDM1_filter_handler, &PDM1_filter_config);
/* USER CODE BEGIN 3 */
/* USER CODE END 3 */
}
- Labels:
-
Microphones
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2021-02-18 12:33 AM
Hi @kcire L. ,
for the PDM_Filter() function description, you can find references in:
- Application note AN3998, p. 7;
- User manual UM2372, p. 7.
But is this post related to this other one?
If so, can you check if that answer can be at least partially valid also for this post?
-Eleon
