mirror of https://github.com/ArduPilot/ardupilot
151 lines
3.3 KiB
Plaintext
151 lines
3.3 KiB
Plaintext
# hw definition file for MicoAir405Mini hardware
|
|
|
|
# MCU class and specific type
|
|
MCU STM32F4xx STM32F405xx
|
|
|
|
# board ID for firmware load
|
|
APJ_BOARD_ID AP_HW_MicoAir405Mini
|
|
|
|
# crystal frequency
|
|
OSCILLATOR_HZ 8000000
|
|
STM32_PLLM_VALUE 8
|
|
|
|
define STM32_ST_USE_TIMER 5
|
|
define CH_CFG_ST_RESOLUTION 16
|
|
|
|
# chip flash size & bootloader & firmware
|
|
FLASH_SIZE_KB 1024
|
|
FLASH_RESERVE_START_KB 48
|
|
|
|
define HAL_STORAGE_SIZE 15360
|
|
STORAGE_FLASH_PAGE 1
|
|
|
|
# board voltage
|
|
STM32_VDD 330U
|
|
|
|
# LEDs
|
|
PC5 LED_RED OUTPUT LOW GPIO(0)
|
|
PC4 LED_GREEN OUTPUT LOW GPIO(1)
|
|
PA8 LED_BLUE OUTPUT LOW 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
|
|
|
|
define AP_NOTIFY_GPIO_LED_RGB_ENABLED 1
|
|
|
|
# only one I2C bus
|
|
I2C_ORDER I2C1
|
|
PB6 I2C1_SCL I2C1
|
|
PB7 I2C1_SDA I2C1
|
|
|
|
# spi1 bus for OSD
|
|
PA5 SPI1_SCK SPI1
|
|
PA6 SPI1_MISO SPI1
|
|
PA7 SPI1_MOSI SPI1
|
|
|
|
# spi2 bus for IMU
|
|
PB13 SPI2_SCK SPI2
|
|
PC2 SPI2_MISO SPI2
|
|
PC3 SPI2_MOSI SPI2
|
|
|
|
# spi3 bus for SDCARD
|
|
PC10 SPI3_SCK SPI3
|
|
PC11 SPI3_MISO SPI3
|
|
PC12 SPI3_MOSI SPI3
|
|
|
|
#CS pin
|
|
PB12 AT7456E_CS CS
|
|
PC14 BMI270_CS CS
|
|
PC13 DPS310_CS CS
|
|
PC9 SDCARD_CS CS
|
|
|
|
# analog pins
|
|
PC0 BATT_VOLTAGE_SENS ADC1 SCALE(1)
|
|
PC1 BATT_CURRENT_SENS ADC1 SCALE(1)
|
|
|
|
# define default battery setup
|
|
define HAL_BATT_VOLT_PIN 10
|
|
define HAL_BATT_VOLT_SCALE 21.2
|
|
define HAL_BATT_CURR_PIN 11
|
|
define HAL_BATT_CURR_SCALE 40.2
|
|
|
|
# order of UARTs (and USB)
|
|
# SERIAL_NUM|SER0|SER1 |SER2 |SER3 |SER4 |SER5 |SER6 |
|
|
# FUNCTION |USB | |DJIO3 |GPS | |ESC |SBUS |
|
|
SERIAL_ORDER OTG1 USART1 USART2 USART3 UART4 UART5 USART6
|
|
|
|
# USB
|
|
PA11 OTG_FS_DM OTG1
|
|
PA12 OTG_FS_DP OTG1
|
|
|
|
# USART1
|
|
PA9 USART1_TX USART1
|
|
PA10 USART1_RX USART1
|
|
|
|
# USART2 - DJIO3
|
|
PA2 USART2_TX USART2
|
|
PA3 USART2_RX USART2 NODMA
|
|
|
|
# USART3 - GPS
|
|
PB10 USART3_TX USART3 NODMA
|
|
PB11 USART3_RX USART3 NODMA
|
|
|
|
# UART4
|
|
PA0 UART4_TX UART4
|
|
PA1 UART4_RX UART4 NODMA
|
|
|
|
# UART5
|
|
PD2 UART5_RX UART5 NODMA
|
|
|
|
# UART6
|
|
PC7 USART6_RX USART6
|
|
PC6 USART6_TX USART6 NODMA
|
|
PC15 SBUS_INV OUTPUT
|
|
|
|
# 9 PWM available by default
|
|
define BOARD_PWM_COUNT_DEFAULT 9
|
|
|
|
PB0 TIM3_CH3 TIM3 PWM(1) GPIO(50)
|
|
PB1 TIM3_CH4 TIM3 PWM(2) GPIO(51) BIDIR
|
|
PA15 TIM2_CH1 TIM2 PWM(3) GPIO(52) BIDIR
|
|
PB3 TIM2_CH2 TIM2 PWM(4) GPIO(53)
|
|
PB4 TIM3_CH1 TIM3 PWM(5) GPIO(54)
|
|
PB5 TIM3_CH2 TIM3 PWM(6) GPIO(55)
|
|
PB8 TIM4_CH3 TIM4 PWM(7) GPIO(56)
|
|
PB9 TIM4_CH4 TIM4 PWM(8) GPIO(57)
|
|
PB14 TIM12_CH1 TIM12 PWM(9) GPIO(58) NODMA
|
|
|
|
# no built-in compass, but probe the i2c bus for all possible
|
|
# external compass types
|
|
define ALLOW_ARM_NO_COMPASS
|
|
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
|
|
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
|
|
define HAL_I2C_INTERNAL_MASK 0
|
|
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
|
|
|
|
# imu & baro
|
|
IMU BMI270 SPI:bmi270 ROTATION_ROLL_180
|
|
BARO DPS310 SPI:dps310
|
|
|
|
# SPI devices
|
|
SPIDEV bmi270 SPI2 DEVID1 BMI270_CS MODE3 2*MHZ 10*MHZ
|
|
SPIDEV dps310 SPI2 DEVID2 DPS310_CS MODE3 5*MHZ 5*MHZ
|
|
SPIDEV sdcard SPI3 DEVID3 SDCARD_CS MODE0 400*KHZ 25*MHZ
|
|
SPIDEV osd SPI1 DEVID4 AT7456E_CS MODE0 10*MHZ 10*MHZ
|
|
|
|
# filesystem setup on sdcard
|
|
define HAL_OS_FATFS_IO 1
|
|
|
|
# setup for OSD
|
|
define OSD_ENABLED 1
|
|
define HAL_OSD_TYPE_DEFAULT 1
|
|
ROMFS_WILDCARD libraries/AP_OSD/fonts/font0.bin
|
|
|
|
# setup for BF migration
|
|
define HAL_FRAME_TYPE_DEFAULT 12
|
|
|
|
# reduce flash usage
|
|
include ../include/minimize_fpv_osd.inc
|
|
undef AP_OPTICALFLOW_ENABLED
|