2 * This file is part of INAV.
4 * INAV 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 * INAV 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 INAV. If not, see <http://www.gnu.org/licenses/>.
21 #define TARGET_BOARD_IDENTIFIER "SBMN"
23 #ifdef SPEEDYBEEF7MINIV2
24 #define USBD_PRODUCT_STRING "SPEEDYBEEF7MINIV2"
26 #define USBD_PRODUCT_STRING "SPEEDYBEEF7MINI"
29 #define LED0 PA14 //Blue SWCLK
32 #define BEEPER_INVERTED
34 // *************** SPI1 Gyro & ACC *******************
35 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
38 #define USE_SPI_DEVICE_1
39 #define SPI1_SCK_PIN PA5
40 #define SPI1_MISO_PIN PA6
41 #define SPI1_MOSI_PIN PA7
43 #ifdef SPEEDYBEEF7MINIV2
45 #define USE_IMU_BMI270
46 #define IMU_BMI270_ALIGN CW180_DEG
47 #define BMI270_CS_PIN PB2
48 #define BMI270_SPI_BUS BUS_SPI1
52 #define USE_IMU_MPU6000
53 #define IMU_MPU6000_ALIGN CW0_DEG
54 #define MPU6000_CS_PIN PB2
55 #define MPU6000_SPI_BUS BUS_SPI1
59 // *************** I2C /Baro/Mag *********************
61 #define USE_I2C_DEVICE_1
66 #define BARO_I2C_BUS BUS_I2C1
67 #define USE_BARO_BMP280
68 #define USE_BARO_MS5611
69 #define USE_BARO_DPS310
72 #define MAG_I2C_BUS BUS_I2C1
75 #define TEMPERATURE_I2C_BUS BUS_I2C1
77 #define PITOT_I2C_BUS BUS_I2C1
79 #define USE_RANGEFINDER
80 #define RANGEFINDER_I2C_BUS BUS_I2C1
82 // *************** SPI2 OSD ***********************
83 #define USE_SPI_DEVICE_2
84 #define SPI2_SCK_PIN PB13
85 #define SPI2_MISO_PIN PB14
86 #define SPI2_MOSI_PIN PB15
89 #define MAX7456_SPI_BUS BUS_SPI2
90 #define MAX7456_CS_PIN PB12
92 // *************** SPI3 SD BLACKBOX*******************
93 #define USE_SPI_DEVICE_3
94 #define SPI3_SCK_PIN PC10
95 #define SPI3_MISO_PIN PC11
96 #define SPI3_MOSI_PIN PC12
99 #define USE_FLASH_M25P16
100 #define M25P16_SPI_BUS BUS_SPI3
101 #define M25P16_CS_PIN PD2
102 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
104 // *************** UART *****************************
106 #define USB_DETECT_PIN PC14
107 #define USE_USB_DETECT
110 #define UART1_TX_PIN PA9
111 #define UART1_RX_PIN PA10
114 #define UART2_TX_PIN PA2
115 #define UART2_RX_PIN PA3
118 #define UART3_TX_PIN PB10
119 #define UART3_RX_PIN PB11
122 #define UART4_TX_PIN PA0
123 #define UART4_RX_PIN PA1
126 #define UART6_TX_PIN PC6
127 #define UART6_RX_PIN PC7
129 #define USE_SOFTSERIAL1
130 #define SOFTSERIAL_1_TX_PIN PA2
131 #define SOFTSERIAL_1_RX_PIN PA2
133 #define SERIAL_PORT_COUNT 7
135 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
136 #define SERIALRX_PROVIDER SERIALRX_SBUS
137 #define SERIALRX_UART SERIAL_PORT_USART1
139 // *************** ADC *****************************
141 #define ADC_INSTANCE ADC1
142 #define ADC1_DMA_STREAM DMA2_Stream0
144 #define ADC_CHANNEL_1_PIN PC2
145 #define ADC_CHANNEL_2_PIN PC1
146 #define ADC_CHANNEL_3_PIN PC0
147 #define ADC_CHANNEL_4_PIN PA4
149 #define VBAT_ADC_CHANNEL ADC_CHN_1
150 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
151 #define RSSI_ADC_CHANNEL ADC_CHN_3
152 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
154 // *************** PINIO ***************************
157 #define PINIO1_PIN PC9 // RF Switch
158 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
160 // *************** LEDSTRIP ************************
161 #define USE_LED_STRIP
162 #define WS2811_PIN PC8
164 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
165 #define CURRENT_METER_SCALE 250
166 #define CURRENT_METER_OFFSET -500
168 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
170 #define TARGET_IO_PORTA 0xffff
171 #define TARGET_IO_PORTB 0xffff
172 #define TARGET_IO_PORTC 0xffff
173 #define TARGET_IO_PORTD 0xffff
175 #define MAX_PWM_OUTPUT_PORTS 8
177 #define USE_SERIALSHOT
178 #define USE_ESC_SENSOR