From 3d5c98e217b4bc6192863d8e09ecb98711d2b48a Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Sat, 22 Jul 2017 15:05:47 +0200 Subject: [PATCH] nucleo-f334r8: UART2 is default serial port (STLINK Virtual Port) --- configs/nucleo-f334r8/include/board.h | 9 +++++++-- configs/nucleo-f334r8/nsh/defconfig | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/configs/nucleo-f334r8/include/board.h b/configs/nucleo-f334r8/include/board.h index ecbb7eafef..0a12bef6e2 100644 --- a/configs/nucleo-f334r8/include/board.h +++ b/configs/nucleo-f334r8/include/board.h @@ -231,8 +231,13 @@ /* USART */ -#define GPIO_USART2_RX GPIO_USART2_RX_2 -#define GPIO_USART2_TX GPIO_USART2_TX_2 +/* By default the USART2 is connected to STLINK Virtual COM Port: + * USART2_RX - PA3 + * USART2_TX - PA4 + */ + +#define GPIO_USART2_RX GPIO_USART2_RX_1 /* PA3 */ +#define GPIO_USART2_TX GPIO_USART2_TX_1 /* PA4 */ #define GPIO_USART1_RX GPIO_USART1_RX_1 /* PA10 */ #define GPIO_USART1_TX GPIO_USART1_TX_1 /* PA9 */ diff --git a/configs/nucleo-f334r8/nsh/defconfig b/configs/nucleo-f334r8/nsh/defconfig index 02c8547603..a28ba83314 100644 --- a/configs/nucleo-f334r8/nsh/defconfig +++ b/configs/nucleo-f334r8/nsh/defconfig @@ -91,11 +91,11 @@ CONFIG_START_YEAR=2011 CONFIG_STM32_CCMEXCLUDE=y CONFIG_STM32_JTAG_SW_ENABLE=y CONFIG_STM32_PWR=y -CONFIG_STM32_USART1=y +CONFIG_STM32_USART2=y CONFIG_SYSLOG_NONE=y CONFIG_TASK_NAME_SIZE=0 CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=512 -CONFIG_USART1_SERIAL_CONSOLE=y +CONFIG_USART2_SERIAL_CONSOLE=y CONFIG_USER_ENTRYPOINT="nsh_main" CONFIG_USERMAIN_STACKSIZE=1024 CONFIG_WDOG_INTRESERVE=0