forked from Archive/PX4-Autopilot
Merge pull request #2174 from nopeppermint/addusart6_discovery
Add usart 6 to px4-stm32f4discovery board
This commit is contained in:
commit
6b285a73bb
|
@ -34,8 +34,8 @@
|
|||
*
|
||||
************************************************************************************/
|
||||
|
||||
#ifndef __CONFIG_PX4FMU_V1_INCLUDE_BOARD_H
|
||||
#define __CONFIG_PX4FMU_V1_INCLUDE_BOARD_H
|
||||
#ifndef __CONFIG_DISCOVERY_INCLUDE_BOARD_H
|
||||
#define __CONFIG_DISCOVERY_INCLUDE_BOARD_H
|
||||
|
||||
/************************************************************************************
|
||||
* Included Files
|
||||
|
@ -200,6 +200,18 @@
|
|||
|
||||
#define GPIO_USART2_RX GPIO_USART2_RX_1
|
||||
#define GPIO_USART2_TX GPIO_USART2_TX_1
|
||||
|
||||
/* UART6:
|
||||
*
|
||||
* The STM32F4 Discovery has no on-board serial devices, PC6 (TX) and PC7 (RX)
|
||||
* for connection to an external serial device.
|
||||
*/
|
||||
|
||||
#define GPIO_USART6_RX GPIO_USART6_RX_1
|
||||
#define GPIO_USART6_TX GPIO_USART6_TX_1
|
||||
|
||||
/* USART6 require a RX DMA configuration */
|
||||
#define DMAMAP_USART6_RX DMAMAP_USART6_RX_1
|
||||
|
||||
/* SPI - There is a MEMS device on SPI1 using these pins: */
|
||||
|
||||
|
@ -270,4 +282,4 @@ EXTERN void stm32_setleds(uint8_t ledset);
|
|||
#endif
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* __CONFIG_PX4FMU_V1_INCLUDE_BOARD_H */
|
||||
#endif /* __CONFIG_DISCOVERY_INCLUDE_BOARD_H */
|
||||
|
|
|
@ -91,6 +91,8 @@ CONFIG_ARCH_HAVE_MPU=y
|
|||
# ARMV7M Configuration Options
|
||||
#
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set
|
||||
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
|
||||
CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI=y
|
||||
CONFIG_ARMV7M_STACKCHECK=y
|
||||
CONFIG_SERIAL_TERMIOS=y
|
||||
|
@ -128,6 +130,7 @@ CONFIG_SERIAL_TERMIOS=y
|
|||
# CONFIG_ARCH_CHIP_STM32F100VC is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F100VD is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F100VE is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F102CB is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F103C4 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F103C8 is not set
|
||||
# CONFIG_ARCH_CHIP_STM32F103RET6 is not set
|
||||
|
@ -173,7 +176,6 @@ CONFIG_ARCH_CHIP_STM32F407VG=y
|
|||
# CONFIG_STM32_STM32F20XX is not set
|
||||
# CONFIG_STM32_STM32F30XX is not set
|
||||
CONFIG_STM32_STM32F40XX=y
|
||||
# CONFIG_STM32_STM32F427 is not set
|
||||
# CONFIG_STM32_DFU is not set
|
||||
|
||||
#
|
||||
|
@ -207,9 +209,6 @@ CONFIG_STM32_PWR=y
|
|||
CONFIG_STM32_SPI1=y
|
||||
# CONFIG_STM32_SPI2 is not set
|
||||
# CONFIG_STM32_SPI3 is not set
|
||||
# CONFIG_STM32_SPI4 is not set
|
||||
# CONFIG_STM32_SPI5 is not set
|
||||
# CONFIG_STM32_SPI6 is not set
|
||||
CONFIG_STM32_SYSCFG=y
|
||||
CONFIG_STM32_TIM1=y
|
||||
# CONFIG_STM32_TIM2 is not set
|
||||
|
@ -230,9 +229,7 @@ CONFIG_STM32_USART2=y
|
|||
# CONFIG_STM32_USART3 is not set
|
||||
# CONFIG_STM32_UART4 is not set
|
||||
# CONFIG_STM32_UART5 is not set
|
||||
# CONFIG_STM32_USART6 is not set
|
||||
# CONFIG_STM32_UART7 is not set
|
||||
# CONFIG_STM32_UART8 is not set
|
||||
CONFIG_STM32_USART6=y
|
||||
# CONFIG_STM32_IWDG is not set
|
||||
# CONFIG_STM32_WWDG is not set
|
||||
CONFIG_STM32_ADC=y
|
||||
|
@ -268,6 +265,8 @@ CONFIG_STM32_USART=y
|
|||
#
|
||||
# CONFIG_USART2_RS485 is not set
|
||||
CONFIG_USART2_RXDMA=y
|
||||
# CONFIG_USART6_RS485 is not set
|
||||
CONFIG_USART6_RXDMA=y
|
||||
CONFIG_SERIAL_DISABLE_REORDERING=y
|
||||
CONFIG_STM32_USART_SINGLEWIRE=y
|
||||
|
||||
|
@ -336,8 +335,10 @@ CONFIG_BOOT_RUNFROMFLASH=y
|
|||
#
|
||||
# Board Selection
|
||||
#
|
||||
CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
CONFIG_ARCH_BOARD=""
|
||||
CONFIG_ARCH_BOARD_STM32F4_DISCOVERY=y
|
||||
# CONFIG_ARCH_BOARD_MIKROE_STM32F4 is not set
|
||||
# CONFIG_ARCH_BOARD_CUSTOM is not set
|
||||
CONFIG_ARCH_BOARD="stm32f4discovery"
|
||||
|
||||
#
|
||||
# Common Board Options
|
||||
|
@ -431,7 +432,7 @@ CONFIG_SPI=y
|
|||
# CONFIG_SPI_OWNBUS is not set
|
||||
CONFIG_SPI_EXCHANGE=y
|
||||
# CONFIG_SPI_CMDDATA is not set
|
||||
# CONFIG_RTC is not set
|
||||
# CONFIG_RTC= is not set
|
||||
CONFIG_WATCHDOG=y
|
||||
# CONFIG_ANALOG is not set
|
||||
# CONFIG_AUDIO_DEVICES is not set
|
||||
|
@ -449,10 +450,12 @@ CONFIG_SERIAL=y
|
|||
CONFIG_SERIAL_REMOVABLE=y
|
||||
# CONFIG_16550_UART is not set
|
||||
CONFIG_ARCH_HAVE_USART2=y
|
||||
CONFIG_ARCH_HAVE_USART6=y
|
||||
CONFIG_MCU_SERIAL=y
|
||||
CONFIG_STANDARD_SERIAL=y
|
||||
CONFIG_SERIAL_NPOLLWAITERS=2
|
||||
CONFIG_USART2_SERIAL_CONSOLE=y
|
||||
# CONFIG_USART6_SERIAL_CONSOLE is not set
|
||||
# CONFIG_NO_SERIAL_CONSOLE is not set
|
||||
|
||||
#
|
||||
|
@ -466,6 +469,18 @@ CONFIG_USART2_PARITY=0
|
|||
CONFIG_USART2_2STOP=0
|
||||
# CONFIG_USART2_IFLOWCONTROL is not set
|
||||
# CONFIG_USART2_OFLOWCONTROL is not set
|
||||
|
||||
#
|
||||
# USART6 Configuration
|
||||
#
|
||||
CONFIG_USART6_RXBUFSIZE=512
|
||||
CONFIG_USART6_TXBUFSIZE=512
|
||||
CONFIG_USART6_BAUD=57600
|
||||
CONFIG_USART6_BITS=8
|
||||
CONFIG_USART6_PARITY=0
|
||||
CONFIG_USART6_2STOP=0
|
||||
# CONFIG_USART6_IFLOWCONTROL is not set
|
||||
# CONFIG_USART6_OFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_IFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
||||
CONFIG_USBDEV=y
|
||||
|
|
|
@ -60,9 +60,10 @@ __BEGIN_DECLS
|
|||
****************************************************************************************************/
|
||||
/* Configuration ************************************************************************************/
|
||||
|
||||
/* PX4FMU GPIOs ***********************************************************************************/
|
||||
/* LEDs */
|
||||
/* PX4-STM32F4Discovery GPIOs ***********************************************************************************/
|
||||
/* LEDs */
|
||||
// LED1 green, LED2 orange, LED3 red, LED4 blue
|
||||
|
||||
|
||||
#define GPIO_LED1 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
|
||||
GPIO_OUTPUT_CLEAR|GPIO_PORTD|GPIO_PIN12)
|
||||
|
|
Loading…
Reference in New Issue