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/>.
24 #define TARGET_BOARD_IDENTIFIER "SXF4"
25 #define USBD_PRODUCT_STRING "Stack-X F4"
27 #define TARGET_BOARD_IDENTIFIER "FDF4"
28 #define USBD_PRODUCT_STRING "FishDroneF4"
35 #define BEEPER_PIN PC15
36 #define BEEPER_INVERTED
38 #define INVERTER_PIN_UART6 PC8
42 #define GYRO_1_EXTI_PIN PC4
43 #define USE_MPU_DATA_READY_SIGNAL
45 // *************** Gyro & ACC **********************
47 #define USE_SPI_DEVICE_1
49 #define GYRO_1_CS_PIN PA4
50 #define GYRO_1_SPI_INSTANCE SPI1
53 #define USE_GYRO_SPI_MPU6500
54 #define GYRO_1_ALIGN CW90_DEG
57 #define USE_ACC_SPI_MPU6500
59 // *************** UART *****************************
61 #define USB_DETECT_PIN PA8
62 #define USE_USB_DETECT
65 #define UART1_RX_PIN PA10
66 #define UART1_TX_PIN PA9
69 #define UART3_RX_PIN PB11
70 #define UART3_TX_PIN PB10
73 #define UART6_RX_PIN PC7
74 #define UART6_TX_PIN PC6
76 #define USE_SOFTSERIAL1
77 #define USE_SOFTSERIAL2
79 #define SERIAL_PORT_COUNT 6 // VCP, USART1, USART3, USART6, SOFTSERIAL x 2
82 #define ESCSERIAL_TIMER_TX_PIN PB0 // (HARDARE=0,PPM)
84 // *************** OSD *****************************
85 #define USE_SPI_DEVICE_2
86 #define SPI2_NSS_PIN PB12
87 #define SPI2_SCK_PIN PB13
88 #define SPI2_MISO_PIN PC2
89 #define SPI2_MOSI_PIN PC3
92 #define MAX7456_SPI_INSTANCE SPI2
93 #define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
95 // *************** FLASH *****************************
96 #define USE_SPI_DEVICE_3
97 #define SPI3_SCK_PIN PC10
98 #define SPI3_MISO_PIN PC11
99 #define SPI3_MOSI_PIN PC12
101 #define USE_FLASH_M25P16
103 #define FLASH_CS_PIN PD2
104 #define FLASH_SPI_INSTANCE SPI3
106 // *************** SDCARD *****************************
108 #define USE_SDCARD_SPI
109 #define SDCARD_DETECT_INVERTED
110 #define SDCARD_DETECT_PIN PB7
111 #define SDCARD_SPI_INSTANCE SPI3
112 #define SDCARD_SPI_CS_PIN PB9
113 #define SPI3_TX_DMA_OPT 0 // DMA 1 Stream 5 Channel 0
115 // *************** RTC6705 *************************
116 #define USE_VTX_RTC6705
117 #define USE_VTX_RTC6705_SOFTSPI
118 #define RTC6705_SPICLK_PIN PB4
119 #define RTC6705_SPI_MOSI_PIN PB5
120 #define RTC6705_CS_PIN PB3
122 // *************** ADC *****************************
124 #define VBAT_ADC_PIN PC0
125 #define RSSI_ADC_PIN PC1
127 #define CURRENT_METER_ADC_PIN PA1
128 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
129 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
132 // *************** FEATURES ************************
133 #define DEFAULT_FEATURES (FEATURE_OSD)
134 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
135 #define SERIALRX_PROVIDER SERIALRX_SBUS
136 #define SERIALRX_UART SERIAL_PORT_USART3
138 // *************** Others **************************
139 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
141 #define TARGET_IO_PORTA 0xffff
142 #define TARGET_IO_PORTB 0xffff
143 #define TARGET_IO_PORTC 0xffff
144 #define TARGET_IO_PORTD (BIT(2))
146 #define USABLE_TIMER_CHANNEL_COUNT 6
147 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) )