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 "CLR7"
23 #define USBD_PRODUCT_STRING "CLRACINGF7"
24 #define USE_TARGET_CONFIG
26 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_ON
30 #define BEEPER_PIN PB4
31 #define BEEPER_INVERTED
33 #define USE_MULTI_GYRO
34 #define GYRO_1_EXTI_PIN PC4
35 #define GYRO_2_EXTI_PIN PC14
41 #define USE_ACC_SPI_MPU6000
42 #define USE_GYRO_SPI_MPU6000
45 #define USE_ACC_SPI_MPU6500
46 #define USE_GYRO_SPI_MPU6500
48 #define GYRO_1_CS_PIN PA4
49 #define GYRO_1_SPI_INSTANCE SPI1
50 #define GYRO_1_ALIGN CW0_DEG
52 #define GYRO_2_CS_PIN PC13
53 #define GYRO_2_SPI_INSTANCE SPI1
54 #define GYRO_2_ALIGN CW90_DEG
55 //#define ACC_2_ALIGN CW90_DEG
57 #define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH
60 #define USE_MAG_HMC5883
61 #define USE_MAG_QMC5883
62 #define MAG_I2C_INSTANCE (I2CDEV_2)
64 #define DEFAULT_FEATURES (FEATURE_OSD)
66 #define MAX7456_SPI_INSTANCE SPI3
67 #define MAX7456_SPI_CS_PIN PA15
69 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
71 #define USE_FLASH_M25P16
72 #define USE_FLASH_W25M
73 #define USE_FLASH_W25N01G // 1G NAND flash support
74 #define FLASH_CS_PIN PB12
75 #define FLASH_SPI_INSTANCE SPI2
80 #define UART1_RX_PIN PA10
81 #define UART1_TX_PIN PA9
84 #define UART2_RX_PIN PA3
85 #define UART2_TX_PIN PA2
88 #define UART3_RX_PIN PB11
89 #define UART3_TX_PIN PB10
92 #define UART4_RX_PIN PA1
93 #define UART4_TX_PIN PA0
96 #define UART5_RX_PIN PD2
97 #define UART5_TX_PIN PC12
100 #define UART6_RX_PIN PC7
101 #define UART6_TX_PIN PC6
103 //#define USE_SOFTSERIAL1
104 #define SERIAL_PORT_COUNT 7 //VCP, USART1, USART2,USART3,USART4,USART5,USART6
106 #define USE_ESCSERIAL
107 #define ESCSERIAL_TIMER_TX_PIN PB8 // (Hardware=0, PPM)
110 #define USE_I2C_DEVICE_2 // External I2C
111 #define I2C_DEVICE (I2CDEV_2)
112 #define I2C2_SCL NONE // PB10 (UART3_TX)
113 #define I2C2_SDA NONE // PB11 (UART3_RX)
116 #define USE_SPI_DEVICE_1
117 #define USE_SPI_DEVICE_2
118 #define USE_SPI_DEVICE_3
120 #define SPI1_NSS_PIN PA4
121 #define SPI1_SCK_PIN PA5
122 #define SPI1_MISO_PIN PA6
123 #define SPI1_MOSI_PIN PA7
125 #define SPI2_NSS_PIN PB12
126 #define SPI2_SCK_PIN PB13
127 #define SPI2_MISO_PIN PB14
128 #define SPI2_MOSI_PIN PB15
130 #define SPI3_NSS_PIN PA15
131 #define SPI3_SCK_PIN PC10
132 #define SPI3_MISO_PIN PC11
133 #define SPI3_MOSI_PIN PB5
136 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
137 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
138 #define CURRENT_METER_ADC_PIN PC1
139 #define VBAT_ADC_PIN PC2
140 #define RSSI_ADC_PIN PC3
142 #define CURRENT_METER_SCALE_DEFAULT 250 // 3.3/120A = 25mv/A
146 #define PINIO1_PIN PA14 // VTX power switcher
149 #define BINDPLUG_PIN PB2
150 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
151 #define SERIALRX_UART SERIAL_PORT_UART5
152 #define SERIALRX_PROVIDER SERIALRX_SBUS
154 #define TARGET_IO_PORTA 0xffff
155 #define TARGET_IO_PORTB 0xffff
156 #define TARGET_IO_PORTC 0xffff
157 #define TARGET_IO_PORTD (BIT(2))
159 #define USABLE_TIMER_CHANNEL_COUNT 9
160 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) )