stm32f3_disco: Switch USART1(Console) to PC4/PC5

Default configuration for USART1 (Console output) on board
stm32f3_disco was set on PA9/PA10, which matches Rev-A/B
configuration. Though, on more recent configuration of the
board (Rev-C onward). USART1 is mapped to PC4/PC5.
This configuration has the benefit to support VCP, hence it
is chosen to be set by default.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2017-09-07 13:55:08 +02:00 committed by Anas Nashif
commit 8468db659b
4 changed files with 12 additions and 3 deletions

View file

@ -15,8 +15,8 @@
/* pin assignments for STM32F3DISCOVERY board */
static const struct pin_config pinconf[] = {
#ifdef CONFIG_UART_STM32_PORT_1
{STM32_PIN_PA9, STM32F3_PINMUX_FUNC_PA9_USART1_TX},
{STM32_PIN_PA10, STM32F3_PINMUX_FUNC_PA10_USART1_RX},
{STM32_PIN_PC4, STM32F3_PINMUX_FUNC_PC4_USART1_TX},
{STM32_PIN_PC5, STM32F3_PINMUX_FUNC_PC5_USART1_RX},
#endif /* CONFIG_UART_STM32_PORT_1 */
#ifdef CONFIG_UART_STM32_PORT_2
{STM32_PIN_PA2, STM32F3_PINMUX_FUNC_PA2_USART2_TX},

View file

@ -14,6 +14,9 @@
#define STM32F3_PINMUX_FUNC_PA9_USART1_TX STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F3_PINMUX_FUNC_PA10_USART1_RX STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F3_PINMUX_FUNC_PC4_USART1_TX STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F3_PINMUX_FUNC_PC5_USART1_RX STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F3_PINMUX_FUNC_PA2_USART2_TX STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP
#define STM32F3_PINMUX_FUNC_PA3_USART2_RX STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_PULLUP

View file

@ -27,6 +27,12 @@
tx = <STM32_PIN_PB6 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
};
};
usart1_pins_d: usart1@3 {
rx_tx {
rx = <STM32_PIN_PC5 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;
tx = <STM32_PIN_PC4 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUSHPULL_NOPULL)>;
};
};
usart2_pins_a: usart2@0 {
rx_tx {
rx = <STM32_PIN_PA3 (STM32_PINMUX_ALT_FUNC_7 | STM32_PUPDR_NO_PULL)>;

View file

@ -20,7 +20,7 @@
&usart1 {
current-speed = <115200>;
pinctrl-0 = <&usart1_pins_b>;
pinctrl-0 = <&usart1_pins_d>;
pinctrl-names = "default";
status = "ok";
};