diff --git a/boards/px4/fmu-v6xrt/init/rc.board_sensors b/boards/px4/fmu-v6xrt/init/rc.board_sensors index d113e549d3..0133d2c602 100644 --- a/boards/px4/fmu-v6xrt/init/rc.board_sensors +++ b/boards/px4/fmu-v6xrt/init/rc.board_sensors @@ -61,8 +61,8 @@ then fi fi -# Internal SPI bus ICM42688p (hard-mounted) -icm42688p -R 12 -b 1 -s start +# Internal SPI bus ICM42686p (hard-mounted) +icm42688p -6 -R 12 -b 1 -s start # Internal on IMU SPI BMI088 bmi088 -A -R 4 -s start diff --git a/boards/px4/fmu-v6xrt/src/spi.cpp b/boards/px4/fmu-v6xrt/src/spi.cpp index da6715abb1..16c3e2822d 100644 --- a/boards/px4/fmu-v6xrt/src/spi.cpp +++ b/boards/px4/fmu-v6xrt/src/spi.cpp @@ -65,7 +65,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = { initSPIBus(SPI::Bus::LPSPI1, { - initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::Port2, GPIO::Pin11}, SPI::DRDY{GPIO::Port3, GPIO::Pin19}), /* GPIO_EMC_B2_01 GPIO2_IO11, GPIO_AD_20, GPIO3_IO19 */ + initSPIDevice(DRV_IMU_DEVTYPE_ICM42686P, SPI::CS{GPIO::Port2, GPIO::Pin11}, SPI::DRDY{GPIO::Port3, GPIO::Pin19}), /* GPIO_EMC_B2_01 GPIO2_IO11, GPIO_AD_20, GPIO3_IO19 */ }, {GPIO::Port2, GPIO::Pin1}), // Power GPIO_EMC_B1_33 GPIO2_IO01 initSPIBus(SPI::Bus::LPSPI2, { diff --git a/src/drivers/imu/invensense/icm42688p/ICM42688P.cpp b/src/drivers/imu/invensense/icm42688p/ICM42688P.cpp index 8619d87c89..382bd74fb3 100644 --- a/src/drivers/imu/invensense/icm42688p/ICM42688P.cpp +++ b/src/drivers/imu/invensense/icm42688p/ICM42688P.cpp @@ -126,8 +126,9 @@ int ICM42688P::probe() { for (int i = 0; i < 3; i++) { uint8_t whoami = RegisterRead(Register::BANK_0::WHO_AM_I); + uint8_t expected_whoami = isICM686 ? WHOAMI686 : WHOAMI; - if (whoami == WHOAMI || (isICM686 && whoami == WHOAMI686)) { + if (whoami == expected_whoami) { return PX4_OK; } else {