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/>.
21 #define TARGET_BOARD_IDENTIFIER "ZEF7V3"
22 #define USBD_PRODUCT_STRING "ZEEZF7V3"
25 #define TARGET_BOARD_IDENTIFIER "ZEF7V2"
26 #define USBD_PRODUCT_STRING "ZEEZF7V2"
29 #define TARGET_BOARD_IDENTIFIER "ZEF7"
30 #define USBD_PRODUCT_STRING "ZEEZF7"
33 #define USE_TARGET_CONFIG
40 #define BEEPER_INVERTED
43 #define BEEPER_INVERTED
46 // *************** Gyro & ACC **********************
51 #define USE_SPI_DEVICE_3
53 #define SPI3_NSS_PIN PA15
54 #define SPI3_SCK_PIN PC10
55 #define SPI3_MISO_PIN PC11
56 #define SPI3_MOSI_PIN PB5
58 // *************** SPI3 IMU0 ICM42688P **************
59 #define USE_IMU_ICM42605
61 #define IMU_ICM42605_ALIGN CW0_DEG
62 #define ICM42605_SPI_BUS BUS_SPI3
63 #define ICM42605_CS_PIN SPI3_NSS_PIN
65 // *************** SPI3 IMU0 BMI270 **************
66 #define USE_IMU_BMI270
68 #define IMU_BMI270_ALIGN CW270_DEG
69 #define BMI270_SPI_BUS BUS_SPI3
70 #define BMI270_CS_PIN SPI3_NSS_PIN
74 #define USE_SPI_DEVICE_1
75 #define SPI1_NSS_PIN PA4
76 #define SPI1_SCK_PIN PA5
77 #define SPI1_MISO_PIN PA6
78 #define SPI1_MOSI_PIN PA7
80 #define MPU6000_CS_PIN SPI1_NSS_PIN
81 #define MPU6000_SPI_BUS BUS_SPI1
82 #define IMU_MPU6000_ALIGN CW0_DEG
83 #define USE_IMU_MPU6000
88 #define USE_SPI_DEVICE_2
89 #define SPI2_NSS_PIN PB12
90 #define SPI2_SCK_PIN PB13
91 #define SPI2_MISO_PIN PB14
92 #define SPI2_MOSI_PIN PB15
94 #define MPU6000_CS_PIN SPI2_NSS_PIN
95 #define MPU6000_SPI_BUS BUS_SPI2
97 #define IMU_MPU6000_ALIGN CW0_DEG_FLIP
98 #define USE_IMU_MPU6000
101 // *************** I2C/Baro/Mag *********************
104 // Target has no I2C but can use MSP devices, such as those provided on Mateksys MQ8-CAN/MSP
105 // Which contains: GPS SAM-M8Q, Compass QMC5883L, Barometer DPS310
106 // See: http://www.mateksys.com/?portfolio=m8q-can
108 #define USE_BARO_DPS310
115 #if defined ZEEZF7V2 || defined ZEEZF7V3
118 #define USE_BARO_BMP280
119 #define USE_BARO_BMP388
120 #define USE_BARO_DPS310
122 #define BARO_I2C_BUS BUS_I2C1
124 #define USE_I2C_DEVICE_1
128 // External I2C Pads -- I2C3
129 #define USE_I2C_DEVICE_3
134 #define MAG_I2C_BUS BUS_I2C3
138 // *************** Flash ****************************
140 #if defined ZEEZF7V2 || defined ZEEZF7V3
141 #define USE_SPI_DEVICE_2
142 #define SPI2_NSS_PIN PB12
143 #define SPI2_SCK_PIN PB13
144 #define SPI2_MISO_PIN PC2
145 #define SPI2_MOSI_PIN PC3
147 #define M25P16_SPI_BUS BUS_SPI2
148 #define M25P16_CS_PIN SPI2_NSS_PIN
150 #define W25N01G_SPI_BUS BUS_SPI2
151 #define W25N01G_CS_PIN SPI2_NSS_PIN
153 #define SDCARD_SPI_BUS BUS_SPI2
154 #define SDCARD_CS_PIN SPI2_NSS_PIN
157 #define USE_SDCARD_SPI
163 #define USE_SPI_DEVICE_1
164 #define SPI1_NSS_PIN PA4
165 #define SPI1_SCK_PIN PA5
166 #define SPI1_MISO_PIN PA6
167 #define SPI1_MOSI_PIN PA7
169 #define M25P16_SPI_BUS BUS_SPI1
170 #define M25P16_CS_PIN SPI1_NSS_PIN
172 #define W25N01G_SPI_BUS BUS_SPI1
173 #define W25N01G_CS_PIN SPI1_NSS_PIN
178 #define USE_FLASH_M25P16
179 #define USE_FLASH_W25N01G
180 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
182 // *************** OSD *****************************
185 #if defined ZEEZF7 || defined ZEEZF7V2
186 #define USE_SPI_DEVICE_3
187 #define SPI3_NSS_PIN PA15
188 #define SPI3_SCK_PIN PC10
189 #define SPI3_MISO_PIN PC11
190 #define SPI3_MOSI_PIN PB5
192 #define MAX7456_SPI_BUS BUS_SPI3
193 #define MAX7456_CS_PIN SPI3_NSS_PIN
195 #define USE_SPI_DEVICE_1
196 #define SPI1_NSS_PIN PA4
197 #define SPI1_SCK_PIN PA5
198 #define SPI1_MISO_PIN PA6
199 #define SPI1_MOSI_PIN PA7
201 #define MAX7456_SPI_BUS BUS_SPI1
202 #define MAX7456_CS_PIN SPI1_NSS_PIN
205 // *************** PINIO ***************************
210 #define PINIO1_PIN PB11 // VTX power switcher
213 // *************** UART *****************************
218 #define UART1_RX_PIN PA10
219 #define UART1_TX_PIN PA9
222 #define UART2_RX_PIN PA3
223 #define UART2_TX_PIN PA2
226 #define UART3_RX_PIN PB11
227 #define UART3_TX_PIN PB10
230 #define UART4_RX_PIN PA1
231 #define UART4_TX_PIN PA0
234 #define UART5_RX_PIN PD2
235 #define UART5_TX_PIN PC12
237 #if defined ZEEZF7V2 || defined ZEEZF7V3
238 #define SERIAL_PORT_COUNT 6
241 #define UART6_RX_PIN PC7
242 #define UART6_TX_PIN PC6
243 #define SERIAL_PORT_COUNT 7
246 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
247 #define SERIALRX_PROVIDER SERIALRX_SBUS
248 #define SERIALRX_UART SERIAL_PORT_USART4
250 // *************** ADC *****************************
252 #define ADC_INSTANCE ADC1
253 #define ADC1_DMA_STREAM DMA2_Stream0
255 #if defined ZEEZF7V2 || defined ZEEZF7V3
256 #define ADC_CHANNEL_1_PIN PC0
257 #define ADC_CHANNEL_2_PIN PC1
259 #define ADC_CHANNEL_1_PIN PC2
260 #define ADC_CHANNEL_2_PIN PC3
263 #define VBAT_ADC_CHANNEL ADC_CHN_1
264 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
266 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_LED_STRIP)
268 #if defined ZEEZF7V2 || defined ZEEZF7V3
269 #define CURRENT_METER_SCALE 250
272 // ********** Optical Flow and Lidar **************
274 #define USE_RANGEFINDER
275 #define USE_RANGEFINDER_MSP
277 #define USE_OPFLOW_MSP
279 // *************** LED *****************************
281 #define USE_LED_STRIP
282 #define WS2811_PIN PB0
284 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
286 #define TARGET_IO_PORTA 0xffff
287 #define TARGET_IO_PORTB 0xffff
288 #define TARGET_IO_PORTC 0xffff
289 #define TARGET_IO_PORTD (BIT(2))
291 #if defined ZEEZF7V2 || defined ZEEZF7V3
292 #define MAX_PWM_OUTPUT_PORTS 8
294 #define MAX_PWM_OUTPUT_PORTS 4
298 #define USE_ESC_SENSOR