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 "NERC"
22 #define USBD_PRODUCT_STRING "NeuronRC F435 MINI"
24 /**********swd debuger reserved *****************
48 #define BEEPER_INVERTED
50 // *************** Gyro & ACC **********************
52 #define USE_SPI_DEVICE_1
54 #define SPI1_SCK_PIN PA5
55 #define SPI1_MISO_PIN PA6
56 #define SPI1_MOSI_PIN PA7
57 #define SPI1_NSS_PIN PA4
60 #define USE_IMU_MPU6500
61 #define IMU_MPU6500_ALIGN CW0_DEG
62 #define MPU6500_SPI_BUS BUS_SPI1
63 #define MPU6500_CS_PIN SPI1_NSS_PIN
66 #define USE_IMU_ICM42605
67 #define IMU_ICM42605_ALIGN CW0_DEG
68 #define ICM42605_SPI_BUS BUS_SPI1
69 #define ICM42605_CS_PIN SPI1_NSS_PIN
72 #define USE_IMU_BMI270
73 #define IMU_BMI270_ALIGN CW0_DEG
74 #define BMI270_SPI_BUS BUS_SPI1
75 #define BMI270_CS_PIN SPI1_NSS_PIN
78 #define USE_IMU_LSM6DXX
79 #define IMU_LSM6DXX_ALIGN CW0_DEG
80 #define LSM6DXX_CS_PIN SPI1_NSS_PIN
81 #define LSM6DXX_SPI_BUS BUS_SPI1
84 // *************** I2C/Baro/Mag/EXT*********************
86 #define USE_I2C_DEVICE_2
87 #define I2C2_SCL PH2 // SCL pad
88 #define I2C2_SDA PH3 // SDA pad
89 #define USE_I2C_PULLUP
92 #define BARO_I2C_BUS BUS_I2C2
93 #define USE_BARO_BMP280
94 #define USE_BARO_DPS310
97 #define MAG_I2C_BUS BUS_I2C2
99 #define DEFAULT_I2C_BUS BUS_I2C2
101 // temperature sensors
102 //#define TEMPERATURE_I2C_BUS BUS_I2C1
104 //#define PITOT_I2C_BUS BUS_I2C1
106 //#define USE_RANGEFINDER
107 //#define RANGEFINDER_I2C_BUS BUS_I2C1
109 // *************** OSD *****************************
110 #define USE_SPI_DEVICE_2
111 #define SPI2_SCK_PIN PB13
112 #define SPI2_MISO_PIN PB14
113 #define SPI2_MOSI_PIN PB15
114 #define SPI2_NSS_PIN PB12
117 #define MAX7456_SPI_BUS BUS_SPI2
118 #define MAX7456_CS_PIN SPI2_NSS_PIN
121 // *************** SD/BLACKBOX **************************
123 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
125 #define USE_FLASH_M25P16
126 #define M25P16_SPI_BUS BUS_SPI2
127 #define M25P16_CS_PIN PB5
129 #define USE_FLASH_W25N01G
130 #define W25N01G_SPI_BUS BUS_SPI2
131 #define W25N01G_CS_PIN PB5
133 // *************** UART *****************************
135 //#define USB_DETECT_PIN PC14
136 #define USE_USB_DETECT
139 #define UART1_RX_PIN PA10
140 #define UART1_TX_PIN PA9
143 #define UART2_RX_PIN PB0
144 #define UART2_TX_PIN PA2
147 #define UART3_RX_PIN PB11
148 #define UART3_TX_PIN PB10
151 #define UART5_RX_PIN PB8
152 #define UART5_TX_PIN PB9
155 #define UART7_RX_PIN PB3
156 #define UART7_TX_PIN PB4
158 #define SERIAL_PORT_COUNT 6
160 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
161 #define SERIALRX_PROVIDER SERIALRX_CRSF
162 #define SERIALRX_UART SERIAL_PORT_USART7
164 // *************** ADC *****************************
166 #define ADC_INSTANCE ADC1
168 #define ADC1_DMA_STREAM DMA2_CHANNEL1
169 #define ADC_CHANNEL_1_PIN PA0
170 #define ADC_CHANNEL_2_PIN PA1
171 //#define ADC_CHANNEL_3_PIN PB0
172 #define VBAT_ADC_CHANNEL ADC_CHN_1
173 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
174 //#define RSSI_ADC_CHANNEL ADC_CHN_3
176 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD )
178 // #define USE_LED_STRIP
179 // #define WS2811_PIN PB10 //TIM2_CH3
181 // #define USE_SPEKTRUM_BIND
182 // #define BIND_PIN PA3 //UART2_RX_PIN
184 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
186 #define TARGET_IO_PORTA 0xffff
187 #define TARGET_IO_PORTB 0xffff
188 #define TARGET_IO_PORTC 0xffff
189 #define TARGET_IO_PORTD 0xffff
190 #define TARGET_IO_PORTE BIT(2)
191 #define TARGET_IO_PORTH BIT(1)|BIT(2)|BIT(3)
193 #define MAX_PWM_OUTPUT_PORTS 8
195 #define USE_ESC_SENSOR