From 7c47991504c9e5b17b0c25dcd1fab0cf50666407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Tue, 31 Jan 2017 09:16:48 +0100 Subject: [PATCH] px4fmu-v4 board config: use PX4_SPIDEV_ICM_20608 instead of PX4_SPIDEV_ICM_20602 This is what's used according to https://pixhawk.org/modules/pixracer. --- src/drivers/boards/px4fmu-v4/board_config.h | 2 +- src/drivers/boards/px4fmu-v4/px4fmu_spi.c | 2 +- src/drivers/mpu6000/mpu6000.cpp | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/drivers/boards/px4fmu-v4/board_config.h b/src/drivers/boards/px4fmu-v4/board_config.h index fde9eb7dae..80490b5565 100644 --- a/src/drivers/boards/px4fmu-v4/board_config.h +++ b/src/drivers/boards/px4fmu-v4/board_config.h @@ -130,7 +130,7 @@ #define PX4_SPIDEV_LIS 7 #define PX4_SPIDEV_BMI 8 #define PX4_SPIDEV_BMA 9 -#define PX4_SPIDEV_ICM_20602 10 +#define PX4_SPIDEV_ICM_20608 10 /* onboard MS5611 and FRAM are both on bus SPI2 * spi_dev_e:SPIDEV_FLASH has the value 2 and is used in the NuttX ramtron driver diff --git a/src/drivers/boards/px4fmu-v4/px4fmu_spi.c b/src/drivers/boards/px4fmu-v4/px4fmu_spi.c index 71ec895592..b67ed1a712 100644 --- a/src/drivers/boards/px4fmu-v4/px4fmu_spi.c +++ b/src/drivers/boards/px4fmu-v4/px4fmu_spi.c @@ -97,7 +97,7 @@ __EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, case PX4_SPIDEV_ICM: /* intended fallthrough */ - case PX4_SPIDEV_ICM_20602: + case PX4_SPIDEV_ICM_20608: /* Making sure the other peripherals are not selected */ px4_arch_gpiowrite(GPIO_SPI_CS_BMI160, 1); px4_arch_gpiowrite(GPIO_SPI_CS_MPU9250, 1); diff --git a/src/drivers/mpu6000/mpu6000.cpp b/src/drivers/mpu6000/mpu6000.cpp index 474c6d0460..40dbe8098f 100644 --- a/src/drivers/mpu6000/mpu6000.cpp +++ b/src/drivers/mpu6000/mpu6000.cpp @@ -2277,6 +2277,9 @@ struct mpu6000_bus_option { #ifdef PX4_SPIDEV_ICM_20602 { MPU6000_BUS_SPI_INTERNAL1, ICM20602_DEVICE_PATH_ACCEL, ICM20602_DEVICE_PATH_GYRO, &MPU6000_SPI_interface, PX4_SPI_BUS_SENSORS, false, NULL }, #endif +#ifdef PX4_SPIDEV_ICM_20608 + { MPU6000_BUS_SPI_INTERNAL1, ICM20608_DEVICE_PATH_ACCEL, ICM20608_DEVICE_PATH_GYRO, &MPU6000_SPI_interface, PX4_SPI_BUS_SENSORS, false, NULL }, +#endif #ifdef PX4_SPIDEV_ICM_20689 { MPU6000_BUS_SPI_INTERNAL2, ICM20689_DEVICE_PATH_ACCEL, ICM20689_DEVICE_PATH_GYRO, &MPU6000_SPI_interface, PX4_SPI_BUS_SENSORS, false, NULL }, #endif