forked from Archive/PX4-Autopilot
boards: add support for Matek H743 Slim V3
IMUs were replaced in V3 with 2x ICM42688P. This configuration should work with all revisions of Matek F743 Slim board, including V1, V1.5 and interim variant of V3 (ICM42688P + ICM42605). Signed-off-by: Andrei Korigodskii <akorigod@gmail.com>
This commit is contained in:
parent
9676af2fe6
commit
eeb9c5256a
|
@ -12,6 +12,7 @@ CONFIG_DRIVERS_DSHOT=y
|
|||
CONFIG_DRIVERS_GPS=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42605=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
|
||||
CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
|
||||
CONFIG_COMMON_MAGNETOMETER=y
|
||||
CONFIG_COMMON_OPTICAL_FLOW=y
|
||||
|
|
|
@ -5,15 +5,25 @@
|
|||
|
||||
board_adc start
|
||||
|
||||
# Internal SPI bus ICM-42605
|
||||
if ! icm42605 -R 14 -s start
|
||||
# Different board versions have different IMUs, so we try all known options
|
||||
|
||||
# Internal SPI bus ICM-42688P (SPI1) on V3 board, PITCH180 orientation
|
||||
if ! icm42688p -s -b 1 -R 12 start
|
||||
then
|
||||
# internal SPI bus ICM-20602
|
||||
icm20602 -R 12 -s start
|
||||
# Internal SPI bus MPU-6000 on V1.0 and V1.5 boards
|
||||
mpu6000 -s -b 1 -R 12 start
|
||||
fi
|
||||
|
||||
# Internal SPI bus MPU-6000
|
||||
mpu6000 -R 12 -s start
|
||||
# Internal SPI bus ICM-42688P (SPI4) on V3 board, PITCH180_YAW90 orientation
|
||||
if ! icm42688p -s -b 4 -R 26 start
|
||||
then
|
||||
# Internal SPI bus ICM-42605 on V1.5 board, ROTATION_ROLL_180_YAW_270 orientation
|
||||
if ! icm42605 -s -b 4 -R 14 start
|
||||
then
|
||||
# Internal SPI bus ICM-20602 on V1.0 board, PITCH180 orientation
|
||||
icm20602 -s -b 4 -R 12 start
|
||||
fi
|
||||
fi
|
||||
|
||||
# Internal baro
|
||||
dps310 -I start -a 118
|
||||
|
|
|
@ -38,7 +38,11 @@
|
|||
|
||||
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
||||
initSPIBus(SPI::Bus::SPI1, {
|
||||
// Matek H743 Slim V1.0 and V1.5
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_MPU6000, SPI::CS{GPIO::PortC, GPIO::Pin15}, SPI::DRDY{GPIO::PortB, GPIO::Pin2}),
|
||||
|
||||
// Matek H743 Slim V3
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortC, GPIO::Pin15}, SPI::DRDY{GPIO::PortB, GPIO::Pin2}),
|
||||
}),
|
||||
initSPIBus(SPI::Bus::SPI2, {
|
||||
initSPIDevice(DRV_OSD_DEVTYPE_ATXXXX, SPI::CS{GPIO::PortB, GPIO::Pin12}),
|
||||
|
@ -48,8 +52,14 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
|||
initSPIConfigExternal(SPI::CS{GPIO::PortE, GPIO::Pin2}),
|
||||
}),
|
||||
initSPIBus(SPI::Bus::SPI4, {
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42605, SPI::CS{GPIO::PortC, GPIO::Pin13}),
|
||||
// Matek H743 Slim V1.0
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM20602, SPI::CS{GPIO::PortE, GPIO::Pin11}),
|
||||
|
||||
// Matek H743 Slim V1.5
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42605, SPI::CS{GPIO::PortC, GPIO::Pin13}),
|
||||
|
||||
// Matek H743 Slim V3
|
||||
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortC, GPIO::Pin13}),
|
||||
}),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue