From 461e9d4ecea5d8904081225d0405b2e2ef0eb481 Mon Sep 17 00:00:00 2001 From: "Alan C. Assis" Date: Wed, 26 Aug 2020 11:55:46 -0300 Subject: [PATCH] stm32f746g-disco: Move serial console from USART6 to USART1 (Virtual COM) Thanks Gustavo H. Nihei and Abdelatif Guettouche for reviewing --- .../arm/stm32f7/stm32f746g-disco/README.txt | 26 +++++++++++-------- .../stm32f746g-disco/configs/nsh/defconfig | 4 +-- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/boards/arm/stm32f7/stm32f746g-disco/README.txt b/boards/arm/stm32f7/stm32f746g-disco/README.txt index aa7d53443a..eeefe8dca7 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/README.txt +++ b/boards/arm/stm32f7/stm32f746g-disco/README.txt @@ -43,8 +43,8 @@ STATUS ====== 2015-07-19: The basic NSH configuration is functional using a serial - console on USART6 and RS-232 shield. Very few other drivers are in - place yet. + console on USART1 (Virtual COM, i.e. ttyACM0). Very few other drivers + are in place yet. 2015-07-20: STM32 F7 Ethernet appears to be functional, but has had only light testing. @@ -98,16 +98,20 @@ LEDs and Buttons Serial Console ============== - These configurations assume that you are using a standard Arduio RS-232 - shield with the serial interface with RX on pin D0 and TX on pin D1: + The STM32F469G-DISCO uses USART1 connected to "Virtual COM", so when you + plug it on your computer it will be detected as a USB port (i.e. ttyACM0): -------- --------------- STM32F7 - ARDUIONO FUNCTION GPIO - -- ----- --------- ----- - DO RX USART6_RX PC7 - D1 TX USART6_TX PC6 - -- ----- --------- ----- + V.COM FUNCTION GPIO + ----- --------- ----- + RXD USART1_RX PB7 + TXD USART1_TX PA9 + ------ --------- ----- + + All you need to do after flashing NuttX on this board is use a serial + console tool (minicom, picocom, screen, hyperterminal, teraterm, putty, + etc ) configured to 115200 8n1. Porting STM32 F4 Drivers ======================== @@ -466,7 +470,7 @@ Configurations b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration process. - 2. By default, these configurations use the USART6 for the serial + 2. By default, these configurations use the USART1 for the serial console. Pins are configured to that RX/TX are available at pins D0 and D1 of the Arduion connectors. This should be compatible with most RS-232 shields. @@ -505,7 +509,7 @@ Configuration Directories nsh --- Configures the NuttShell (NSH) located at apps/examples/nsh. The - Configuration enables the serial interfaces on UART6. Support for + Configuration enables the serial interfaces on USART1. Support for built-in applications is enabled, but in the base configuration no built-in applications are selected. diff --git a/boards/arm/stm32f7/stm32f746g-disco/configs/nsh/defconfig b/boards/arm/stm32f7/stm32f746g-disco/configs/nsh/defconfig index fb0b3f84ce..70d2878600 100644 --- a/boards/arm/stm32f7/stm32f746g-disco/configs/nsh/defconfig +++ b/boards/arm/stm32f7/stm32f746g-disco/configs/nsh/defconfig @@ -47,8 +47,8 @@ CONFIG_SPI=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 -CONFIG_STM32F7_USART6=y +CONFIG_STM32F7_USART1=y CONFIG_SYSTEM_NSH=y CONFIG_TASK_NAME_SIZE=0 -CONFIG_USART6_SERIAL_CONSOLE=y +CONFIG_USART1_SERIAL_CONSOLE=y CONFIG_USER_ENTRYPOINT="nsh_main"