Skip to content

Commit

Permalink
[Target] BETAFPVF722 add ICM42688P; fix Timers (#905)
Browse files Browse the repository at this point in the history
BETAFPVF722 add ICM42688P; fix Timers

Co-authored-by: BeauBrewski <[email protected]>
  • Loading branch information
nerdCopter and BeauBrewski authored Aug 23, 2023
1 parent 11d38e5 commit 9d04851
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
4 changes: 1 addition & 3 deletions src/main/target/BETAFPVF722/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@

const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
// FILO arrangement for motor assignments, Motor 1 starts at 2nd DECLARATION
DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 0), // USE FOR CAMERA CONTROL


DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // D1-ST0 MOTOR1
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // D1-ST3 MOTOR2
DEF_TIM(TIM2, CH2, PA1, TIM_USE_MOTOR, 0, 0), // D1-ST7 MOTOR3
Expand All @@ -38,5 +37,4 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // NONE TIM4_UP_D1-ST6 MOTOR6

DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // D1-ST2 LED/MOTOR5

};
17 changes: 14 additions & 3 deletions src/main/target/BETAFPVF722/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define BEEPER_INVERTED

//define camera control
#define CAMERA_CONTROL_PIN PC8
// N/A

//MPU-6000
#define USE_GYRO
Expand All @@ -49,6 +49,16 @@
#define GYRO_MPU6000_ALIGN CW180_DEG
#define ACC_MPU6000_ALIGN CW180_DEG


// 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


// OSD
#define USE_MAX7456
#define MAX7456_SPI_INSTANCE SPI3
Expand Down Expand Up @@ -120,6 +130,7 @@
#define VBAT_ADC_PIN PC0
#define RSSI_ADC_PIN PC2
#define CURRENT_METER_SCALE_DEFAULT 450 // 3.3/120A = 25mv/A
#define USE_SERIAL_4WAY_BLHELI_INTERFACE

// SPI devices
#define USE_SPI
Expand Down Expand Up @@ -154,5 +165,5 @@
#define TARGET_IO_PORTD (BIT(2))

// timers
#define USABLE_TIMER_CHANNEL_COUNT 8
#define USED_TIMERS ( TIM_N(1) |TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) )
#define USABLE_TIMER_CHANNEL_COUNT 7
#define USED_TIMERS ( TIM_N(1) |TIM_N(2) | TIM_N(3) | TIM_N(4) )
1 change: 1 addition & 0 deletions src/main/target/BETAFPVF722/target.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ FEATURES = VCP ONBOARDFLASH
TARGET_SRC = \
drivers/accgyro/accgyro_spi_mpu6000.c \
drivers/accgyro/accgyro_mpu.c \
drivers/accgyro/accgyro_spi_icm426xx.c \
drivers/barometer/barometer_bmp280.c \
drivers/barometer/barometer_ms5611.c \
drivers/compass/compass_hmc5883l.c \
Expand Down

0 comments on commit 9d04851

Please sign in to comment.