3 * This file is part of Cleanflight and Betaflight.
5 * Cleanflight and Betaflight are free software. You can redistribute
6 * this software and/or modify this software under the terms of the
7 * GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option)
11 * Cleanflight and Betaflight are distributed in the hope that they
12 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
13 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this software.
19 * If not, see <http://www.gnu.org/licenses/>.
24 #define TARGET_BOARD_IDENTIFIER "NERC"
25 #define USBD_PRODUCT_STRING "NEUTRONRCF411SX1280"
30 #define BEEPER_PIN PA14
31 #define BEEPER_INVERTED
36 #define UART1_RX_PIN PA10
37 #define UART1_TX_PIN PA9
40 #define UART2_RX_PIN PA3
41 #define UART2_TX_PIN PA2
45 #define SERIAL_PORT_COUNT 3
49 #define USE_GYRO_SPI_MPU6000
50 #define USE_ACC_SPI_MPU6000
51 #define USE_ACC_SPI_ICM20689
52 #define USE_GYRO_SPI_ICM20689
53 #define USE_GYRO_SPI_ICM42605
54 #define USE_GYRO_SPI_ICM42688P
55 #define USE_ACC_SPI_ICM42605
56 #define USE_ACC_SPI_ICM42688P
57 #define USE_ACCGYRO_LSM6DSO
58 #define USE_ACCGYRO_BMI270
61 #define GYRO_1_EXTI_PIN PB6
62 #define USE_MPU_DATA_READY_SIGNAL
63 #define GYRO_1_CS_PIN SPI1_NSS_PIN
64 #define GYRO_1_SPI_INSTANCE SPI1
65 #define GYRO_1_ALIGN CW90_DEG
67 #define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1
70 #define MAX7456_SPI_INSTANCE SPI2
71 #define MAX7456_SPI_CS_PIN PB12
74 #define USE_FLASH_TOOLS
75 #define USE_FLASH_M25P16
76 #define USE_FLASH_W25N01G // 1Gb NAND flash support
77 #define USE_FLASH_W25M // Stacked die support
78 #define USE_FLASH_W25M512 // 512Kb (256Kb x 2 stacked) NOR flash support
79 #define USE_FLASH_W25M02G // 2Gb (1Gb x 2 stacked) NAND flash support
80 #define FLASH_CS_PIN PA8
81 #define FLASH_SPI_INSTANCE SPI2
82 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
85 #define RX_SPI_INSTANCE SPI3
86 #define RX_SPI_LED_INVERTED
88 #define DEFAULT_RX_FEATURE FEATURE_RX_SPI
89 #define RX_SPI_DEFAULT_PROTOCOL RX_SPI_EXPRESSLRS
91 #define USE_RX_EXPRESSLRS
92 #define USE_RX_EXPRESSLRS_TELEMETRY
94 #define RX_CHANNELS_AETR
95 #define RX_SPI_BIND_PIN PB2
96 #define RX_NSS_PIN PA15
97 #define RX_SPI_LED_PIN PC15
98 #define RX_SPI_EXTI_PIN PC13
99 #define RX_EXPRESSLRS_SPI_RESET_PIN PB9
100 #define RX_EXPRESSLRS_SPI_BUSY_PIN PA13
101 #define RX_EXPRESSLRS_TIMER_INSTANCE TIM5
105 #define USE_SPI_DEVICE_1
106 #define SPI1_SCK_PIN PA5
107 #define SPI1_MISO_PIN PA6
108 #define SPI1_MOSI_PIN PA7
109 #define SPI1_NSS_PIN PA4
111 #define USE_SPI_DEVICE_2
112 #define SPI2_SCK_PIN PB13
113 #define SPI2_MISO_PIN PB14
114 #define SPI2_MOSI_PIN PB15
115 // #define SPI2_NSS_PIN PB12
117 #define USE_SPI_DEVICE_3
118 #define SPI3_SCK_PIN PB3
119 #define SPI3_MISO_PIN PB4
120 #define SPI3_MOSI_PIN PB5
122 #define ADC1_DMA_OPT 0
125 #define USE_ADC_INTERNAL
127 #define ADC1_INSTANCE ADC1
129 #define VBAT_ADC_PIN PA1
130 #define CURRENT_METER_ADC_PIN PB0
132 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
133 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
135 #define VBAT_SCALE_DEFAULT 110
136 #define CURRENT_METER_SCALE_DEFAULT 800
138 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_LED_STRIP)
140 #define USE_ESCSERIAL
141 #define ENABLE_DSHOT_DMAR DSHOT_DMAR_AUTO
142 #define DSHOT_BITBANG_DEFAULT DSHOT_BITBANG_OFF
144 #define TARGET_IO_PORTA 0xffff
145 #define TARGET_IO_PORTB 0xffff
146 #define TARGET_IO_PORTC 0xffff
147 #define TARGET_IO_PORTD (BIT(2))
149 #define USABLE_TIMER_CHANNEL_COUNT 5
151 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4))