Skip to content

Commit 6d76af3

Browse files
committed
board: f411re: modify for working with mic shields in stereo mode
This commit is provided to make the sample working, but should be somehow replaced. Signed-off-by: Armando Visconti <[email protected]>
1 parent 4f2ea66 commit 6d76af3

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

boards/arm/nucleo_f411re/Kconfig.defconfig

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,37 @@ config SPI_STM32_INTERRUPT
3434

3535
endif # SPI
3636

37+
if I2S
38+
39+
config I2S_STM32
40+
default y
41+
42+
# configure PLLI2S to generate a I2SxCLK=128MHz
43+
config I2S_STM32_USE_PLLI2S_ENABLE
44+
default y
45+
46+
config I2S_STM32_PLLI2S_PLLM
47+
default 8
48+
49+
config I2S_STM32_PLLI2S_PLLN
50+
default 192
51+
52+
config I2S_STM32_PLLI2S_PLLR
53+
default 3
54+
55+
config I2S_1
56+
default y
57+
58+
config USE_STM32_LL_TIM
59+
default y
60+
61+
endif # I2S
62+
63+
if DMA
64+
65+
config DMA_STM32F4X
66+
default y
67+
68+
endif # DMA
69+
3770
endif # BOARD_NUCLEO_F411RE

boards/arm/nucleo_f411re/nucleo_f411re.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ arduino_spi: &spi1 {
7171
status = "okay";
7272
};
7373

74+
arduino_i2s: &i2s1 {
75+
status = "ok";
76+
};
77+
78+
&timers3 {
79+
status = "ok";
80+
};
81+
7482
&rtc {
7583
status = "okay";
7684
};

boards/arm/nucleo_f411re/pinmux.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ static const struct pin_config pinconf[] = {
4040
{STM32_PIN_PA6, STM32F4_PINMUX_FUNC_PA6_SPI1_MISO},
4141
{STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_SPI1_MOSI},
4242
#endif /* CONFIG_SPI_1 */
43+
#ifdef CONFIG_I2S_1
44+
{STM32_PIN_PA4, STM32F4_PINMUX_FUNC_PA4_I2S1_WS},
45+
{STM32_PIN_PA5, STM32F4_PINMUX_FUNC_PA5_I2S1_CK},
46+
{STM32_PIN_PA7, STM32F4_PINMUX_FUNC_PA7_I2S1_SD},
47+
#endif /* CONFIG_I2S_1 */
48+
/* TBD ???? */
49+
{STM32_PIN_PB4, (STM32_PINMUX_ALT_FUNC_2 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED)},
50+
{STM32_PIN_PB5, (STM32_PINMUX_ALT_FUNC_2 | STM32_PUSHPULL_NOPULL | STM32_OSPEEDR_VERY_HIGH_SPEED)},
4351
};
4452

4553
static int pinmux_stm32_init(struct device *port)

0 commit comments

Comments
 (0)