ardupilot/libraries/AP_HAL_ChibiOS/hwdef/RadiolinkPIX6/hwdef.dat

236 lines
5.3 KiB
Plaintext

# hw definition file for processing by chibios_hwdef.py
# for the RadiolinkPIX6 hardware
# MCU class and specific type.
MCU STM32F7xx STM32F767xx
# crystal frequency
OSCILLATOR_HZ 24000000
# board ID for firmware load
APJ_BOARD_ID 1410
FLASH_RESERVE_START_KB 32
# flash size
FLASH_SIZE_KB 2048
# ChibiOS system timer
STM32_ST_USE_TIMER 5
# order of UARTs (and USB)
SERIAL_ORDER OTG1 USART2 USART3 USART1 UART4 UART7 OTG2
# default the 2nd interface to MAVLink2 until MissionPlanner updates drivers
define HAL_OTG2_PROTOCOL SerialProtocol_MAVLink2
# now we define the pins that USB is connected on
PA11 OTG_FS_DM OTG1
PA12 OTG_FS_DP OTG1
# these are the pins for SWD debugging with a STlinkv2 or black-magic probe
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD
# SPI1 - internal sensors
PB3 SPI1_SCK SPI1
PA6 SPI1_MISO SPI1
PD7 SPI1_MOSI SPI1
# SPI2 - FRAM
PA9 SPI2_SCK SPI2
PB14 SPI2_MISO SPI2
PB15 SPI2_MOSI SPI2
# SPI4 - sensors2
PE2 SPI4_SCK SPI4
PE13 SPI4_MISO SPI4
PE6 SPI4_MOSI SPI4
# sensor CS
PB12 BMI088_A_CS CS
PB4 ICM42688_CS CS SPEED_VERYLOW
PD10 FRAM_CS CS SPEED_VERYLOW
PA8 AT7456_CS CS
PE12 BMI088_G_CS CS
PC14 EXTERNAL1_CS1 CS
PC15 EXTERNAL1_CS2 CS
# I2C buses
PB8 I2C1_SCL I2C1
PB9 I2C1_SDA I2C1
PB10 I2C2_SCL I2C2
PB11 I2C2_SDA I2C2
# order of I2C buses
I2C_ORDER I2C1 I2C2
# enable pins
PE3 VDD_3V3_SENSORS_EN OUTPUT HIGH
# start peripheral power off, then enable after init
# this prevents a problem with radios that use RTS for
# bootloader hold
PD13 nVDD_5V_HIPOWER_EN OUTPUT HIGH
PC4 nVDD_5V_PERIPH_EN OUTPUT HIGH
# drdy pins
PD15 DRDY7_EXTERNAL1 INPUT
# Control of Spektrum power pin
PE4 SPEKTRUM_PWR OUTPUT HIGH GPIO(73)
define HAL_GPIO_SPEKTRUM_PWR 73
# Spektrum Power is Active High
define HAL_SPEKTRUM_PWR_ENABLED 1
# UARTs
# USART2 is telem1
PD6 USART2_RX USART2
PD5 USART2_TX USART2
PD3 USART2_CTS USART2
PD4 USART2_RTS USART2
# USART1 is GPS1
PB7 USART1_RX USART1
PB6 USART1_TX USART1
# USART3 is telem2
PD9 USART3_RX USART3
PD8 USART3_TX USART3
PD11 USART3_CTS USART3
PD12 USART3_RTS USART3
# UART4 GPS2
PA1 UART4_RX UART4 NODMA
PA0 UART4_TX UART4 NODMA
# UART7 is debug
PE7 UART7_RX UART7 NODMA
PE8 UART7_TX UART7 NODMA
# UART8 is for IOMCU
PE0 UART8_RX UART8
PE1 UART8_TX UART8
# UART for IOMCU
IOMCU_UART UART8
# PWM AUX channels
PE14 TIM1_CH4 TIM1 PWM(1) GPIO(50)
PA10 TIM1_CH3 TIM1 PWM(2) GPIO(51)
PE11 TIM1_CH2 TIM1 PWM(3) GPIO(52)
PE9 TIM1_CH1 TIM1 PWM(4) GPIO(53)
PA15 TIM2_CH1 TIM2 PWM(5) GPIO(54)
PA7 TIM3_CH2 TIM3 PWM(6) GPIO(55)
PC6 TIM3_CH1 TIM3 PWM(7) GPIO(56)
PA3 TIM2_CH4 TIM2 PWM(8) GPIO(57)
# PWM output for buzzer
PE5 TIM9_CH1 TIM9 GPIO(77) ALARM
# analog in
PA2 BATT_VOLTAGE_SENS ADC1 SCALE(1)
PA5 BATT_CURRENT_SENS ADC1 SCALE(1)
PC3 SPARE1_ADC1 ADC1 SCALE(1)
PA4 SPARE2_ADC1 ADC1 SCALE(1)
PC0 VDD_5V_SENS ADC1 SCALE(2)
PC2 SCALED_V3V3 ADC1 SCALE(2)
# setup scaling defaults for PixHackV5 power brick
define HAL_BATT_VOLT_SCALE 18.0
define HAL_BATT_CURR_SCALE 24.0
define HAL_BATT_VOLT_PIN 0
define HAL_BATT_CURR_PIN 1
# CAN bus
PD0 CAN1_RX CAN1
PD1 CAN1_TX CAN1
PB5 CAN2_RX CAN2
PB13 CAN2_TX CAN2
# GPIOs
PC5 VDD_BRICK_nVALID INPUT PULLUP
PB1 VDD_BRICK2_nVALID INPUT PULLUP
PB2 VBUS_nVALID INPUT PULLUP
PE10 VDD_5V_HIPOWER_nOC INPUT PULLUP
PE15 VDD_5V_PERIPH_nOC INPUT PULLUP
# SPI devices
SPIDEV bmi088_a SPI1 DEVID2 BMI088_A_CS MODE3 10*MHZ 10*MHZ
SPIDEV bmi088_g SPI1 DEVID1 BMI088_G_CS MODE3 10*MHZ 10*MHZ
SPIDEV imu2 SPI1 DEVID3 ICM42688_CS MODE3 2*MHZ 8*MHZ
SPIDEV osd SPI2 DEVID2 AT7456_CS MODE0 10*MHZ 10*MHZ
SPIDEV ramtron SPI2 DEVID1 FRAM_CS MODE3 8*MHZ 8*MHZ
# up to 2 IMUs
IMU Invensensev3 SPI:imu2 ROTATION_PITCH_180_YAW_270
IMU BMI088 SPI:bmi088_a SPI:bmi088_g ROTATION_PITCH_180
define HAL_DEFAULT_INS_FAST_SAMPLE 1
# probe external I2C compasses plus some internal IST8310
# we also probe some external IST8310 with a non-standard orientation
define HAL_PROBE_EXTERNAL_I2C_COMPASSES
# we need to stop the probe of an IST8310 as an internal compass with PITCH_180
define HAL_COMPASS_DISABLE_IST8310_INTERNAL_PROBE
COMPASS IST8310 I2C:ALL_INTERNAL:0x0E false ROTATION_YAW_180
# one baro
BARO SPL06 I2C:0:0x76
# microSD support
PC8 SDMMC_D0 SDMMC1
PC9 SDMMC_D1 SDMMC1
PC10 SDMMC_D2 SDMMC1
PC11 SDMMC_D3 SDMMC1
PC12 SDMMC_CK SDMMC1
PD2 SDMMC_CMD SDMMC1
# red LED marked as B/E
PD14 LED_RED OUTPUT GPIO(90)
# green LED marked as PWR. We leave this solid on, but allow
# for it to be controlled as a relay if needed
PC1 LED_GREEN OUTPUT GPIO(91)
# blue LED marked as ACT
PC7 LED_BLUE OUTPUT GPIO(92)
# setup for "pixracer" RGB LEDs
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 AP_NOTIFY_GPIO_LED_RGB_ENABLED 1
# enable RAMTROM parameter storage
define HAL_STORAGE_SIZE 32768
define HAL_WITH_RAMTRON 1
# allow to have have a dedicated safety switch pin
define HAL_HAVE_SAFETY_SWITCH 1
define HAL_COMPASS_AUTO_ROT_DEFAULT 2
DMA_PRIORITY SDMMC* UART8* ADC* USART3_RX TIM1_UP USART2_RX USART1_RX TIM1_CH3 SPI4* SPI1_RX SPI2* TIM1_CH1 SPI1_TX TIM*
# enable FAT filesystem support (needs a microSD defined via SDMMC)
define HAL_OS_FATFS_IO 1
ROMFS io_firmware.bin Tools/IO_Firmware/iofirmware_lowpolh.bin
# setup for OSD
define OSD_ENABLED 1
define HAL_OSD_TYPE_DEFAULT 1
ROMFS_WILDCARD libraries/AP_OSD/fonts/font*.bin