Skip to content

Commit 6503202

Browse files
Tuxlirimrpollo
andauthored
Add support for ICM42688P IMU on mamba f405 mk2 v2 target (#25047)
Co-authored-by: Ramon Roche <[email protected]>
1 parent 2bc04f9 commit 6503202

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

boards/diatone/mamba-f405-mk2/default.px4board

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ CONFIG_DRIVERS_GPS=y
1414
CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
1515
CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
1616
CONFIG_DRIVERS_IMU_INVENSENSE_MPU9250=y
17+
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
1718
CONFIG_DRIVERS_MAGNETOMETER_AKM_AK8963=y
1819
CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
1920
CONFIG_DRIVERS_PWM_OUT=y

boards/diatone/mamba-f405-mk2/init/rc.board_sensors

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55

66
board_adc start
77

8-
if ! mpu6000 -R 6 -s start
9-
then
8+
if ! mpu6000 -R 6 -s start; then
109
# some boards such as the Hobbywing XRotor F4 G2 use the ICM-20602
11-
icm20602 -s -R 6 start
10+
if ! icm20602 -s -R 6 start; then
11+
# The ICM-42688-P is used on the Diatone Mamba F405 MK2 v2
12+
icm42688p -s -R 4 start
13+
fi
1214
fi
1315

1416
if ! hmc5883 -T -X start
15-
then
17+
then
1618
if mpu9250_i2c -X -b 2 -a 0x68 -R 28 start; then
1719
sleep 1 # wait for mpu9250 to be configured with bypass enabled
1820
ak8963 -X -b 2 -R 30 start # -R 34

boards/diatone/mamba-f405-mk2/src/spi.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
3939
initSPIBus(SPI::Bus::SPI1, {
4040
initSPIDevice(DRV_IMU_DEVTYPE_MPU6000, SPI::CS{GPIO::PortA, GPIO::Pin4}),
4141
initSPIDevice(DRV_IMU_DEVTYPE_ICM20602, SPI::CS{GPIO::PortA, GPIO::Pin4}),
42+
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin4}),
4243
}),
4344
initSPIBus(SPI::Bus::SPI2, {
4445
initSPIDevice(DRV_OSD_DEVTYPE_ATXXXX, SPI::CS{GPIO::PortB, GPIO::Pin12}),

0 commit comments

Comments
 (0)