Hello Everyone
i have an Portenta H7 with an Portenta Breakout Board.
I want to read my PDM Ultrasonic microphone (https://www.knowles.com/docs/default-source/model-downloads/sph0641lu4h-1-revb.pdf?Status=Master&sfvrsn=bdc077b1_4) and write the data to an sd card.
I have successfully used the PDM RMS example of the Breakoud Board library with a maximum sampling rate of 64kHz.
From my understanding, if I want to get access to higher sampling rates (my target would be 192kHz) i would need to set the clock for the PDM to a higher frequency.
I checked the datasheets and found out that the SAI1 (serial audio interface) clock is the right one. I changed it's clock to 75MHz in the STM32CubeMX and exportet the code.
I tried to include the code (the HAL Code from the STM32 software) in my Arduino IDE Code (using 192kHz as sampling rate) but either it does not do anything or the board is not detected by the PC anymore (double tab reset brings it back into boot mode as new device).
I also found a library doing what I need with the I2S connection, GitHub - trylaarsdam/portenta-i2s: A simple I2S library for the Portenta H7, but I was not able to bring it to work with PDM.
Does anyone has an idea how i could make this happen?