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
36 #define GYRO_1_EXTI_PIN PC4
37 #define GYRO_2_EXTI_PIN PC14
38 #define USE_MPU_DATA_READY_SIGNAL
44 #define USE_ACC_SPI_MPU6000
45 #define USE_GYRO_SPI_MPU6000
48 #define USE_ACC_SPI_MPU6500
49 #define USE_GYRO_SPI_MPU6500
51 #define GYRO_1_CS_PIN PA4
52 #define GYRO_1_SPI_INSTANCE SPI1
53 #define GYRO_1_ALIGN CW0_DEG
55 #define GYRO_2_CS_PIN PC13
56 #define GYRO_2_SPI_INSTANCE SPI1
57 #define GYRO_2_ALIGN CW90_DEG
58 //#define ACC_2_ALIGN CW90_DEG
60 #define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_BOTH
63 #define USE_MAG_HMC5883
64 #define USE_MAG_QMC5883
65 #define MAG_I2C_INSTANCE (I2CDEV_2)
67 #define DEFAULT_FEATURES (FEATURE_OSD)
69 #define MAX7456_SPI_INSTANCE SPI3
70 #define MAX7456_SPI_CS_PIN PA15
72 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
74 #define USE_FLASH_M25P16
75 #define USE_FLASH_W25M
76 #define USE_FLASH_W25N01G // 1G NAND flash support
77 #define FLASH_CS_PIN PB12
78 #define FLASH_SPI_INSTANCE SPI2
83 #define UART1_RX_PIN PA10
84 #define UART1_TX_PIN PA9
87 #define UART2_RX_PIN PA3
88 #define UART2_TX_PIN PA2
91 #define UART3_RX_PIN PB11
92 #define UART3_TX_PIN PB10
95 #define UART4_RX_PIN PA1
96 #define UART4_TX_PIN PA0
99 #define UART5_RX_PIN PD2
100 #define UART5_TX_PIN PC12
103 #define UART6_RX_PIN PC7
104 #define UART6_TX_PIN PC6
106 //#define USE_SOFTSERIAL1
107 #define SERIAL_PORT_COUNT 7 //VCP, USART1, USART2,USART3,USART4,USART5,USART6
109 #define USE_ESCSERIAL
110 #define ESCSERIAL_TIMER_TX_PIN PB8 // (Hardware=0, PPM)
113 #define USE_I2C_DEVICE_2 // External I2C
114 #define I2C_DEVICE (I2CDEV_2)
115 #define I2C2_SCL NONE // PB10 (UART3_TX)
116 #define I2C2_SDA NONE // PB11 (UART3_RX)
119 #define USE_SPI_DEVICE_1
120 #define USE_SPI_DEVICE_2
121 #define USE_SPI_DEVICE_3
123 #define SPI1_NSS_PIN PA4
124 #define SPI1_SCK_PIN PA5
125 #define SPI1_MISO_PIN PA6
126 #define SPI1_MOSI_PIN PA7
128 #define SPI2_NSS_PIN PB12
129 #define SPI2_SCK_PIN PB13
130 #define SPI2_MISO_PIN PB14
131 #define SPI2_MOSI_PIN PB15
133 #define SPI3_NSS_PIN PA15
134 #define SPI3_SCK_PIN PC10
135 #define SPI3_MISO_PIN PC11
136 #define SPI3_MOSI_PIN PB5
139 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
140 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
141 #define CURRENT_METER_ADC_PIN PC1
142 #define VBAT_ADC_PIN PC2
143 #define RSSI_ADC_PIN PC3
145 #define CURRENT_METER_SCALE_DEFAULT 250 // 3.3/120A = 25mv/A
149 #define PINIO1_PIN PA14 // VTX power switcher
152 #define BINDPLUG_PIN PB2
153 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
154 #define SERIALRX_UART SERIAL_PORT_UART5
155 #define SERIALRX_PROVIDER SERIALRX_SBUS
157 #define TARGET_IO_PORTA 0xffff
158 #define TARGET_IO_PORTB 0xffff
159 #define TARGET_IO_PORTC 0xffff
160 #define TARGET_IO_PORTD (BIT(2))
162 #define USABLE_TIMER_CHANNEL_COUNT 9
163 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) )