# Betaflight / AT32F435 (A435) 4.3.2 July 8 2023 / 07:30:19 (60c9521) MSP API: 1.44

#define USE_GYRO
#define USE_GYRO_SPI_MPU6000
#define USE_ACC
#define USE_ACC_SPI_MPU6000
#define USE_ACCGYRO_BMI270
#define USE_GYRO_SPI_ICM42688P
#define USE_ACC_SPI_ICM42688P
#define USE_BARO
#define USE_BARO_DPS310
#define USE_BARO_BMP280
#define USE_FLASH
#define USE_FLASH_W25Q128FV
#define USE_MAX7456

board_name MAMBAF435_2023A
manufacturer_id DIAT

# resources
resource BEEPER 1 B11

resource MOTOR 1 C09
resource MOTOR 2 C08
resource MOTOR 3 C07
resource MOTOR 4 C06

resource MOTOR 5 A00
resource MOTOR 6 A01
resource MOTOR 7 A02
resource MOTOR 8 A03





resource SERVO 1 A09
resource SERVO 2 A10
resource LED_STRIP 1 A06
resource CAMERA_CONTROL 1 B01

resource PINIO 1 C03
resource PINIO 2 A07

resource SERIAL_TX 1 B06
resource SERIAL_TX 2 A08
resource SERIAL_TX 3 C04
resource SERIAL_TX 4 C10
resource SERIAL_TX 5 C12
resource SERIAL_TX 6 A04

resource SERIAL_RX 1 B07
resource SERIAL_RX 2 B00
resource SERIAL_RX 3 C05
resource SERIAL_RX 4 C11
resource SERIAL_RX 5 D02
resource SERIAL_RX 6 A05

resource I2C_SCL 1 B08
resource I2C_SDA 1 B09
resource LED 1 C14
resource LED 2 C15

resource SPI_SCK 1 B03
resource SPI_SCK 2 B13

resource SPI_MISO  1 B04
resource SPI_MISO  2 B14

resource SPI_MOSI  1 B05
resource SPI_MOSI  2 B15

resource INVERTER 1 C00
resource ADC_BATT 1 C01
resource ADC_CURR 1 C02

resource FLASH_CS  1 B10
resource OSD_CS    1 B12
resource GYRO_CS   1 C13
resource GYRO_EXTI 1 A15

# timer
timer A00 AF1
# pin A00: TIM2 CH1 (AF1)
timer A01 AF1
# pin A01: TIM2 CH2 (AF1)
timer A02 AF1
# pin A02: TIM2 CH3 (AF1)
timer A03 AF1
# pin A03: TIM2 CH4 (AF1)

timer C06 AF2
# pin C06: TIM8 CH1 (AF3)
timer C07 AF2
# pin C07: TIM3 CH2 (AF2)
timer C08 AF2
# pin C08: TIM3 CH3 (AF2)
timer C09 AF3
# pin C09: TIM8 CH4 (AF3)

timer A09 AF1
# pin A09: TIM1 CH2 (AF1)
timer A10 AF1
# pin A10: TIM1 CH3 (AF1)

timer A06 AF2
# pin A06: TIM3 CH1 (AF2)
timer B01 AF2
# pin B01: TIM3 CH4 (AF2)


# dma
dma ADC 1 11
# ADC 1: DMA2 Channel 0 Channel 5


dma pin A00 10 
# pin A00: DMA2 Channel 0 Channel 72
dma pin A01 8
# pin A01: DMA2 Channel 0 Channel 73
dma pin A02 9
# pin A02: DMA1 Channel 0 Channel 59 
dma pin A03 11
# pin A03: DMA1 Channel 0 Channel 59

dma pin C06 0
# pin C06: DMA1 Channel 0 Channel 61
dma pin C07 2
# pin C07: DMA1 Channel 0 Channel 62
dma pin C08 1
# pin C08: DMA1 Channel 0 Channel 51
dma pin C09 3
# pin C09: DMA1 Channel 0 Channel 52

dma pin A09 12
# pin A09: DMA1 Channel 0 Channel 52
dma pin A10 7
# pin A10: DMA2 Channel 0 Channel 67 
dma pin A06 6
# pin A06: DMA1 Channel 0 Channel 52
dma pin B01 13
# pin B01: DMA2 Channel 0 Channel 67 




# serial
serial 20 1 115200 57600 0 115200
serial 1 64 115200 57600 0 115200


# master
set beeper_inversion = ON
set beeper_od = OFF
set baro_bustype = I2C
set baro_i2c_device = 1
set mag_bustype = I2C
set mag_i2c_device = 1
set adc_device = 3
set blackbox_device = SPIFLASH
set current_meter = ADC
set battery_meter = ADC
set dshot_burst = AUTO
set ibata_scale = 100
set max7456_spi_bus = 2
set flash_spi_bus = 2
set gyro_1_bustype = SPI
set gyro_1_spibus = 1
set gyro_1_sensor_align = CW90
set gyro_1_align_yaw = 900