2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
20 #define TARGET_BOARD_IDENTIFIER "SPEV"
25 #define BEEPER_INVERTED
28 #define GYRO_INT_EXTI PC13
29 #define USE_MPU_DATA_READY_SIGNAL
30 #define ENSURE_MPU_DATA_READY_IS_LOW
32 #define MPU6500_CS_PIN PB9
33 #define MPU6500_SPI_BUS BUS_SPI1
35 #define MPU9250_CS_PIN PB9
36 #define MPU9250_SPI_BUS BUS_SPI1
38 #define USE_IMU_MPU6500
39 #define IMU_MPU6500_ALIGN CW180_DEG
40 #define USE_IMU_MPU9250
41 #define IMU_MPU9250_ALIGN CW180_DEG
44 #define BARO_I2C_BUS BUS_I2C1
45 #define USE_BARO_BMP280
46 #define USE_BARO_MS5611
49 #define MAG_I2C_BUS BUS_I2C1
50 #define USE_MAG_MPU9250
51 #define USE_MAG_HMC5883
52 #define USE_MAG_QMC5883
53 #define USE_MAG_IST8310
54 #define USE_MAG_IST8308
55 #define USE_MAG_MAG3110
56 #define USE_MAG_LIS3MDL
62 #define USE_SOFTSERIAL1
64 #define UART1_TX_PIN PA9
65 #define UART1_RX_PIN PA10
67 #define UART2_TX_PIN PA14 // PA14 / SWCLK
68 #define UART2_RX_PIN PA15
70 #define UART3_TX_PIN PB10 // PB10 (AF7)
71 #define UART3_RX_PIN PB11 // PB11 (AF7)
73 #ifdef SPRACINGF3EVO_1SS
74 #define SERIAL_PORT_COUNT 5
76 #define SOFTSERIAL_1_RX_PIN PB0
77 #define SOFTSERIAL_1_TX_PIN PB1
79 #define USE_SOFTSERIAL2
80 #define SERIAL_PORT_COUNT 6
82 #define SOFTSERIAL_1_RX_PIN PA6
83 #define SOFTSERIAL_1_TX_PIN PA7
84 #define SOFTSERIAL_2_RX_PIN PB0
85 #define SOFTSERIAL_2_TX_PIN PB1
89 #define USE_I2C_DEVICE_1
92 #define USE_SPI_DEVICE_1 // PB9,3,4,5 on AF5 SPI1 (MPU)
93 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5 SPI2 (SDCard)
95 #define SPI1_NSS_PIN PB9
96 #define SPI1_SCK_PIN PB3
97 #define SPI1_MISO_PIN PB4
98 #define SPI1_MOSI_PIN PB5
100 #define SPI2_NSS_PIN PB12
101 #define SPI2_SCK_PIN PB13
102 #define SPI2_MISO_PIN PB14
103 #define SPI2_MOSI_PIN PB15
106 #define USE_SDCARD_SPI
107 #define SDCARD_DETECT_INVERTED
108 #define SDCARD_DETECT_PIN PC14
109 #define SDCARD_SPI_BUS BUS_SPI2
110 #define SDCARD_CS_PIN SPI2_NSS_PIN
113 #define ADC_INSTANCE ADC2
114 #define ADC_CHANNEL_1_PIN PA4
115 #define ADC_CHANNEL_2_PIN PA5
116 #define ADC_CHANNEL_3_PIN PB2
117 #define VBAT_ADC_CHANNEL ADC_CHN_1
118 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
119 #define RSSI_ADC_CHANNEL ADC_CHN_3
121 #define USE_LED_STRIP
122 #define WS2811_PIN PA8
124 #define USE_RANGEFINDER
125 #define RANGEFINDER_I2C_BUS BUS_I2C1
126 #define USE_RANGEFINDER_SRF10
128 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
130 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
131 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TRANSPONDER | FEATURE_BLACKBOX | FEATURE_RSSI_ADC | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY)
133 #define USE_SPEKTRUM_BIND
134 #define BIND_PIN PB11 // UART3
136 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
138 // Number of available PWM outputs
139 #define MAX_PWM_OUTPUT_PORTS 10
141 // IO - stm32f303cc in 48pin package
142 #define TARGET_IO_PORTA 0xffff
143 #define TARGET_IO_PORTB 0xffff
144 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
145 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))