2 * This file is part of Betaflight.
4 * Betaflight is free software. You can redistribute this software
5 * and/or modify this software under the terms of the GNU General
6 * Public License as published by the Free Software Foundation,
7 * either version 3 of the License, or (at your option) any later
10 * Betaflight is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this software.
19 * If not, see <http://www.gnu.org/licenses/>.
24 #define FC_TARGET_MCU STM32F405
26 #define BOARD_NAME FISHDRONEF4
27 #define MANUFACTURER_ID LEGA
30 #define USE_ACC_SPI_MPU6500
32 #define USE_GYRO_SPI_MPU6500
36 #define BEEPER_PIN PC15
37 #define MOTOR1_PIN PB8
38 #define MOTOR2_PIN PA2
39 #define MOTOR3_PIN PA15
40 #define MOTOR4_PIN PA3
41 #define RX_PPM_PIN PB0
42 #define LED_STRIP_PIN PA0
43 #define UART1_TX_PIN PA9
44 #define UART3_TX_PIN PB10
45 #define UART6_TX_PIN PC6
46 #define UART1_RX_PIN PA10
47 #define UART3_RX_PIN PB11
48 #define UART6_RX_PIN PC7
49 #define INVERTER_PIN_UART6 PC8
52 #define SPI1_SCK_PIN PA5
53 #define SPI2_SCK_PIN PB13
54 #define SPI3_SCK_PIN PC10
55 #define SPI1_SDI_PIN PA6
56 #define SPI2_SDI_PIN PC2
57 #define SPI3_SDI_PIN PC11
58 #define SPI1_SDO_PIN PA7
59 #define SPI2_SDO_PIN PC3
60 #define SPI3_SDO_PIN PC12
61 #define ESCSERIAL_PIN PB0
62 #define ADC_VBAT_PIN PC0
63 #define ADC_RSSI_PIN PC1
64 #define SDCARD_SPI_CS_PIN PB9
65 #define SDCARD_DETECT_PIN PB7
66 #define FLASH_CS_PIN PD2
67 #define MAX7456_SPI_CS_PIN PB12
68 #define GYRO_1_EXTI_PIN PC4
69 #define GYRO_1_CS_PIN PA4
70 #define USB_DETECT_PIN PA8
71 #define VTX_CS_PIN PB3
72 #define VTX_DATA_PIN PB5
73 #define VTX_CLK_PIN PB4
75 #define TIMER_PIN_MAPPING \
76 TIMER_PIN_MAP( 0, PB0 , 2, 0) \
77 TIMER_PIN_MAP( 1, PB8 , 1, 0) \
78 TIMER_PIN_MAP( 2, PA2 , 1, 0) \
79 TIMER_PIN_MAP( 3, PA15, 1, 0) \
80 TIMER_PIN_MAP( 4, PA3 , 1, 1) \
81 TIMER_PIN_MAP( 5, PA0 , 2, 0)
85 #define SPI3_TX_DMA_OPT 0
86 #define ADC1_DMA_OPT 1
88 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
89 #define BEEPER_INVERTED
90 #define SDCARD_DETECT_INVERTED
91 #define USE_SDCARD_SPI
92 #define SDCARD_SPI_INSTANCE SPI3
93 #define SYSTEM_HSE_MHZ 8
94 #define MAX7456_SPI_INSTANCE SPI2
95 #define FLASH_SPI_INSTANCE SPI3
97 #define GYRO_1_SPI_INSTANCE SPI1
98 #define GYRO_1_ALIGN CW90_DEG
99 #define GYRO_1_ALIGN_YAW 900