cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H743 - Using CubeMX to setup 8 microphones on SAI1 and SAI4

FDixo
Associate III

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.

6 REPLIES 6
T J
Lead

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 ?

FDixo
Associate III

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.

T J
Lead

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.

FDixo
Associate III

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

FDixo
Associate III
Hi, we are using the 144 pin LQFP package.
FDixo
Associate III

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.