From 7a530c404d8a143b965ebd843ef7e5bc44c6ece4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Pob=C5=99=C3=ADslo?= Date: Thu, 26 Oct 2017 13:04:05 +0000 Subject: [PATCH] Merged in ccxcz/nuttx/olimex-stm32-h407-v2 (pull request #518) Olimex stm32-h407 serial support for the on-board UEXT connector (fixed style & defconfig) * olimex-stm32-h407: Add USART6 for UEXT connector. * olimex-stm32-h407: nsh_uext configuration and README update. Approved-by: Gregory Nutt --- configs/olimex-stm32-h407/README.txt | 7 ++- configs/olimex-stm32-h407/include/board.h | 7 +++ configs/olimex-stm32-h407/nsh_uext/defconfig | 50 ++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 configs/olimex-stm32-h407/nsh_uext/defconfig diff --git a/configs/olimex-stm32-h407/README.txt b/configs/olimex-stm32-h407/README.txt index 65695f6df3..14854c6a18 100644 --- a/configs/olimex-stm32-h407/README.txt +++ b/configs/olimex-stm32-h407/README.txt @@ -8,6 +8,7 @@ The H407 was programmed with ST-LINK/V2 from both Win8.1 and Ubuntu 14.04 This release provides baseline for H407 12MHZ clock in include/board.h nsh - Only basic shell response tested on USART2 +nsh_uext - Basic shell response tested on USART6 (UEXT) Development Environment ======================= @@ -31,7 +32,11 @@ UARTs ===== On the H407 board, ?? all uarts are available for pin mappings -USART2 is typically used for nsh console +USART2 can be used for nsh console like on Discovery board, +or you can use USART6 exposed via UEXT connector. + +Olimex offers MOD-RS232 voltage level convertor for the UEXT so it can be +attached to computer serial port. STM32-H407-specific Configuration Options =============================================== diff --git a/configs/olimex-stm32-h407/include/board.h b/configs/olimex-stm32-h407/include/board.h index 06850c8bf0..249afdc7ee 100644 --- a/configs/olimex-stm32-h407/include/board.h +++ b/configs/olimex-stm32-h407/include/board.h @@ -256,6 +256,13 @@ #define GPIO_USART2_CTS GPIO_USART2_CTS_1 #define GPIO_USART2_RTS GPIO_USART2_RTS_1 +/* USART6: (UEXT connector) */ + +#define GPIO_USART6_RX GPIO_USART6_RX_1 +#define GPIO_USART6_TX GPIO_USART6_TX_1 + +/* GPIO_USART6_CTS and GPIO_USART6_RTS aren't used for UEXT */ + /* CAN: */ #define GPIO_CAN1_RX GPIO_CAN1_RX_2 /* PB8 */ diff --git a/configs/olimex-stm32-h407/nsh_uext/defconfig b/configs/olimex-stm32-h407/nsh_uext/defconfig new file mode 100644 index 0000000000..7c438609e6 --- /dev/null +++ b/configs/olimex-stm32-h407/nsh_uext/defconfig @@ -0,0 +1,50 @@ +CONFIG_ARCH="arm" +CONFIG_ARCH_BOARD="olimex-stm32-h407" +CONFIG_ARCH_BOARD_OLIMEX_STM32H407=y +CONFIG_ARCH_BUTTONS=y +# CONFIG_ARCH_FPU is not set +CONFIG_ARCH_CHIP_STM32F407ZG=y +CONFIG_ARCH_CHIP_STM32=y +CONFIG_ARCH_STACKDUMP=y +CONFIG_BOARD_LOOPSPERMSEC=16717 +CONFIG_BUILTIN=y +CONFIG_DEBUG_FULLOPT=y +CONFIG_DEBUG_SYMBOLS=y +CONFIG_DISABLE_POLL=y +CONFIG_EXAMPLES_NSH=y +CONFIG_FS_PROCFS=y +CONFIG_INTELHEX_BINARY=y +CONFIG_MAX_TASKS=16 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_MM_REGIONS=2 +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +# CONFIG_NSH_ARGCAT is not set +CONFIG_NSH_BUILTIN_APPS=y +# CONFIG_NSH_CMDOPT_DF_H is not set +# CONFIG_NSH_CMDOPT_HEXDUMP is not set +# CONFIG_NSH_CMDPARMS is not set +CONFIG_NSH_FILEIOSIZE=512 +CONFIG_NSH_LINELEN=64 +CONFIG_NSH_READLINE=y +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_PREALLOC_TIMERS=4 +CONFIG_PREALLOC_WDOGS=16 +CONFIG_RAM_SIZE=114688 +CONFIG_RAM_START=0x20000000 +CONFIG_RAW_BINARY=y +CONFIG_RR_INTERVAL=200 +CONFIG_SDCLONE_DISABLE=y +CONFIG_SCHED_WAITPID=y +# CONFIG_SPI_EXCHANGE is not set +CONFIG_SPI=y +CONFIG_START_YEAR=2016 +CONFIG_STM32_JTAG_SW_ENABLE=y +CONFIG_STM32_OTGFS=y +CONFIG_STM32_PWR=y +CONFIG_STM32_USART2=y +CONFIG_STM32_USART6=y +CONFIG_USART2_RXBUFSIZE=128 +CONFIG_USART2_TXBUFSIZE=128 +CONFIG_USART6_SERIAL_CONSOLE=y +CONFIG_USER_ENTRYPOINT="nsh_main"