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 "SF4M"
22 #define USBD_PRODUCT_STRING "SPEEDYBEEF405MINI"
27 #define BEEPER_INVERTED
33 #define USE_SPI_DEVICE_1
34 #define SPI1_SCK_PIN PA5
35 #define SPI1_MISO_PIN PA6
36 #define SPI1_MOSI_PIN PA7
38 #define USE_SPI_DEVICE_2
39 #define SPI2_SCK_PIN PB13
40 #define SPI2_MISO_PIN PC2
41 #define SPI2_MOSI_PIN PC3
43 #define USE_SPI_DEVICE_3
44 #define SPI3_SCK_PIN PB3
45 #define SPI3_MISO_PIN PB4
46 #define SPI3_MOSI_PIN PB5
52 #define USE_I2C_DEVICE_1
62 #define UART1_TX_PIN PA9
63 #define UART1_RX_PIN PA10
66 #define UART2_TX_PIN PA2
67 #define UART2_RX_PIN PA3
70 #define UART3_TX_PIN PC10
71 #define UART3_RX_PIN PC11
73 #define USE_UART4 //Internally routed to BLE
74 #define UART4_TX_PIN PA0
75 #define UART4_RX_PIN PA1
78 #define UART5_TX_PIN PC12
79 #define UART5_RX_PIN PD2
82 #define UART6_TX_PIN PC6
83 #define UART6_RX_PIN PC7
85 #define USE_SOFTSERIAL1
86 #define SOFTSERIAL_1_TX_PIN PA2
87 #define SOFTSERIAL_1_RX_PIN PA2
89 #define SERIAL_PORT_COUNT 8
94 #define USE_IMU_ICM42605
95 #define IMU_ICM42605_ALIGN CW270_DEG
96 #define ICM42605_CS_PIN PA4
97 #define ICM42605_SPI_BUS BUS_SPI1
103 #define BARO_I2C_BUS BUS_I2C1
104 #define USE_BARO_BMP280
105 #define USE_BARO_MS5611
106 #define USE_BARO_DPS310
109 #define MAG_I2C_BUS BUS_I2C1
112 #define TEMPERATURE_I2C_BUS BUS_I2C1
113 #define PITOT_I2C_BUS BUS_I2C1
114 #define RANGEFINDER_I2C_BUS BUS_I2C1
120 #define MAX7456_CS_PIN PB12
121 #define MAX7456_SPI_BUS BUS_SPI2
127 #define USE_FLASH_M25P16
128 #define M25P16_SPI_BUS BUS_SPI3
129 #define M25P16_CS_PIN PC14
130 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
132 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
133 #define SERIALRX_PROVIDER SERIALRX_SBUS
134 #define SERIALRX_UART SERIAL_PORT_USART2
136 // *************** ADC *****************************
138 #define ADC_INSTANCE ADC1
139 #define ADC1_DMA_STREAM DMA2_Stream0
141 #define ADC_CHANNEL_1_PIN PC0
142 #define ADC_CHANNEL_2_PIN PC1
144 #define VBAT_ADC_CHANNEL ADC_CHN_1
145 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
147 // *************** PINIO ***************************
150 #define PINIO1_PIN PB11 // RF Switch
151 #define PINIO1_FLAGS PINIO_FLAGS_INVERTED
153 // *************** LEDSTRIP ************************
154 #define USE_LED_STRIP
155 #define WS2811_PIN PA8
157 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
158 #define CURRENT_METER_SCALE 250
159 #define CURRENT_METER_OFFSET 0
161 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
163 #define TARGET_IO_PORTA 0xffff
164 #define TARGET_IO_PORTB 0xffff
165 #define TARGET_IO_PORTC 0xffff
166 #define TARGET_IO_PORTD 0xffff
168 #ifdef SPEEDYBEEF405MINI_6OUTPUTS
170 #define MAX_PWM_OUTPUT_PORTS 6
174 #define MAX_PWM_OUTPUT_PORTS 4
179 #define USE_SERIALSHOT
180 #define USE_ESC_SENSOR