2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
20 #define TARGET_BOARD_IDENTIFIER "MKF7"
22 #define USBD_PRODUCT_STRING "MATEKF722"
28 #define BEEPER_INVERTED
30 // *************** Gyro & ACC **********************
32 #define USE_SPI_DEVICE_1
34 #define SPI1_SCK_PIN PA5
35 #define SPI1_MISO_PIN PA6
36 #define SPI1_MOSI_PIN PA7
38 #define USE_IMU_MPU6500
39 #define IMU_MPU6500_ALIGN CW180_DEG
40 #define MPU6500_CS_PIN PC2
41 #define MPU6500_SPI_BUS BUS_SPI1
43 // *************** I2C/Baro/Mag *********************
45 #define USE_I2C_DEVICE_1
46 #define I2C1_SCL PB6 // SCL pad
47 #define I2C1_SDA PB7 // SDA pad
50 #define BARO_I2C_BUS BUS_I2C1
51 #define USE_BARO_BMP280
52 #define USE_BARO_MS5611
53 #define USE_BARO_BMP085
54 #define USE_BARO_DPS310
55 #define USE_BARO_SPL06
58 #define MAG_I2C_BUS BUS_I2C1
61 #define TEMPERATURE_I2C_BUS BUS_I2C1
63 #define PITOT_I2C_BUS BUS_I2C1
65 // *************** SD Card **************************
67 #define USE_SDCARD_SPI
68 #define SDCARD_SPI_BUS BUS_SPI3
69 #define SDCARD_CS_PIN PC1
71 #define USE_SPI_DEVICE_3
72 #define SPI3_SCK_PIN PB3
73 #define SPI3_MISO_PIN PB4
74 #define SPI3_MOSI_PIN PB5
76 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
78 // *************** OSD *****************************
79 #define USE_SPI_DEVICE_2
80 #define SPI2_SCK_PIN PB13
81 #define SPI2_MISO_PIN PB14
82 #define SPI2_MOSI_PIN PB15
85 #define MAX7456_SPI_BUS BUS_SPI2
86 #define MAX7456_CS_PIN PB10
88 // *************** UART *****************************
90 #define VBUS_SENSING_PIN PB12
91 #define VBUS_SENSING_ENABLED
94 #define UART1_RX_PIN PA10
95 #define UART1_TX_PIN PA9
98 #define UART2_RX_PIN PA3
99 #define UART2_TX_PIN PA2
102 #define UART3_RX_PIN PC11
103 #define UART3_TX_PIN PC10
106 #define UART4_RX_PIN PA1
107 #define UART4_TX_PIN PA0
110 #define UART5_RX_PIN PD2
111 #define UART5_TX_PIN PC12
113 #define SERIAL_PORT_COUNT 6
115 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
116 #define SERIALRX_PROVIDER SERIALRX_SBUS
117 #define SERIALRX_UART SERIAL_PORT_USART2
119 // *************** ADC *****************************
121 #define ADC_INSTANCE ADC1
122 #define ADC1_DMA_STREAM DMA2_Stream0
123 #define ADC_CHANNEL_1_PIN PC0
124 #define ADC_CHANNEL_2_PIN PC4
125 #define ADC_CHANNEL_3_PIN PB0
126 #define VBAT_ADC_CHANNEL ADC_CHN_1
127 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
128 #define RSSI_ADC_CHANNEL ADC_CHN_3
130 #define USE_RANGEFINDER
131 #define RANGEFINDER_I2C_BUS BUS_I2C1
133 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD )
135 #define USE_LED_STRIP
136 #define WS2811_PIN PA15 //TIM2_CH1
138 #define USE_SPEKTRUM_BIND
139 #define BIND_PIN PA3 //USART2_RX
141 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
143 #define TARGET_IO_PORTA 0xffff
144 #define TARGET_IO_PORTB 0xffff
145 #define TARGET_IO_PORTC 0xffff
146 #define TARGET_IO_PORTD (BIT(2))
148 #define MAX_PWM_OUTPUT_PORTS 7
150 #define USE_ESC_SENSOR