Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BMI270 driver #19622

Merged
merged 3 commits into from
Dec 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions Tools/scripts/decode_devid.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ def num(s):
0x35 : "DEVTYPE_INS_ICM42605",
0x36 : "DEVTYPE_INS_ICM40605",
0x37 : "DEVTYPE_INS_IIM42652",
0x38 : "DEVTYPE_INS_BMI270",
}

baro_types = {
Expand Down
12 changes: 8 additions & 4 deletions libraries/AP_HAL_ChibiOS/hwdef/BeastF7/hwdef.dat
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ PA12 OTG_FS_DP OTG1
PA13 JTMS-SWDIO SWD
PA14 JTCK-SWCLK SWD

# SPI1 for MPU6000
PA4 MPU6000_CS CS
# SPI1 for BMI270
PA4 BMI270_CS CS
PA5 SPI1_SCK SPI1
PA6 SPI1_MISO SPI1
PA7 SPI1_MOSI SPI1
Expand Down Expand Up @@ -112,7 +112,8 @@ STORAGE_FLASH_PAGE 1
define HAL_LOGGING_DATAFLASH_ENABLED 1

# spi devices
SPIDEV mpu6000 SPI1 DEVID1 MPU6000_CS MODE3 1*MHZ 4*MHZ
SPIDEV mpu6000 SPI1 DEVID1 BMI270_CS MODE3 1*MHZ 4*MHZ
SPIDEV bmi270 SPI1 DEVID1 BMI270_CS MODE3 10*MHZ 10*MHZ
SPIDEV dataflash SPI3 DEVID2 FLASH_CS MODE3 32*MHZ 32*MHZ
SPIDEV osd SPI4 DEVID4 AT7456E_CS MODE0 10*MHZ 10*MHZ

Expand All @@ -121,12 +122,15 @@ define ALLOW_ARM_NO_COMPASS
define HAL_COMPASS_DEFAULT HAL_COMPASS_NONE
define HAL_I2C_INTERNAL_MASK 0

# one IMU
# one IMU, v1 mpu6000 and v2 bmi270
IMU Invensense SPI:mpu6000 ROTATION_YAW_270
IMU BMI270 SPI:bmi270 ROTATION_ROLL_180_YAW_225
define HAL_DEFAULT_INS_FAST_SAMPLE 1

# one BARO
BARO BMP280 I2C:0:0x76
# v2 has no BARO
define HAL_BARO_ALLOW_INIT_NO_BARO 1

# setup for OSD
define OSD_ENABLED 1
Expand Down
1 change: 1 addition & 0 deletions libraries/AP_InertialSensor/AP_InertialSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "AP_InertialSensor.h"
#include "AP_InertialSensor_BMI160.h"
#include "AP_InertialSensor_BMI270.h"
#include "AP_InertialSensor_Backend.h"
#include "AP_InertialSensor_L3G4200D.h"
#include "AP_InertialSensor_LSM9DS0.h"
Expand Down