2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
23 #define USE_TARGET_CONFIG
25 #define TARGET_BOARD_IDENTIFIER "MBF7"
26 #define USBD_PRODUCT_STRING "MAMBAF722"
28 // ******* LEDs and BEEPER ********
34 #define BEEPER_PIN PB2
35 #define BEEPER_INVERTED
37 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
40 #define PINIO1_PIN PB0 // Bluetooth mode control, PB0 is connected to the 36 pin (P2.0) of the Bluetooth chip. Replace PB0 with the pin for your flight control and 36-pin connection
42 // ******* GYRO and ACC ********
46 #define GYRO_1_EXTI_PIN PC4
47 #define USE_MPU_DATA_READY_SIGNAL
49 #define GYRO_1_CS_PIN PA4
50 #define GYRO_1_SPI_INSTANCE SPI1
53 #define USE_GYRO_SPI_MPU6000
54 #define GYRO_1_ALIGN CW180_DEG
57 #define USE_ACC_SPI_MPU6000
59 // ******* SERIAL ********
69 #define UART1_TX_PIN PB6
70 #define UART1_RX_PIN PB7
72 #define UART2_TX_PIN PA2
73 #define UART2_RX_PIN PA3
75 #define UART3_TX_PIN PB10
76 #define UART3_RX_PIN PB11
78 #define UART4_TX_PIN PA0
79 #define UART4_RX_PIN PA1
81 #define UART5_TX_PIN PC12
82 #define UART5_RX_PIN PD2
84 #define UART6_TX_PIN PC6
85 #define UART6_RX_PIN PC7
87 #define USE_SOFTSERIAL1
88 #define USE_SOFTSERIAL2
90 #define SERIAL_PORT_COUNT 9 //VCP, UART1-UART6 , 2 x Soft Serial
92 // ******* SPI ********
96 #define USE_SPI_DEVICE_1
97 #define SPI1_NSS_PIN PA4
98 #define SPI1_SCK_PIN PA5
99 #define SPI1_MISO_PIN PA6
100 #define SPI1_MOSI_PIN PA7
102 #define USE_SPI_DEVICE_2
103 #define SPI2_NSS_PIN PB12
104 #define SPI2_SCK_PIN PB13
105 #define SPI2_MISO_PIN PB14
106 #define SPI2_MOSI_PIN PB15
108 #define USE_SPI_DEVICE_3
109 #define SPI3_NSS_PIN PA15
110 #define SPI3_SCK_PIN PC10
111 #define SPI3_MISO_PIN PC11
112 #define SPI3_MOSI_PIN PB5
114 // ******* ADC ********
117 #define ADC_INSTANCE ADC3
118 #define ADC3_DMA_OPT 1
120 #define VBAT_ADC_PIN PC1
121 #define RSSI_ADC_PIN PC2
122 #define CURRENT_METER_ADC_PIN PC3
124 // ******* OSD ********
127 #define MAX7456_SPI_INSTANCE SPI2
128 #define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
130 //******* FLASH ********
133 #define USE_FLASH_M25P16
134 #define FLASH_CS_PIN SPI3_NSS_PIN
135 #define FLASH_SPI_INSTANCE SPI3
137 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
139 // ******* FEATURES ********
143 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
144 #define SERIALRX_UART SERIAL_PORT_USART1
145 #define SERIALRX_PROVIDER SERIALRX_SBUS
147 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL)
148 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
149 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
151 #define USE_ESCSERIAL
152 #define ESCSERIAL_TIMER_TX_PIN PB9
154 #define TARGET_IO_PORTA 0xffff
155 #define TARGET_IO_PORTB 0xffff
156 #define TARGET_IO_PORTC 0xffff
157 #define TARGET_IO_PORTD (BIT(2))
159 #define USABLE_TIMER_CHANNEL_COUNT 7
160 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(4) | TIM_N(8) | TIM_N(11) )