ardupilot/libraries/AP_HAL_ChibiOS/hwdef/YJUAV_A6SE/hwdef.dat

247 lines
5.2 KiB
Plaintext

# hw definition file for processing by chibios_hwdef.py for A6SE_YJUAV
# MCU class and specific type
MCU STM32H7xx STM32H750xx
# crystal frequency
OSCILLATOR_HZ 16000000
# board ID for firmware load
APJ_BOARD_ID 1127
env OPTIMIZE -O2
# ChibiOS system timer
STM32_ST_USE_TIMER 5
# internal flash is off limits
FLASH_SIZE_KB 128
FLASH_RESERVE_START_KB 0
define HAL_FLASH_PROTECTION 1
EXT_FLASH_SIZE_MB 16
EXT_FLASH_RESERVE_START_KB 1024
EXT_FLASH_RESERVE_END_KB 448
# order of UARTs (and USB)
SERIAL_ORDER OTG1 USART2 USART6 USART3 USART1 UART8 UART7 OTG2
# now we define the pins that USB is connected on
PA11 OTG_FS_DM OTG1
PA12 OTG_FS_DP OTG1
# USART2 TELEM1
PD6 USART2_RX USART2
PD5 USART2_TX USART2
PD3 USART2_CTS USART2
PD4 USART2_RTS USART2
# USART6 TELEM2
PC7 USART6_RX USART6
PC6 USART6_TX USART6
PG13 USART6_CTS USART6
PG8 USART6_RTS USART6
# USART3 GPS1
PD9 USART3_RX USART3 NODMA
PD8 USART3_TX USART3 NODMA
# USART1 GPS2
PB7 USART1_RX USART1 NODMA
PA9 USART1_TX USART1 NODMA
# SBUS, DSM port
PE0 UART8_RX UART8
PE1 UART8_TX UART8
# UART7 DEBUG
PE7 UART7_RX UART7 NODMA
PE8 UART7_TX UART7 NODMA
# these are the pins for SWD debugging with a STlinkv2 or black-magic probe
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD
# SPI1 -IMU1
PB3 SPI1_SCK SPI1
PB4 SPI1_MISO SPI1
PD7 SPI1_MOSI SPI1
# SPI6 -IMU2 -IMU3
PA5 SPI6_SCK SPI6
PA6 SPI6_MISO SPI6
PA7 SPI6_MOSI SPI6
# SPI5
PF7 SPI5_SCK SPI5
PF8 SPI5_MISO SPI5
PF9 SPI5_MOSI SPI5
# SPI4 -Extra SPI
PE12 SPI4_SCK SPI4
PE13 SPI4_MISO SPI4
PE6 SPI4_MOSI SPI4
# sensors cs
PE4 IMU1_CS CS
PA0 IMU2_CS CS
PE10 FRAM_CS CS
PE9 BAROMETER1_CS CS
PE3 BAROMETER2_CS CS
PC15 RESERVE_CS CS
# Extra SPI CS
PE5 EXT_CS CS
# I2C buses
PB8 I2C1_SCL I2C1
PB9 I2C1_SDA I2C1
PB10 I2C2_SCL I2C2
PB11 I2C2_SDA I2C2
PH7 I2C3_SCL I2C3
PH8 I2C3_SDA I2C3
PF14 I2C4_SCL I2C4
PF15 I2C4_SDA I2C4
# order of I2C buses
I2C_ORDER I2C1 I2C2 I2C3 I2C4
NODMA I2C*
define STM32_I2C_USE_DMA FALSE
define HAL_I2C_INTERNAL_MASK 1
# PWM channels
PA15 TIM2_CH1 TIM2 PWM(1) GPIO(50) BIDIR
PA1 TIM2_CH2 TIM2 PWM(2) GPIO(51)
PA2 TIM2_CH3 TIM2 PWM(3) GPIO(52) BIDIR
PA3 TIM2_CH4 TIM2 PWM(4) GPIO(53)
PA8 TIM1_CH1 TIM1 PWM(5) GPIO(54) BIDIR
PE11 TIM1_CH2 TIM1 PWM(6) GPIO(55)
PA10 TIM1_CH3 TIM1 PWM(7) GPIO(56) BIDIR
PE14 TIM1_CH4 TIM1 PWM(8) GPIO(57)
PB5 TIM3_CH2 TIM3 PWM(9) GPIO(58)
PB0 TIM3_CH3 TIM3 PWM(10) GPIO(59)
PB1 TIM3_CH4 TIM3 PWM(11) GPIO(60)
# PWM output for buzzer
PD14 TIM4_CH3 TIM4 GPIO(77) ALARM
# RC input
PI7 TIM8_CH3 TIM8 RCININT PULLUP LOW
# Analog in
PC4 BATT_CURRENT_SENS ADC1 SCALE(1)
PF11 BATT_VOLTAGE_SENS ADC1 SCALE(1)
# Analog sys 5v
PF12 VDD_5V_SENS ADC1 SCALE(2)
# ADC3.3/ADC6.6
PC5 SPARE1_ADC1 ADC1 SCALE(1)
PC0 SPARE2_ADC1 ADC1 SCALE(2)
PC1 RSSI_IN ADC1 SCALE(1)
PC3 FMU_SERVORAIL_VCC_SENS ADC1 SCALE(3)
# CAN bus
PD0 CAN1_RX CAN1
PD1 CAN1_TX CAN1
PB12 CAN2_RX CAN2
PB13 CAN2_TX CAN2
# GPIOs
PC13 HEATER_EN OUTPUT LOW GPIO(80)
define HAL_HEATER_GPIO_PIN 80
define HAL_HAVE_IMU_HEATER 1
# enable pins
PC14 VDD_3V3_SENSORS_EN OUTPUT LOW
# red LED marked as B/E
PE15 LED_R1 OUTPUT OPENDRAIN HIGH GPIO(0)
PD10 LED_G1 OUTPUT OPENDRAIN LOW GPIO(1)
PG0 LED_B1 OUTPUT OPENDRAIN HIGH GPIO(2)
define HAL_GPIO_A_LED_PIN 0
define HAL_GPIO_B_LED_PIN 1
define HAL_GPIO_C_LED_PIN 2
define HAL_GPIO_LED_ON 0
define HAL_GPIO_LED_OFF 1
# use pixracer style 3-LED indicators
define HAL_HAVE_PIXRACER_LED
# allow to have have a dedicated safety switch pin
define HAL_HAVE_SAFETY_SWITCH 1
PB15 LED_SAFETY OUTPUT
PA4 SAFETY_IN INPUT PULLDOWN
# SPI devices
SPIDEV imu1 SPI1 DEVID1 IMU1_CS MODE3 2*MHZ 8*MHZ
SPIDEV imu2 SPI6 DEVID1 IMU2_CS MODE3 2*MHZ 8*MHZ
SPIDEV ramtron SPI5 DEVID1 FRAM_CS MODE3 8*MHZ 8*MHZ
SPIDEV dps310 SPI5 DEVID3 BAROMETER1_CS MODE3 5*MHZ 5*MHZ
SPIDEV ms5611 SPI5 DEVID3 BAROMETER2_CS MODE3 5*MHZ 5*MHZ
# IMU1
IMU Invensense SPI:imu1 ROTATION_NONE
IMU Invensensev3 SPI:imu1 ROTATION_NONE
# IMU2
IMU Invensense SPI:imu2 ROTATION_NONE
IMU Invensensev3 SPI:imu2 ROTATION_NONE
define HAL_DEFAULT_INS_FAST_SAMPLE 5
# baro
BARO DPS310 SPI:dps310
BARO MS56XX SPI:ms5611
BARO ICP201XX I2C:0:0x64
# compass
define HAL_COMPASS_DISABLE_IST8310_INTERNAL_PROBE
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
COMPASS IST8310 I2C:ALL_EXTERNAL:0x0E true ROTATION_ROLL_180_YAW_90
COMPASS IST8310 I2C:0:0x0E false ROTATION_YAW_180
# QuadSPI Flash
PD11 QUADSPI_BK1_IO0 QUADSPI1 SPEED_HIGH
PD12 QUADSPI_BK1_IO1 QUADSPI1 SPEED_HIGH
PE2 QUADSPI_BK1_IO2 QUADSPI1 SPEED_HIGH
PD13 QUADSPI_BK1_IO3 QUADSPI1 SPEED_HIGH
PB6 QUADSPI_BK1_NCS QUADSPI1 SPEED_HIGH
PB2 QUADSPI_CLK QUADSPI1 SPEED_HIGH
# microSD support
PC8 SDMMC1_D0 SDMMC1
PC9 SDMMC1_D1 SDMMC1
PC10 SDMMC1_D2 SDMMC1
PC11 SDMMC1_D3 SDMMC1
PC12 SDMMC1_CK SDMMC1
PD2 SDMMC1_CMD SDMMC1
# enable FAT filesystem support (needs a microSD defined via SDMMC)
define HAL_OS_FATFS_IO 1
define HAL_BOARD_LOG_DIRECTORY "/APM/LOGS"
define HAL_BOARD_TERRAIN_DIRECTORY "/APM/TERRAIN"
# enable RAMTROM parameter storage
define HAL_STORAGE_SIZE 32768
define HAL_WITH_RAMTRON 1
#define HAL_USE_EMPTY_STORAGE 1
DMA_PRIORITY SPI1* TIM*UP*
DMA_NOSHARE SPI1* TIM*UP*
# Enable Sagetech MXS ADSB transponder
define HAL_ADSB_SAGETECH_MXS_ENABLED HAL_ADSB_ENABLED