mirror of https://github.com/ArduPilot/ardupilot
208 lines
4.3 KiB
Plaintext
Executable File
208 lines
4.3 KiB
Plaintext
Executable File
|
|
# MCU class and specific type
|
|
MCU STM32F7xx STM32F767xx
|
|
|
|
|
|
# board ID for firmware load
|
|
APJ_BOARD_ID 1131
|
|
|
|
# crystal frequency
|
|
OSCILLATOR_HZ 24000000
|
|
|
|
USB_STRING_MANUFACTURER "Dheeran labs"
|
|
USB_STRING_PRODUCT "PixFlamingo"
|
|
|
|
# ChibiOS system timer
|
|
STM32_ST_USE_TIMER 2
|
|
#define CH_CFG_ST_RESOLUTION 16
|
|
|
|
|
|
# flash size
|
|
FLASH_SIZE_KB 2048
|
|
|
|
FLASH_RESERVE_START_KB 96
|
|
env OPTIMIZE -O2
|
|
|
|
# serial port for stdout disabled, use USB console
|
|
# STDOUT_SERIAL SD7
|
|
# STDOUT_BAUDRATE 57600
|
|
|
|
# only one I2C bus
|
|
I2C_ORDER I2C2
|
|
|
|
# order of UARTs (and USB)
|
|
SERIAL_ORDER OTG1 USART3 USART6 USART1 EMPTY UART7 USART2
|
|
|
|
|
|
#define HAL_SERIAL4_PROTOCOL SerialProtocol_RCIN
|
|
#define HAL_SERIAL4_BAUD 115
|
|
|
|
# debug on LUART1
|
|
#STDOUT_SERIAL SD4
|
|
#STDOUT_BAUDRATE 57600
|
|
|
|
PC1 BATT_VOLTAGE_SENS ADC1 SCALE(1)
|
|
PC0 BATT_CURRENT_SENS ADC1 SCALE(1)
|
|
PA4 VDD_5V_SENS ADC1 SCALE(2)
|
|
|
|
# SPI1 is fram bus
|
|
PA5 SPI1_SCK SPI1
|
|
PA6 SPI1_MISO SPI1
|
|
PA7 SPI1_MOSI SPI1
|
|
|
|
PA9 VBUS INPUT
|
|
|
|
PA11 OTG_FS_DM OTG1
|
|
PA12 OTG_FS_DP OTG1
|
|
|
|
# USART3 serial1 telem1
|
|
PD8 USART3_TX USART3
|
|
PD9 USART3_RX USART3
|
|
PB13 USART3_CTS USART3
|
|
PB14 USART3_RTS USART3
|
|
|
|
# USART2 serial2 telem2
|
|
PC6 USART6_TX USART6
|
|
PC7 USART6_RX USART6
|
|
|
|
PD5 USART2_TX USART2 NODMA
|
|
PD6 USART2_RX USART2 NODMA
|
|
|
|
# USART1 is GPS
|
|
PB6 USART1_TX USART1 NODMA
|
|
PB7 USART1_RX USART1
|
|
define HAL_USE_SERIAL TRUE
|
|
|
|
PB4 UART7_TX UART7 NODMA
|
|
PB3 UART7_RX UART7 NODMA
|
|
|
|
#define STM32_SERIAL_USE_USART2 TRUE
|
|
|
|
PA13 JTMS-SWDIO SWD
|
|
PA14 JTCK-SWCLK SWD
|
|
|
|
# PWM output for buzzer
|
|
PB0 TIM3_CH3 TIM3 RCININT PULLDOWN LOW
|
|
|
|
PE2 BOOT1 INPUT
|
|
PB12 VDD_BRICK_VALID INPUT PULLDOWN
|
|
|
|
PB10 I2C2_SCL I2C2
|
|
PB11 I2C2_SDA I2C2
|
|
|
|
PA8 CAN3_RX CAN3
|
|
PA15 CAN3_TX CAN3
|
|
|
|
# SPI2 is for sensors
|
|
PD3 SPI2_SCK SPI2
|
|
PC2 SPI2_MISO SPI2
|
|
PC3 SPI2_MOSI SPI2
|
|
|
|
PD0 IMU1_CS CS
|
|
PE0 MPU6500_CS CS
|
|
PB5 BARO_CS CS
|
|
PD7 MAG_CS CS
|
|
|
|
# This defines more ADC inputs.
|
|
PC4 AUX_POWER ADC1 SCALE(1)
|
|
PC5 AUX_ADC2 ADC1 SCALE(1)
|
|
|
|
PD10 VBUS_VALID INPUT PULLDOWN
|
|
PE12 LED_SAFETY OUTPUT
|
|
PE15 SAFETY_IN INPUT PULLDOWN
|
|
PC14 VDD_PERIPH_EN OUTPUT HIGH
|
|
|
|
PC8 SDMMC_D0 SDMMC1
|
|
PC9 SDMMC_D1 SDMMC1
|
|
PC10 SDMMC_D2 SDMMC1
|
|
PC11 SDMMC_D3 SDMMC1
|
|
PC12 SDMMC_CK SDMMC1
|
|
PD2 SDMMC_CMD SDMMC1
|
|
|
|
PE5 IMU1_DRDY INPUT
|
|
PE6 MPU6500_DRDY INPUT
|
|
PE4 MAG_DRDY INPUT
|
|
|
|
PC13 VDD_SENSORS_EN OUTPUT HIGH
|
|
|
|
# GPIOs
|
|
PE3 HEATER_EN OUTPUT LOW GPIO(80)
|
|
define HAL_HEATER_GPIO_PIN 80
|
|
define HAL_HAVE_IMU_HEATER 1
|
|
|
|
PD12 TIM4_CH1 TIM4 GPIO(32) ALARM
|
|
PB9 EXTERN_GPIO1 OUTPUT GPIO(4)
|
|
|
|
PE14 TIM1_CH4 TIM1 PWM(1) GPIO(50)
|
|
PE13 TIM1_CH3 TIM1 PWM(2) GPIO(51)
|
|
PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52)
|
|
PE9 TIM1_CH1 TIM1 PWM(4) GPIO(53)
|
|
PA0 TIM5_CH1 TIM5 PWM(5) GPIO(54)
|
|
PA1 TIM5_CH2 TIM5 PWM(6) GPIO(55)
|
|
PA2 TIM5_CH3 TIM5 PWM(7) GPIO(56)
|
|
PA3 TIM5_CH4 TIM5 PWM(8) GPIO(57)
|
|
PB8 TIM10_CH1 TIM10 PWM(9) GPIO(58) NODMA
|
|
PB15 TIM8_CH3N TIM8 PWM(10) GPIO(59) NODMA
|
|
|
|
|
|
# SPI device table.
|
|
|
|
SPIDEV icm42670 SPI2 DEVID1 IMU1_CS MODE3 2*MHZ 8*MHZ
|
|
SPIDEV mpu6500 SPI2 DEVID2 MPU6500_CS MODE3 1*MHZ 4*MHZ
|
|
SPIDEV ms5611_int SPI1 DEVID3 BARO_CS MODE3 20*MHZ 20*MHZ
|
|
SPIDEV lis3mdl SPI2 DEVID5 MAG_CS MODE3 500*KHZ 500*KHZ
|
|
SPIDEV bmp280 SPI1 DEVID3 BARO_CS MODE3 1*MHZ 8*MHZ
|
|
SPIDEV dps310 SPI1 DEVID3 BARO_CS MODE3 5*MHZ 5*MHZ
|
|
|
|
# enable FAT filesystem
|
|
define HAL_OS_FATFS_IO 1
|
|
|
|
define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
|
|
define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
|
|
|
|
|
|
# pixracer has 3 LEDs, Red, Green, Blue
|
|
define AP_NOTIFY_GPIO_LED_RGB_ENABLED 1
|
|
|
|
PE10 LED_RED OUTPUT GPIO(0)
|
|
PE8 LED_GREEN OUTPUT GPIO(1)
|
|
PE7 LED_BLUE OUTPUT GPIO(2)
|
|
|
|
define AP_NOTIFY_GPIO_LED_RGB_RED_PIN 0
|
|
define AP_NOTIFY_GPIO_LED_RGB_GREEN_PIN 1
|
|
define AP_NOTIFY_GPIO_LED_RGB_BLUE_PIN 2
|
|
|
|
# battery setup
|
|
define HAL_BATT_MONITOR_DEFAULT 4
|
|
define HAL_BATT_VOLT_PIN 11
|
|
define HAL_BATT_CURR_PIN 10
|
|
define HAL_BATT_VOLT_SCALE 10.1
|
|
define HAL_BATT_CURR_SCALE 17.0
|
|
|
|
DMA_PRIORITY S*
|
|
|
|
define STORAGE_FLASH_PAGE 1
|
|
define HAL_STORAGE_SIZE 32768
|
|
|
|
|
|
# two IMUs
|
|
IMU Invensensev3 SPI:icm42670 ROTATION_YAW_270 #ROTATION_YAW_180 #ROTATION_ROLL_180_YAW_270 #ROTATION_YAW_90 #ROTATION_YAW_270 #ROTATION_ROLL_180
|
|
IMU Invensense SPI:mpu6500 ROTATION_ROLL_180
|
|
|
|
COMPASS LIS3MDL SPI:lis3mdl false ROTATION_NONE
|
|
|
|
# also probe all types of external I2C compasses
|
|
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
|
|
define HAL_I2C_INTERNAL_MASK 0
|
|
|
|
|
|
#NODMA I2C*
|
|
define STM32_I2C_USE_DMA FALSE
|
|
# one barometer
|
|
BARO MS56XX SPI:ms5611_int
|
|
BARO BMP280 SPI:bmp280
|
|
BARO DPS310 SPI:dps310
|
|
define HAL_BARO_ALLOW_INIT_NO_BARO
|
|
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
|
|
|