ardupilot/libraries/AP_HAL_ChibiOS/hwdef/NxtPX4v2/hwdef.dat

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

162 lines
3.3 KiB
Plaintext
Raw Normal View History

# hw definition file for processing by chibios_hwdef.py
# for the NxtPX4v2 hardware
# MCU class and specific type
MCU STM32H7xx STM32H743xx
# board ID for firmware load
APJ_BOARD_ID AP_HW_NxtPX4v2
# crystal frequency
OSCILLATOR_HZ 16000000
# 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 USART3 UART7 UART5 UART8
# USB
PA11 OTG_FS_DM OTG1
PA12 OTG_FS_DP OTG1
PD0 VBUS INPUT OPENDRAIN
# GPS1
PA9 USART1_TX USART1
PA10 USART1_RX USART1
# TELEM1
PD6 USART2_RX USART2
PD5 USART2_TX USART2
# DJI O3
PD8 USART3_TX USART3
PD9 USART3_RX USART3
# TELEM2
PB9 UART4_TX UART4
PB8 UART4_RX UART4
# RC_INPUT
PB13 UART5_TX UART5
PB12 UART5_RX UART5
PD14 SBUS_INV OUTPUT LOW
# ESC
PE7 UART7_RX UART7
# TELEM3
PE0 UART8_RX UART8
PE1 UART8_TX UART8
# SWD
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD
# 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)
PB10 TIM2_CH3 TIM2 PWM(5) GPIO(54) BIDIR
PB11 TIM2_CH4 TIM2 PWM(6) GPIO(55)
PB0 TIM3_CH3 TIM3 PWM(7) GPIO(56) BIDIR
PB1 TIM3_CH4 TIM3 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)
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
# no built-in compass, but probe the i2c bus for all possible
# external compass types
define ALLOW_ARM_NO_COMPASS
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
# 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
# SPI4 - IMU1
PE6 SPI4_MOSI SPI4
PE2 SPI4_SCK SPI4
PE5 SPI4_MISO SPI4
PC2 BMI088_2_G_CS CS
PC13 BMI088_2_A_CS CS
# barometers
BARO SPL06 I2C:0:0x77
# 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_a SPI4 DEVID3 BMI088_2_A_CS MODE3 10*MHZ 10*MHZ
SPIDEV imu1_g SPI4 DEVID4 BMI088_2_G_CS MODE3 10*MHZ 10*MHZ
# 2 IMUs
IMU BMI088 SPI:imu0_a SPI:imu0_g ROTATION_ROLL_180_YAW_90
IMU BMI088 SPI:imu1_a SPI:imu1_g ROTATION_ROLL_180_YAW_90
# enable FAT filesystem support (needs a microSD defined via SDMMC)
define HAL_OS_FATFS_IO 1