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
44 #define GYRO_INT_EXTI PC3
45 #define USE_MPU_DATA_READY_SIGNAL
48 // *************** I2C/Baro/Mag *********************
50 #define USE_I2C_DEVICE_1
51 #define I2C1_SCL PB6 // SCL pad
52 #define I2C1_SDA PB7 // SDA pad
55 #define BARO_I2C_BUS BUS_I2C1
56 #define USE_BARO_BMP280
57 #define USE_BARO_MS5611
58 #define USE_BARO_BMP085
59 #define USE_BARO_DPS310
62 #define MAG_I2C_BUS BUS_I2C1
63 #define USE_MAG_HMC5883
64 #define USE_MAG_QMC5883
65 #define USE_MAG_IST8310
66 #define USE_MAG_IST8308
67 #define USE_MAG_MAG3110
68 #define USE_MAG_LIS3MDL
70 #define TEMPERATURE_I2C_BUS BUS_I2C1
72 #define PITOT_I2C_BUS BUS_I2C1
74 // *************** SD Card **************************
76 #define USE_SDCARD_SPI
77 #define SDCARD_SPI_BUS BUS_SPI3
78 #define SDCARD_CS_PIN PC1
80 #define USE_SPI_DEVICE_3
81 #define SPI3_SCK_PIN PB3
82 #define SPI3_MISO_PIN PB4
83 #define SPI3_MOSI_PIN PB5
85 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
87 // *************** OSD *****************************
88 #define USE_SPI_DEVICE_2
89 #define SPI2_SCK_PIN PB13
90 #define SPI2_MISO_PIN PB14
91 #define SPI2_MOSI_PIN PB15
95 #define MAX7456_SPI_BUS BUS_SPI2
96 #define MAX7456_CS_PIN PB10
98 // *************** UART *****************************
100 #define VBUS_SENSING_PIN PB12
101 #define VBUS_SENSING_ENABLED
104 #define UART1_RX_PIN PA10
105 #define UART1_TX_PIN PA9
108 #define UART2_RX_PIN PA3
109 #define UART2_TX_PIN PA2
112 #define UART3_RX_PIN PC11
113 #define UART3_TX_PIN PC10
116 #define UART4_RX_PIN PA1
117 #define UART4_TX_PIN PA0
120 #define UART5_RX_PIN PD2
121 #define UART5_TX_PIN PC12
123 #define SERIAL_PORT_COUNT 6
125 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
126 #define SERIALRX_PROVIDER SERIALRX_SBUS
127 #define SERIALRX_UART SERIAL_PORT_USART2
129 // *************** ADC *****************************
131 #define ADC_INSTANCE ADC1
132 #define ADC1_DMA_STREAM DMA2_Stream0
133 #define ADC_CHANNEL_1_PIN PC0
134 #define ADC_CHANNEL_2_PIN PC4
135 #define ADC_CHANNEL_3_PIN PB0
136 #define VBAT_ADC_CHANNEL ADC_CHN_1
137 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
138 #define RSSI_ADC_CHANNEL ADC_CHN_3
140 #define USE_RANGEFINDER
141 #define RANGEFINDER_I2C_BUS BUS_I2C1
143 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD )
145 #define USE_LED_STRIP
146 #define WS2811_PIN PA15 //TIM2_CH1
148 #define USE_SPEKTRUM_BIND
149 #define BIND_PIN PA3 //USART2_RX
151 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
153 #define TARGET_IO_PORTA 0xffff
154 #define TARGET_IO_PORTB 0xffff
155 #define TARGET_IO_PORTC 0xffff
156 #define TARGET_IO_PORTD (BIT(2))
158 #define MAX_PWM_OUTPUT_PORTS 7
160 #define USE_ESC_SENSOR
161 #define USE_SERIALSHOT