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 "FDV1"
22 #define USBD_PRODUCT_STRING "FishDroneF4NAV"
24 // *************** LED *****************************
25 #define LED0 PC13 // Red
26 #define LED1 PC14 // Yellow
28 // *************** BEEPER *****************************
31 // *************** SPI *****************************
34 // *************** ICM20608 *****************************
35 #define USE_SPI_DEVICE_1
36 #define MPU6500_CS_PIN PA4
37 #define MPU6500_SPI_BUS BUS_SPI1
38 #define MPU9250_CS_PIN PA4
39 #define MPU9250_SPI_BUS BUS_SPI1
41 #define USE_IMU_MPU6500
42 #define IMU_MPU6500_ALIGN CW180_DEG
44 #define USE_IMU_MPU9250
45 #define IMU_MPU9250_ALIGN CW180_DEG
49 #define GYRO_INT_EXTI PC4
50 #define USE_MPU_DATA_READY_SIGNAL
51 #define ENSURE_MPU_DATA_READY_IS_LOW
53 // *************** Compass *****************************
55 #define MAG_I2C_BUS BUS_I2C1
56 #define USE_MAG_MPU9250
57 #define USE_MAG_MAG3110
58 #define USE_MAG_HMC5883
59 #define USE_MAG_IST8310
60 #define USE_MAG_IST8308
61 #define USE_MAG_QMC5883
62 #define USE_MAG_LIS3MDL
64 // *************** Temperature sensor *****************
65 #define TEMPERATURE_I2C_BUS BUS_I2C1
67 #define BNO055_I2C_BUS BUS_I2C1
69 // *************** BARO *****************************
71 #define BARO_I2C_BUS BUS_I2C1
72 #define USE_BARO_MS5611
74 // *************** OSD *****************************
75 #define USE_SPI_DEVICE_2
76 #define SPI2_NSS_PIN PB12
77 #define SPI2_SCK_PIN PB13
78 #define SPI2_MISO_PIN PC2
79 #define SPI2_MOSI_PIN PC3
82 #define MAX7456_SPI_BUS BUS_SPI2
83 #define MAX7456_CS_PIN SPI2_NSS_PIN
85 // *************** TF Support *****************************
86 #define USE_SPI_DEVICE_3
87 #define SPI3_SCK_PIN PB3
88 #define SPI3_MISO_PIN PB4
89 #define SPI3_MOSI_PIN PB5
90 #define SPI3_NSS_PIN PB6
93 #define USE_SDCARD_SPI
94 #define SDCARD_DETECT_INVERTED
95 #define SDCARD_DETECT_PIN PB7
96 #define SDCARD_SPI_BUS BUS_SPI3
97 #define SDCARD_CS_PIN PB6
99 // *************** Flash *****************************
100 #define M25P16_CS_PIN PA15
101 #define M25P16_SPI_BUS BUS_SPI3
103 #define USE_FLASH_M25P16
105 // *************** UART *****************************
108 #define USE_UART_INVERTER
110 // provide for Telemetry module
112 #define UART1_RX_PIN PA10
113 #define UART1_TX_PIN PA9
115 // provide for xBUS Receiver
117 #define UART2_RX_PIN PA3
118 #define UART2_TX_PIN PA2
119 #define INVERTER_PIN_UART2_RX PB2
121 // provide for GPS module
123 #define UART5_RX_PIN PD2
124 #define UART5_TX_PIN PC12
126 #define SERIAL_PORT_COUNT 4 // VCP, USART1, USART2, USART5
128 // *************** WS2811 *****************************
129 #define USE_LED_STRIP
130 #define WS2811_PIN PB1
132 // *************** IIC *****************************
134 #define USE_I2C_DEVICE_1
138 // *************** ADC *****************************
140 #define ADC_CHANNEL_1_PIN PC0
141 #define ADC_CHANNEL_2_PIN PC1
142 #define ADC_CHANNEL_3_PIN PC5
143 #define VBAT_ADC_CHANNEL ADC_CHN_1
144 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
145 #define RSSI_ADC_CHANNEL ADC_CHN_3
146 #define VBAT_SCALE_DEFAULT 103
148 // *************** RANGEFINDER *****************************
149 // #define USE_RANGEFINDER
150 // #define USE_RANGEFINDER_SRF10
152 // *************** NAV *****************************
154 #define NAV_GPS_GLITCH_DETECTION
155 #define NAV_MAX_WAYPOINTS 60
157 // *************** Others *****************************
160 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
161 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
162 #define SERIALRX_PROVIDER SERIALRX_SBUS
163 #define SERIALRX_UART SERIAL_PORT_USART3
164 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_RSSI_ADC | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY)
166 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
168 // Number of available PWM outputs
169 #define MAX_PWM_OUTPUT_PORTS 6
171 #define TARGET_IO_PORTA 0xffff
172 #define TARGET_IO_PORTB 0xffff
173 #define TARGET_IO_PORTC 0xffff
174 #define TARGET_IO_PORTD (BIT(2))