From 203f51dc84580faa3d7da8244c35f93dd0322803 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 24 Oct 2023 14:52:16 +1100 Subject: [PATCH] hwdef: support Holybro Pixhawk6X_Rev6 --- .../AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat | 51 +++++++++++-------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat index cd7183301b957..1419ab5aa2e05 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6X/hwdef.dat @@ -121,30 +121,31 @@ PC3 ADC1_3V3 ADC1 SCALE(1) PA5 SPI1_SCK SPI1 PB5 SPI1_MOSI SPI1 PG9 SPI1_MISO SPI1 -PI9 IMU1_CS CS +PI9 SP1_CS1 CS # SPI2 - ICM42688 PI1 SPI2_SCK SPI2 PI2 SPI2_MISO SPI2 PI3 SPI2_MOSI SPI2 -PH5 ICM42688_CS CS -PA10 ICM42688_DRDY INPUT +PH5 SP2_CS1 CS +PA10 SP2_DRDY2 INPUT # SPI3 - BMI088 PB2 SPI3_MOSI SPI3 PC10 SPI3_SCK SPI3 PC11 SPI3_MISO SPI3 -PI4 BMI088_A_CS CS -PI8 BMI088_G_CS CS -PI6 BMI088_DRDY_ACC INPUT -PI7 BMI088_DRDY_GYR INPUT - -# SPI4 - BMM150 -PE12 SPI4_SCK SPI4 -PE13 SPI4_MISO SPI4 -PE14 SPI4_MOSI SPI4 -PF3 BMM150_DRDY INPUT -PH15 BMM150_CS CS +PI4 SP3_CS1 CS +PI8 SP3_CS2 CS +PI6 SP3_DRDY1 INPUT +PI7 SP3_DRDY2 INPUT GPIO(93) +define SP3_DRDY2 93 + +# SPI4 - unused +#PE12 SPI4_SCK SPI4 +#PE13 SPI4_MISO SPI4 +#PE14 SPI4_MOSI SPI4 +#PF3 SP4_DRDY1 INPUT +PH15 SP4_CS1 CS # SPI5 - FRAM PF7 SPI5_SCK SPI5 @@ -311,21 +312,26 @@ define HAL_HEATER_MAG_OFFSET_BMM150 AP_HAL::Device::make_bus_id(AP_HAL::Device:: define HAL_HEATER_MAG_OFFSET {HAL_HEATER_MAG_OFFSET_RM3100, HAL_HEATER_MAG_OFFSET_BMM150} # IMU devices for Holybro6X -SPIDEV bmi088_g SPI3 DEVID1 BMI088_G_CS MODE3 10*MHZ 10*MHZ -SPIDEV bmi088_a SPI3 DEVID2 BMI088_A_CS MODE3 10*MHZ 10*MHZ +SPIDEV bmi088_g SPI3 DEVID1 SP3_CS2 MODE3 10*MHZ 10*MHZ +SPIDEV bmi088_a SPI3 DEVID2 SP3_CS1 MODE3 10*MHZ 10*MHZ # alternative to bmi088 -SPIDEV icm20649 SPI3 DEVID1 BMI088_A_CS MODE3 10*MHZ 10*MHZ -SPIDEV icm42688 SPI2 DEVID1 ICM42688_CS MODE3 2*MHZ 8*MHZ -SPIDEV icm42670 SPI1 DEVID1 IMU1_CS MODE3 2*MHZ 8*MHZ +SPIDEV icm20649 SPI3 DEVID1 SP3_CS1 MODE3 10*MHZ 10*MHZ +SPIDEV icm42688 SPI2 DEVID1 SP2_CS1 MODE3 2*MHZ 8*MHZ +SPIDEV icm42670 SPI1 DEVID1 SP1_CS1 MODE3 2*MHZ 8*MHZ # IMU devices for CUAV-6X. The CUAV board has a BMI088, ICM20649 and # ICM42688 the ICM42688 and BMI088 are on the same SPI buses and CS # pins as the Holybro board, but the orientation of the BMI088 is # different. The ICM20649 is on a different bus -SPIDEV icm20649_2 SPI1 DEVID1 IMU1_CS MODE3 2*MHZ 8*MHZ +SPIDEV icm20649_2 SPI1 DEVID1 SP1_CS1 MODE3 2*MHZ 8*MHZ SPIDEV ramtron SPI5 DEVID1 FRAM_CS MODE3 8*MHZ 8*MHZ +# IMU devices for Holybro6X-Rev6 +SPIDEV adis16470 SPI3 DEVID1 SP3_CS1 MODE3 1*MHZ 2*MHZ +SPIDEV iim42652 SPI2 DEVID1 SP2_CS1 MODE3 2*MHZ 8*MHZ +SPIDEV icm45686 SPI1 DEVID1 SP1_CS1 MODE3 2*MHZ 8*MHZ + # Holybro6X 3 IMUs IMU Invensensev3 SPI:icm42688 ROTATION_PITCH_180_YAW_90 BOARD_MATCH(FMUV6_BOARD_HOLYBRO_6X) IMU BMI088 SPI:bmi088_a SPI:bmi088_g ROTATION_PITCH_180 BOARD_MATCH(FMUV6_BOARD_HOLYBRO_6X) @@ -337,6 +343,11 @@ IMU Invensensev3 SPI:icm42688 ROTATION_ROLL_180_YAW_270 BOARD_MATCH(FMUV6_BOARD_ IMU BMI088 SPI:bmi088_a SPI:bmi088_g ROTATION_PITCH_180 BOARD_MATCH(FMUV6_BOARD_CUAV_6X) IMU Invensensev2 SPI:icm20649_2 ROTATION_ROLL_180 BOARD_MATCH(FMUV6_BOARD_CUAV_6X) +# Holybro6X-Rev6 3 IMUs +IMU ADIS1647x SPI:adis16470 ROTATION_ROLL_180 SP3_DRDY2 BOARD_MATCH(FMUV6_BOARD_HOLYBRO_6X_REV6) +IMU Invensensev3 SPI:iim42652 ROTATION_ROLL_180_YAW_270 BOARD_MATCH(FMUV6_BOARD_HOLYBRO_6X_REV6) +IMU Invensensev3 SPI:icm45686 ROTATION_YAW_90 BOARD_MATCH(FMUV6_BOARD_HOLYBRO_6X_REV6) + define HAL_DEFAULT_INS_FAST_SAMPLE 7 # enable RAMTROM parameter storage