PDM microphone L/R GPIO pin.
Posted: Wed Sep 24, 2025 4:55 pm
I'm using a PDM microphone - https://media.digikey.com/pdf/Data%20Sh ... -S261F.pdf
This has a clock pin and an L/R pin.
When I'm setting up the GPIO pins - I don't see any way to specify the L/R pin.
Not setting it to anything seems to work fine - I get audio data.
But I am slightly confused as to why there is no way to set the L/R pin.
This has a clock pin and an L/R pin.
When I'm setting up the GPIO pins - I don't see any way to specify the L/R pin.
Code: Select all
typedef struct {
gpio_num_t clk; /*!< PDM clk pin, output */
union {
gpio_num_t din; /*!< DATA pin 0, input */
gpio_num_t dins[SOC_I2S_PDM_MAX_RX_LINES]; /*!< DATA pins, input, only take effect when corresponding I2S_PDM_RX_LINEx_SLOT_xxx is enabled in i2s_pdm_rx_slot_config_t::slot_mask */
};
struct {
uint32_t clk_inv: 1; /*!< Set 1 to invert the clk output */
} invert_flags; /*!< GPIO pin invert flags */
} i2s_pdm_rx_gpio_config_t;
But I am slightly confused as to why there is no way to set the L/R pin.