2018-08-09 07:04 PM
We are trying to configure a STM32H743 device to use 8 PDM microphones. According to the manual, this should be possible.
In addition, up to 8 microphones can be supported thanks to an embedded PDM interface.
The SAI can work in master or slave configuration.
In CubeMX, we can set SAI1A to use 5-6 microphones in PDM mode using CK1. However this gives errors on SAI1B and SAI4. There does not seem to be a way to fix the yellow error messages.
Any help would be much appreciated.
2018-08-09 11:43 PM
if you are hitting DMA bottlenecks, you can prove that by slowing the reading rate
Its only audio, should be low data rates anyhow.
you should check the errata, but you may be the first to find this issue.
otherwise its your interrupt process that is causing the issue.
interrupt latency may be your issue, aim to be in and out of the interrupt in under 10uS.
which microphones are you using ?
2018-08-10 12:58 AM
Thanks for the reply. We plan to use Knowles microphones or maybe Invensense.
We haven't got as far as the code yet - just trying to set the pinout in CubeMx. Using SAI1 and SAI4 it appears impossible to not have any yellow errors on these ports. SAI1 is set to 5-6 microphones and SAI4 is set to 1-2 microphones. The error messages make no sense - one error message says to set the mode but there is no mode setting.
We can us DFSDM to connect up the 8 microphones but the datasheet says the SAI (Serial Audio Interface) peripheral should also be able to do this.
2018-08-10 03:33 AM
I checked the 240BGA package, the warnings remain, but I got 8 channels, 2 on clk1 and 6 on clk2,
the errors seem obscure, but I would test the program works with all 8 microphones, before you build a board.
2018-08-11 11:49 PM
OK. We are using the 144 pin package. Yes, the errors do seem obscure which is why we haven't been able to fix them.
We will try next week to connect up 8 microphones. Thanks
2018-08-11 11:56 PM
2018-08-26 05:08 PM
I have connected one microphone and can see the clock output and the PDM data line toggling. However the rxbuffer never receives any data. Also, it can take up to 15ms from the first clock pulse until the PDM data line toggles. The SAI ports only pulse the clock line until the timeout.
The other methods to read a PDM microphone are DFSDM on which there is very little documentation and I2S which also seems unreliable. It reads some data bytes but has random zeroes everywhere.