Add support for ICM42688P IMU on mamba f405 mk2 v2 target (#25047)

Co-authored-by: Ramon Roche <mrpollo@gmail.com>
This commit is contained in:
Davide Iafrate 2025-06-29 23:46:41 +02:00 committed by GitHub
parent 2bc04f91f8
commit 650320281b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 4 deletions

View File

@ -14,6 +14,7 @@ CONFIG_DRIVERS_GPS=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM20602=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU6000=y
CONFIG_DRIVERS_IMU_INVENSENSE_MPU9250=y
CONFIG_DRIVERS_IMU_INVENSENSE_ICM42688P=y
CONFIG_DRIVERS_MAGNETOMETER_AKM_AK8963=y
CONFIG_DRIVERS_MAGNETOMETER_HMC5883=y
CONFIG_DRIVERS_PWM_OUT=y

View File

@ -5,14 +5,16 @@
board_adc start
if ! mpu6000 -R 6 -s start
then
if ! mpu6000 -R 6 -s start; then
# some boards such as the Hobbywing XRotor F4 G2 use the ICM-20602
icm20602 -s -R 6 start
if ! icm20602 -s -R 6 start; then
# The ICM-42688-P is used on the Diatone Mamba F405 MK2 v2
icm42688p -s -R 4 start
fi
fi
if ! hmc5883 -T -X start
then
then
if mpu9250_i2c -X -b 2 -a 0x68 -R 28 start; then
sleep 1 # wait for mpu9250 to be configured with bypass enabled
ak8963 -X -b 2 -R 30 start # -R 34

View File

@ -39,6 +39,7 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(SPI::Bus::SPI1, {
initSPIDevice(DRV_IMU_DEVTYPE_MPU6000, SPI::CS{GPIO::PortA, GPIO::Pin4}),
initSPIDevice(DRV_IMU_DEVTYPE_ICM20602, SPI::CS{GPIO::PortA, GPIO::Pin4}),
initSPIDevice(DRV_IMU_DEVTYPE_ICM42688P, SPI::CS{GPIO::PortA, GPIO::Pin4}),
}),
initSPIBus(SPI::Bus::SPI2, {
initSPIDevice(DRV_OSD_DEVTYPE_ATXXXX, SPI::CS{GPIO::PortB, GPIO::Pin12}),