2.3 Wiring audio I/O
Now that we have initialized the different peripherals that we will use to interface with the microphone and DAC, we are ready to wire everything up! Make sure that the STM32 board is not powered, i.e. unplugged, while connecting the microphone and DAC breakout boards.
For this task, we will have to refer to the card provided with the STM32 board (see below) and the image of the chip on the "Pinout" tab of our CubeMX project (further below).


Adafruit I2S MEMS Microphone Breakout
As previously mentioned, make sure that the STM32 board is powered off! We can then begin by connecting the microphone's ground pin. In electronics, it is common practice to first ground a component/circuit.
We can now connect the supply voltage pin.
Previously, we configured I2S2 for the microphone so we will have to connect the following pins (see image of chip from "Pinout" tab for the names on the left side of the arrow) to the corresponding pins on the microphone breakout board (right side of the arrow):
I2S2_SD DOUT
I2S2_CK BCLK
I2S2_WS LRCL
Finally, we configured an additional GPIO pin in order to select whether we would like the microphone to be assigned to the left or right channel.
Adafruit I2S Stereo Decoder
As previously mentioned, make sure that the STM32 board is powered off! We can then begin by connecting the DAC's power supply, starting with the ground pin.
Previously, we configured I2S1 for the DAC so we will have to connect the following pins to the appropriate pins on the DAC breakout board:
I2S1_SD
I2S1_CK
I2S1_WS
Moreover, we configured an additional GPIO pin in order to mute the output.
MUTE
With everything correctly wired up, we can proceed to coding the passthrough on the SW4STM32 software!
Last updated
Was this helpful?