Skip to content

Commit

Permalink
[target] BETAFPVF722 update dual gyro, add BMI270, ICM42688P, add ADC…
Browse files Browse the repository at this point in the history
…1_DMA (emuflight#1011)
  • Loading branch information
nerdCopter committed Apr 17, 2024
1 parent a4a34ba commit 5cd12c8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 15 deletions.
40 changes: 25 additions & 15 deletions src/main/target/BETAFPVF722/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
*/

#pragma once
#define TARGET_BOARD_IDENTIFIER "S7X2"
#define USBD_PRODUCT_STRING "BETAFPVF722"
#define TARGET_MANUFACTURER_IDENTIFIER "BEFH"

#define BOARD_NAME BETAFPVF722
#define MANUFACTURER_ID BEFH
#define TARGET_BOARD_IDENTIFIER "S7X2" // generic ID
#define FC_TARGET_MCU STM32F7X2 // not used in EmuF

#define ENABLE_DSHOT_DMAR true

Expand All @@ -40,23 +42,29 @@
#define USE_ACC
#define USE_ACC_SPI_MPU6000
#define USE_GYRO_SPI_MPU6000
#define USE_GYRO_SPI_ICM42688P
#define USE_ACC_SPI_ICM42688P
#define USE_ACCGYRO_BMI270

#define USE_SPI_GYRO
#define USE_EXTI
#define USE_GYRO_EXTI

#define USE_MPU_DATA_READY_SIGNAL

#define MPU_INT_EXTI PC4 //MPU_INT_EXTI
#define MPU6000_CS_PIN PA4 //GYRO_1_CS_PIN
#define MPU6000_SPI_INSTANCE SPI1 //GYRO_1_SPI_INSTANCE
#define GYRO_MPU6000_ALIGN CW180_DEG
#define ACC_MPU6000_ALIGN CW180_DEG
#define ACC_1_ALIGN CW180_DEG
#define GYRO_1_ALIGN CW180_DEG
#define GYRO_1_CS_PIN PA4
#define GYRO_1_EXTI_PIN PC4
#define GYRO_1_SPI_INSTANCE SPI1

#define USE_DUAL_GYRO

// ICM42688P
#define USE_GYRO_SPI_ICM42688P
#define USE_ACC_SPI_ICM42688P
#define ICM42688P_CS_PIN PA4
#define ICM42688P_SPI_INSTANCE SPI1
#define GYRO_ICM42688P_ALIGN CW180_DEG
#define ACC_ICM42688P_ALIGN CW180_DEG
#define ACC_2_ALIGN CW180_DEG
#define GYRO_2_ALIGN CW180_DEG
#define GYRO_2_CS_PIN PC3
#define GYRO_2_EXTI_PIN PB2
#define GYRO_2_SPI_INSTANCE SPI1


// OSD
Expand Down Expand Up @@ -130,6 +138,8 @@
#define VBAT_ADC_PIN PC0
#define RSSI_ADC_PIN PC2
#define CURRENT_METER_SCALE_DEFAULT 450 // 3.3/120A = 25mv/A
#define ADC1_DMA_OPT 0
#define ADC1_DMA_STREAM DMA2_Stream0 //# ADC 1: DMA2 Stream 0 Channel 0
#define USE_SERIAL_4WAY_BLHELI_INTERFACE

// SPI devices
Expand Down
1 change: 1 addition & 0 deletions src/main/target/BETAFPVF722/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ TARGET_SRC = \
drivers/accgyro/accgyro_spi_mpu6000.c \
drivers/accgyro/accgyro_mpu.c \
drivers/accgyro/accgyro_spi_icm426xx.c \
drivers/accgyro/accgyro_spi_bmi270.c \
drivers/barometer/barometer_bmp280.c \
drivers/barometer/barometer_ms5611.c \
drivers/compass/compass_hmc5883l.c \
Expand Down

0 comments on commit 5cd12c8

Please sign in to comment.