2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
22 #define TARGET_BOARD_IDENTIFIER "FORT"
23 #define USBD_PRODUCT_STRING "FortiniF4"
24 #define USE_TARGET_CONFIG
25 #define USE_HARDWARE_REVISION_DETECTION
27 /*--------------LED----------------*/
30 /*---------------------------------*/
32 /*------------BEEPER---------------*/
34 #define BEEPER_PIN PB4
35 #define BEEPER_INVERTED
36 /*---------------------------------*/
38 /*----------CAMERA CONTROL---------*/
39 #define CAMERA_CONTROL_PIN PB7
40 /*---------------------------------*/
42 /*------------SENSORS--------------*/
45 #define MPU_INT_EXTI PC4
46 //#define DEBUG_MPU_DATA_READY_INTERRUPT
47 #define USE_MPU_DATA_READY_SIGNAL
48 #define ENSURE_MPU_DATA_READY_IS_LOW
50 #define MPU6000_CS_PIN PA8
51 #define MPU6000_SPI_INSTANCE SPI1
53 #define MPU6500_CS_PIN PA8
54 #define MPU6500_SPI_INSTANCE SPI1
56 #define ICM20689_CS_PIN PA8
57 #define ICM20689_SPI_INSTANCE SPI1
60 #define USE_GYRO_SPI_ICM20689
61 #define GYRO_ICM20689_ALIGN CW180_DEG
63 #define USE_GYRO_SPI_MPU6000
64 #define GYRO_MPU6000_ALIGN CW180_DEG
65 #define USE_ACC_SPI_MPU6000
66 #define ACC_MPU6000_ALIGN CW180_DEG
68 #define USE_GYRO_MPU6500
69 #define USE_GYRO_SPI_MPU6500
70 #define GYRO_MPU6500_ALIGN CW180_DEG
73 #define USE_ACC_SPI_ICM20689
74 #define ACC_ICM20689_ALIGN CW180_DEG
76 #define USE_ACC_SPI_MPU6000
77 #define ACC_MPU6000_ALIGN CW180_DEG
79 #define USE_ACC_MPU6500
80 #define USE_ACC_SPI_MPU6500
81 #define ACC_MPU6500_ALIGN CW180_DEG
82 /*---------------------------------*/
84 /*------------FLASH----------------*/
85 #define M25P16_CS_PIN PB3
86 #define M25P16_SPI_INSTANCE SPI3
89 #define USE_FLASH_M25P16
90 /*---------------------------------*/
92 /*-------------OSD-----------------*/
94 #define MAX7456_SPI_INSTANCE SPI3
95 #define MAX7456_SPI_CS_PIN PB3
96 #define MAX7456_SPI_CLK (SPI_CLOCK_STANDARD) // 10MHz
97 #define MAX7456_RESTORE_CLK (SPI_CLOCK_FAST)
98 /*---------------------------------*/
100 /*-----------USB-UARTs-------------*/
102 //#define USB_DETECT_PIN PA8
103 //#define USE_USB_DETECT
106 #define UART1_RX_PIN PA10
107 #define UART1_TX_PIN PA9
110 #define UART3_RX_PIN PB11
111 #define UART3_TX_PIN PB10
112 #define INVERTER_PIN_UART3 PC15
115 #define UART4_TX_PIN PA0
116 #define UART4_RX_PIN PA1
119 #define UART5_RX_PIN PD2
120 #define UART5_TX_PIN NONE
123 #define UART6_RX_PIN PC7
124 #define UART6_TX_PIN PC6
126 #define SERIAL_PORT_COUNT 6
127 /*---------------------------------*/
129 /*-------------SPIs----------------*/
132 #define USE_SPI_DEVICE_1
133 #define SPI1_NSS_PIN PA8
134 #define SPI1_SCK_PIN PA5
135 #define SPI1_MISO_PIN PA6
136 #define SPI1_MOSI_PIN PA7
138 #define USE_SPI_DEVICE_3
139 #define SPI3_NSS_PIN PB3
140 #define SPI3_SCK_PIN PC10
141 #define SPI3_MISO_PIN PC11
142 #define SPI3_MOSI_PIN PC12
143 /*---------------------------------*/
145 /*-------------ADCs----------------*/
147 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
148 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
149 #define VBAT_ADC_PIN PC2
150 #define CURRENT_METER_ADC_PIN PC1
151 /*---------------------------------*/
153 /*-------------ESCs----------------*/
154 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
155 #define USE_ESCSERIAL
156 #define ESCSERIAL_TIMER_TX_PIN PB0 // (HARDARE=0)
157 /*---------------------------------*/
159 /*--------DEFAULT VALUES-----------*/
160 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
161 #define SERIALRX_PROVIDER SERIALRX_SBUS
162 #define SERIALRX_UART SERIAL_PORT_USART3
164 #define TARGET_IO_PORTA 0xffff
165 #define TARGET_IO_PORTB 0xffff
166 #define TARGET_IO_PORTC 0xffff
167 #define TARGET_IO_PORTD (BIT(2))
168 /*---------------------------------*/
170 /*--------------TIMERS-------------*/
171 #define USABLE_TIMER_CHANNEL_COUNT 6
172 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) )
173 /*---------------------------------*/