diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index 7b8f20839d..f11e61036a 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -84,8 +84,8 @@ else then fi - # Internal SPI bus try MPU6K on ICM-20608-G is rotated 180 deg roll, 270 deg yaw - if mpu6000 -R 14 start + # Internal SPI bus ICM-20608-G is rotated 180 deg roll, 270 deg yaw + if mpu6000 -R 14 -T 20608 start then fi else diff --git a/cmake/configs/nuttx_px4fmu-v4_default.cmake b/cmake/configs/nuttx_px4fmu-v4_default.cmake index cc1db95eef..0b873ccb98 100644 --- a/cmake/configs/nuttx_px4fmu-v4_default.cmake +++ b/cmake/configs/nuttx_px4fmu-v4_default.cmake @@ -14,6 +14,7 @@ set(config_module_list drivers/px4fmu drivers/boards/px4fmu-v4 drivers/rgbled + drivers/mpu6000 drivers/mpu9250 drivers/hmc5883 drivers/ms5611 diff --git a/src/drivers/boards/px4fmu-v4/board_config.h b/src/drivers/boards/px4fmu-v4/board_config.h index d2cea93b87..1fa6f0f2d6 100644 --- a/src/drivers/boards/px4fmu-v4/board_config.h +++ b/src/drivers/boards/px4fmu-v4/board_config.h @@ -127,6 +127,7 @@ __BEGIN_DECLS #define PX4_SPIDEV_BARO 3 #define PX4_SPIDEV_MPU 4 #define PX4_SPIDEV_HMC 5 +#define PX4_SPIDEV_ICM 6 /* I2C busses */ #define PX4_I2C_BUS_EXPANSION 1 diff --git a/src/drivers/boards/px4fmu-v4/px4fmu_spi.c b/src/drivers/boards/px4fmu-v4/px4fmu_spi.c index e0c92c1448..bdfa47f62c 100644 --- a/src/drivers/boards/px4fmu-v4/px4fmu_spi.c +++ b/src/drivers/boards/px4fmu-v4/px4fmu_spi.c @@ -101,7 +101,7 @@ __EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, /* SPI select is active low, so write !selected to select the device */ switch (devid) { - case PX4_SPIDEV_GYRO: + case PX4_SPIDEV_ICM: /* Making sure the other peripherals are not selected */ stm32_gpiowrite(GPIO_SPI_CS_MPU9250, 1); stm32_gpiowrite(GPIO_SPI_CS_HMC5983, 1);