2022-05-19 10:16 AM
I have a MEMS microphone (IM72D128V01, using this eval kit) with PDM output connected to a STM32U5 NUCLEO board.
It's connected to the ADF/Audo Digital Filter peripheral which I have configured to provide a 5th order CIC filter with a 32x decimation factor. ADF clocking is configured to output a 3,072,000Hz data clock to the MEMS sensor.
Every time I start my STM32 program I have to physically power cycle the MEMS IC or else I get a DC bias in the data register - the most significant byte of the 24bits in the data register (which includes the sign bit) is constantly 0x0 meaning the integer sample values are all positive.
As soon as I power cycle the MEMS IC I immediately start getting a mix of positive and negative integer sample values as I would expect. This persists until I terminate and relaunch in CubeIDE.
How do I diagnose/resolve this?
Solved! Go to Solution.
2022-05-27 06:19 AM
Turned out the issue was on the sensor side, the LR pin was accidentally floating and this controls dc bias
2022-05-27 06:19 AM
Turned out the issue was on the sensor side, the LR pin was accidentally floating and this controls dc bias
2023-04-06 03:14 PM - edited 2023-11-20 08:59 AM
Hi, I have the same MEMS sensor and an Nucleo-U575
I am trying to turn on a light when the sensor hears something using the SAD.
My configuration is as follows:
I have as ADF input clock: MSIK@12MHz
Then a Output clock divider set to 4. So my output clock would be 3MHz.
pins are:
PE9: ADF_CCK0
PE10: ADF_SDI0
This is the LPDMA section(copied from the ADF_AudioSoundDetection example):
And this is my callback function
void HAL_MDF_SadCallback(MDF_HandleTypeDef *hmdf)
{
HAL_GPIO_TogglePin(LED_GREEN_GPIO_Port, LED_GREEN_Pin);
}
Unfortunately nothing happens.
2023-04-06 04:03 PM
My problem is that I keep hitting this error
/* Check if saturation occurs */
else if ((interrupts & MDF_DFLTISR_SATF) == MDF_DFLTISR_SATF)
{
/* Clear saturation flag */
hmdf->Instance->DFLTISR |= MDF_DFLTISR_SATF;
/* Update error code */
hmdf->ErrorCode |= MDF_ERROR_SATURATION;