ardupilot/libraries/AP_HAL_ChibiOS/hwdef/X-MAV-AP-H743v2/hwdef.dat

185 lines
3.9 KiB
Plaintext

# hw definition file for processing by chibios_hwdef.py
# for the X-MAV-AP-H743V2 hardware
# MCU class and specific type
MCU STM32H7xx STM32H743xx
# board ID for firmware load
APJ_BOARD_ID AP_HW_X-MAV-AP-H743V2
# crystal frequency
OSCILLATOR_HZ 8000000
# ChibiOS system timer
STM32_ST_USE_TIMER 12
define CH_CFG_ST_RESOLUTION 16
# flash size
FLASH_SIZE_KB 2048
FLASH_RESERVE_START_KB 128
define HAL_STORAGE_SIZE 32768
STORAGE_FLASH_PAGE 14
# default to all pins low to avoid ESD issues
DEFAULTGPIO OUTPUT LOW PULLDOWN
# order of UARTs (and USB)
SERIAL_ORDER OTG1 USART2 UART4 USART1 USART6 UART8 USART3 UART5 UART7
# USB
PA11 OTG_FS_DM OTG1
PA12 OTG_FS_DP OTG1
PE15 VBUS INPUT OPENDRAIN
# Serial1
PD6 USART2_RX USART2
PD5 USART2_TX USART2
# Serial2
PB9 UART4_TX UART4
PB8 UART4_RX UART4
# GPS1/Serial3
PA9 USART1_TX USART1
PA10 USART1_RX USART1
# Serial4
PC6 USART6_TX USART6
PC7 USART6_RX USART6
# Serial5
PE0 UART8_RX UART8
PE1 UART8_TX UART8
# DJI O3/Serial6
PD8 USART3_TX USART3
PD9 USART3_RX USART3
# RC_INPUT/Serial7
PB13 UART5_TX UART5
PB12 UART5_RX UART5
PD14 SBUS_INV OUTPUT LOW
# ESC/Serial8
PE7 UART7_RX UART7
# SWD
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD
# CAN
PD0 CAN1_RX CAN1
PD1 CAN1_TX CAN1
# two I2C bus
I2C_ORDER I2C1 I2C4
# I2C1 - baro
PB6 I2C1_SCL I2C1
PB7 I2C1_SDA I2C1
# I2C4 - CONNECTOR
PD12 I2C4_SCL I2C4
PD13 I2C4_SDA I2C4
# PWM output pins
PE9 TIM1_CH1 TIM1 PWM(1) GPIO(50) BIDIR
PE11 TIM1_CH2 TIM1 PWM(2) GPIO(51)
PE13 TIM1_CH3 TIM1 PWM(3) GPIO(52) BIDIR
PE14 TIM1_CH4 TIM1 PWM(4) GPIO(53)
PB1 TIM3_CH4 TIM3 PWM(5) GPIO(54) BIDIR
PB0 TIM3_CH3 TIM3 PWM(6) GPIO(55)
PB10 TIM2_CH3 TIM2 PWM(7) GPIO(56) BIDIR
PB11 TIM2_CH4 TIM2 PWM(8) GPIO(57)
# GPIOs
PA4 PINIO1 OUTPUT GPIO(81) LOW
PC1 PINIO2 OUTPUT GPIO(82) LOW
PC0 PINIO3 OUTPUT GPIO(83) LOW
# LEDs
PD15 LED_RED OUTPUT HIGH GPIO(90)
PD11 LED_GREEN OUTPUT HIGH GPIO(91)
PB15 LED_BLUE OUTPUT HIGH GPIO(92)
define AP_NOTIFY_GPIO_LED_RGB_RED_PIN 90
define AP_NOTIFY_GPIO_LED_RGB_GREEN_PIN 91
define AP_NOTIFY_GPIO_LED_RGB_BLUE_PIN 92
define HAL_GPIO_LED_ON 1
define AP_NOTIFY_GPIO_LED_RGB_ENABLED 1
# ADC for Power
PC4 BATT_VOLTAGE_SENS ADC1 SCALE(1)
PC5 BATT_CURRENT_SENS ADC2 SCALE(1)
#BATTERY MONITOR ON
define BATT_MONITOR 4
define HAL_BATT_VOLT_PIN 4
define HAL_BATT_CURR_PIN 8
define HAL_BATT_VOLT_SCALE 10.2
define HAL_BATT_CURR_SCALE 20.4
# microSD support
PC12 SDMMC1_CK SDMMC1
PD2 SDMMC1_CMD SDMMC1
PC8 SDMMC1_D0 SDMMC1
PC9 SDMMC1_D1 SDMMC1
PC10 SDMMC1_D2 SDMMC1
PC11 SDMMC1_D3 SDMMC1
define FATFS_HAL_DEVICE SDCD1
# SPI1 - IMU0
PA5 SPI1_SCK SPI1
PA6 SPI1_MISO SPI1
PA7 SPI1_MOSI SPI1
PA3 BMI088_1_G_CS CS
PA2 BMI088_1_A_CS CS
# SPI3 - CONNECTOR
PB3 SPI3_SCK SPI3
PB4 SPI3_MISO SPI3
PB2 SPI3_MOSI SPI3
PA15 AT7456E_CS CS
# SPI4 - IMU1
PE6 SPI4_MOSI SPI4
PE2 SPI4_SCK SPI4
PE5 SPI4_MISO SPI4
PC13 ICM42688P_CS CS
# barometers
BARO DPS310 I2C:0:0x76
# SPI devices
SPIDEV imu0_a SPI1 DEVID1 BMI088_1_A_CS MODE3 10*MHZ 10*MHZ
SPIDEV imu0_g SPI1 DEVID2 BMI088_1_G_CS MODE3 10*MHZ 10*MHZ
SPIDEV imu1 SPI4 DEVID3 ICM42688P_CS MODE3 10*MHZ 10*MHZ
SPIDEV osd SPI3 DEVID5 AT7456E_CS MODE0 10*MHZ 10*MHZ
# 2 IMUs
IMU BMI088 SPI:imu0_a SPI:imu0_g ROTATION_ROLL_180_YAW_90
IMU Invensensev3 SPI:imu1 ROTATION_ROLL_180
# compasses
define HAL_COMPASS_DISABLE_IST8310_INTERNAL_PROBE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
COMPASS IST8310 I2C:ALL_EXTERNAL:0x0E true ROTATION_NONE
COMPASS IST8310 I2C:ALL_INTERNAL:0x0E false ROTATION_YAW_90
# enable FAT filesystem support (needs a microSD defined via SDMMC)
define HAL_OS_FATFS_IO 1
#Serial Port defaults
define DEFAULT_SERIAL4_PROTOCOL SerialProtocol_None
define DEFAULT_SERIAL6_PROTOCOL SerialProtocol_MSP_DisplayPort
define DEFAULT_SERIAL7_PROTOCOL SerialProtocol_RCIN
define DEFAULT_SERIAL8_PROTOCOL SerialProtocol_ESCTelemetry
# setup for OSD
define OSD_ENABLED 1
define HAL_OSD_TYPE_DEFAULT 5
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin