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

Fix H7EXTREME #12596

Merged
merged 1 commit into from
Apr 4, 2023
Merged
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
53 changes: 41 additions & 12 deletions src/config/SPRACINGH7EXTREME/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
#define TARGET_BOARD_IDENTIFIER "SP7E"
#define USBD_PRODUCT_STRING "SPRacingH7EXTREME"

#define CONFIG_IN_EXTERNAL_FLASH
#define USE_FIRMWARE_PARTITION

#define FC_VMA_ADDRESS 0x97CE0000

#define EEPROM_SIZE 8192
Expand Down Expand Up @@ -55,12 +58,8 @@
#define QUADSPI1_MODE QUADSPI_MODE_BK1_ONLY
#define QUADSPI1_CS_FLAGS (QUADSPI_BK1_CS_HARDWARE | QUADSPI_BK2_CS_NONE | QUADSPI_CS_MODE_LINKED)

#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD

#define FLASH_QUADSPI_INSTANCE QUADSPI

#define CONFIG_IN_EXTERNAL_FLASH

#define SDCARD_DETECT_PIN PD10
#define SDCARD_DETECT_INVERTED
#define SDIO_DEVICE SDIODEV_1
Expand Down Expand Up @@ -113,12 +112,12 @@
#define USE_ACC_SPI_MPU6500
#define USE_GYRO
#define USE_GYRO_SPI_MPU6500
#define USE_BARO
#define USE_BARO_BMP388
#define USE_MAG_HMC5883
#define USE_MAG_QMC5883
#define USE_FLASH
#define USE_FLASH_W25N01G
#define USE_SDCARD
#define USE_CAMERA_CONTROL
#define USE_MAX7456

Expand Down Expand Up @@ -189,22 +188,52 @@
#define VTX_DATA_PIN PA6
#define VTX_CLK_PIN PA7

//TODO #define MAG_BUSTYPE I2C
#define MAG_I2C_INSTANCE (I2CDEV_1)
#define TIMER_PIN_MAPPING \
TIMER_PIN_MAP( 0, PA8 , 1, 10 ) \
TIMER_PIN_MAP( 1, PB11, 1, 11 ) \
TIMER_PIN_MAP( 2, PB15, 2, -1 ) \
TIMER_PIN_MAP( 3, PE5 , 1, 0 ) \
TIMER_PIN_MAP( 4, PE6 , 1, -1) \
TIMER_PIN_MAP( 5, PA0 , 2, 0 ) \
TIMER_PIN_MAP( 6, PA1 , 2, 1 ) \
TIMER_PIN_MAP( 7, PA2 , 2, 2 ) \
TIMER_PIN_MAP( 8, PA3 , 2, 3 ) \
TIMER_PIN_MAP( 9, PB6 , 2, 4 ) \
TIMER_PIN_MAP(10, PB7 , 2, 5 ) \
TIMER_PIN_MAP(11, PC6 , 2, 6 ) \
TIMER_PIN_MAP(12, PC7 , 2, 7 ) \
TIMER_PIN_MAP(13, PD14, 1, 12 ) \
TIMER_PIN_MAP(14, PD15, 1, -1 ) \
TIMER_PIN_MAP(15, PA6 , 1, 0 ) \
TIMER_PIN_MAP(16, PA7 , 2, 0 ) \
TIMER_PIN_MAP(17, PB0 , 2, 0 ) \
TIMER_PIN_MAP(18, PB1 , 2, 0 )



#define ADC1_DMA_OPT 8
#define ADC3_DMA_OPT 9

#define TIMUP1_DMA_OPT 0
#define TIMUP2_DMA_OPT 0
#define TIMUP3_DMA_OPT 0
#define TIMUP4_DMA_OPT 0
#define TIMUP5_DMA_OPT 0
#define TIMUP8_DMA_OPT 2
#define TIMUP0_DMA_OPT 0

#define USE_BARO
#define BARO_I2C_INSTANCE (I2CDEV_1)
#define MAG_I2C_INSTANCE (I2CDEV_1)
#define MAX7456_SPI_INSTANCE SPI4

#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD

#define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
#define DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_BOTH

#define USE_SPI_GYRO
#define GYRO_1_SPI_INSTANCE SPI3
#define GYRO_1_ALIGN CW180_DEG
#define USE_SPI_GYRO
#define GYRO_2_SPI_INSTANCE SPI2
#define GYRO_2_ALIGN ALIGN_CUSTOM
#define GYRO_2_ALIGN_ROLL 0
#define GYRO_2_ALIGN_PITCH 0
#define GYRO_2_ALIGN_YAW 2250
#define MAX7456_SPI_INSTANCE SPI4