Fix F411 PA10 Motor DMA Assignment (#12561)
[betaflight.git] / src / config / EMAX_BABYHAWK_II_HD / config.h
blobd2799b03db41fda807dcfe397ad8ae8dd0e0f948
1 /*
2 * This file is part of Betaflight.
4 * Betaflight is free software. You can redistribute this software
5 * and/or modify this software under the terms of the GNU General
6 * Public License as published by the Free Software Foundation,
7 * either version 3 of the License, or (at your option) any later
8 * version.
10 * Betaflight is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this software.
19 * If not, see <http://www.gnu.org/licenses/>.
22 #pragma once
24 #define FC_TARGET_MCU STM32F411
26 #define BOARD_NAME EMAX_BABYHAWK_II_HD
27 #define MANUFACTURER_ID EMAX
29 #define USE_GYRO
30 #define USE_GYRO_SPI_MPU6000
31 #define USE_ACC
32 #define USE_ACC_SPI_MPU6000
33 #define USE_ACCGYRO_BMI270
34 #define USE_GYRO_SPI_ICM20689
35 #define USE_ACC_SPI_ICM20689
36 #define USE_ACC_SPI_ICM42688P
37 #define USE_GYRO_SPI_ICM42688P
38 #define USE_FLASH
39 #define USE_FLASH_M25P16
40 #define USE_FLASH_W25M512
41 #define USE_MAX7456
43 #define BEEPER_PIN PC14
44 #define MOTOR1_PIN PA8
45 #define MOTOR2_PIN PA9
46 #define MOTOR3_PIN PA10
47 #define MOTOR4_PIN PB0
48 #define MOTOR5_PIN PB4
49 #define RX_PPM_PIN PA3
50 #define RX_PWM1_PIN PA2
51 #define RX_PWM2_PIN PA9
52 #define RX_PWM3_PIN PA10
53 #define LED_STRIP_PIN PA15
54 #define UART1_TX_PIN PB6
55 #define UART2_TX_PIN PA2
56 #define UART1_RX_PIN PB7
57 #define UART2_RX_PIN PA3
58 #define LED0_PIN PC13
59 #define SPI1_SCK_PIN PA5
60 #define SPI2_SCK_PIN PB13
61 #define SPI1_SDI_PIN PA6
62 #define SPI2_SDI_PIN PB14
63 #define SPI1_SDO_PIN PA7
64 #define SPI2_SDO_PIN PB15
65 #define CAMERA_CONTROL_PIN PB10
66 #define ADC_VBAT_PIN PA0
67 #define ADC_RSSI_PIN PB1
68 #define ADC_CURR_PIN PA1
69 #define PINIO1_PIN PB5
70 #define FLASH_CS_PIN PB2
71 #define MAX7456_SPI_CS_PIN PB12
72 #define GYRO_1_EXTI_PIN PB3
73 #define GYRO_1_CS_PIN PA4
74 #define USB_DETECT_PIN PC15
76 #define TIMER_PIN_MAPPING \
77 TIMER_PIN_MAP( 0, PA2 , 3, -1) \
78 TIMER_PIN_MAP( 1, PA8 , 1, 1) \
79 TIMER_PIN_MAP( 2, PA9 , 1, 1) \
80 TIMER_PIN_MAP( 3, PA10, 1, 1) \
81 TIMER_PIN_MAP( 4, PB0 , 2, 0) \
82 TIMER_PIN_MAP( 5, PB4 , 1, 0) \
83 TIMER_PIN_MAP( 6, PB1 , 2, 0) \
84 TIMER_PIN_MAP( 7, PA3 , 2, 1) \
85 TIMER_PIN_MAP( 8, PB10, 1, 0) \
86 TIMER_PIN_MAP( 9, PA15, 1, 0) \
87 TIMER_PIN_MAP(10, PB6 , 1, 0) \
88 TIMER_PIN_MAP(11, PB7 , 1, 0) \
89 TIMER_PIN_MAP(12, PB8 , 1, 0) \
90 TIMER_PIN_MAP(13, PA0 , 2, 0)
94 #define ADC1_DMA_OPT 0
96 #define DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_1
98 //TODO #define SERIALRX_INVERTED OFF
99 #define USE_ADC
100 #define ADC_INSTANCE ADC1
101 #define DEFAULT_DSHOT_BURST DSHOT_DMAR_AUTO
102 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
103 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
104 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
105 #define DEFAULT_CURRENT_METER_SCALE 179
106 #define BEEPER_INVERTED
107 #define SYSTEM_HSE_MHZ 8
108 //TODO #define MAX7456_CLOCK DEFAULT
109 #define MAX7456_SPI_INSTANCE SPI2
110 //TODO #define USB_MSC_PIN_PULLUP ON
111 #define FLASH_SPI_INSTANCE SPI2
112 #define USE_SPI_GYRO
113 #define GYRO_1_SPI_INSTANCE SPI1
114 #define GYRO_1_ALIGN CW180_DEG
115 #define USE_SPI_GYRO
116 #define GYRO_2_SPI_INSTANCE SPI1
117 #define GYRO_2_ALIGN CW0_DEG