Skip to content
Permalink
Browse files

drivers: pinmux: stm32f3: Add SPI3, USB support of STM32F302x8

Added pin muxing for using SPI3 in STM32F3.
Added pin muxing to use USB on STM32F302x8.

Signed-off-by: Kwon Tae-young <tykwon@m2i.co.kr>
  • Loading branch information...
KwonTae-young authored and nashif committed Jun 13, 2019
1 parent 79e4d0a commit d44f6317eed404d71a4cb35917e69aa753609bd7
Showing with 20 additions and 0 deletions.
  1. +20 −0 drivers/pinmux/stm32/pinmux_stm32f3.h
@@ -95,10 +95,18 @@
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)
#define STM32F3_PINMUX_FUNC_PA8_PWM1_CH1 \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)

#if CONFIG_SOC_STM32F302X8
#define STM32F3_PINMUX_FUNC_PA11_USB_DM \
STM32_MODER_ANALOG_MODE
#define STM32F3_PINMUX_FUNC_PA12_USB_DP \
STM32_MODER_ANALOG_MODE
#else
#define STM32F3_PINMUX_FUNC_PA11_USB_DM \
(STM32_PINMUX_ALT_FUNC_14 | STM32_PUSHPULL_NOPULL)
#define STM32F3_PINMUX_FUNC_PA12_USB_DP \
(STM32_PINMUX_ALT_FUNC_14 | STM32_PUSHPULL_NOPULL)
#endif

#define STM32F3_PINMUX_FUNC_PB8_I2C1_SCL \
(STM32_PINMUX_ALT_FUNC_4 | STM32_OPENDRAIN_PULLUP)
@@ -115,6 +123,18 @@
#define STM32F3_PINMUX_FUNC_PB15_SPI2_MOSI \
(STM32_PINMUX_ALT_FUNC_5 | STM32_PUSHPULL_NOPULL)

#if CONFIG_SOC_STM32F302X8 || CONFIG_SOC_STM32F303XC || CONFIG_SOC_STM32F373XC
#define STM32F3_PINMUX_FUNC_PA15_SPI3_NSS \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
#define STM32F3_PINMUX_FUNC_PB3_SPI3_SCK \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL | \
STM32_OSPEEDR_VERY_HIGH_SPEED)
#define STM32F3_PINMUX_FUNC_PB4_SPI3_MISO \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
#define STM32F3_PINMUX_FUNC_PB5_SPI3_MOSI \
(STM32_PINMUX_ALT_FUNC_6 | STM32_PUSHPULL_NOPULL)
#endif

#define STM32F3_PINMUX_FUNC_PF2_ADC12_IN10 \
STM32_MODER_ANALOG_MODE
#define STM32F3_PINMUX_FUNC_PF4_ADC1_IN5 \

0 comments on commit d44f631

Please sign in to comment.
You can’t perform that action at this time.