|
| 1 | +/* |
| 2 | + * This file is part of Cleanflight. |
| 3 | + * |
| 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. |
| 8 | + * |
| 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. |
| 13 | + * |
| 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/>. |
| 16 | + */ |
| 17 | + |
| 18 | +#pragma once |
| 19 | + |
| 20 | +#define TARGET_BOARD_IDENTIFIER "NERC" |
| 21 | + |
| 22 | +#define USBD_PRODUCT_STRING "NeuronRC F435 MINI" |
| 23 | + |
| 24 | +/**********swd debuger reserved ***************** |
| 25 | + * |
| 26 | + * pa13 swdio |
| 27 | + * pa14 swclk |
| 28 | + * PA15 JTDI |
| 29 | + * PB4 JREST |
| 30 | + * pb3 swo /DTO |
| 31 | +
|
| 32 | + * other pin |
| 33 | + * |
| 34 | + * PB2 ->BOOT0 button |
| 35 | + * PA8 MCO1 |
| 36 | + * PA11 OTG1 D+ DP |
| 37 | + * PA10 OTG1 D- DN |
| 38 | + * PH0 HEXT IN |
| 39 | + * PH1 HEXT OUT |
| 40 | + */ |
| 41 | + |
| 42 | +#define LED0 PC13 |
| 43 | +#define LED1 PC14 |
| 44 | +#define LED0_INVERTED |
| 45 | +#define LED1_INVERTED |
| 46 | + |
| 47 | +#define BEEPER PC15 |
| 48 | +#define BEEPER_INVERTED |
| 49 | + |
| 50 | +// *************** Gyro & ACC ********************** |
| 51 | +#define USE_SPI |
| 52 | +#define USE_SPI_DEVICE_1 |
| 53 | + |
| 54 | +#define SPI1_SCK_PIN PA5 |
| 55 | +#define SPI1_MISO_PIN PA6 |
| 56 | +#define SPI1_MOSI_PIN PA7 |
| 57 | +#define SPI1_NSS_PIN PA4 |
| 58 | + |
| 59 | +// #define USE_EXTI |
| 60 | +// #define GYRO_INT_EXTI PA15 |
| 61 | +// #define USE_MPU_DATA_READY_SIGNAL |
| 62 | + |
| 63 | +// MPU6500 |
| 64 | +#define USE_IMU_MPU6500 |
| 65 | +#define IMU_MPU6500_ALIGN CW0_DEG |
| 66 | +#define MPU6500_SPI_BUS BUS_SPI1 |
| 67 | +#define MPU6500_CS_PIN SPI1_NSS_PIN |
| 68 | + |
| 69 | +// ICM42605/ICM42688P |
| 70 | +#define USE_IMU_ICM42605 |
| 71 | +#define IMU_ICM42605_ALIGN CW0_DEG |
| 72 | +#define ICM42605_SPI_BUS BUS_SPI1 |
| 73 | +#define ICM42605_CS_PIN SPI1_NSS_PIN |
| 74 | +// #define ICM42605_EXTI_PIN GYRO_INT_EXTI |
| 75 | + |
| 76 | +// BMI270 |
| 77 | +#define USE_IMU_BMI270 |
| 78 | +#define IMU_BMI270_ALIGN CW0_DEG |
| 79 | +#define BMI270_SPI_BUS BUS_SPI1 |
| 80 | +#define BMI270_CS_PIN SPI1_NSS_PIN |
| 81 | + |
| 82 | +// LSM6DXX |
| 83 | +#define USE_IMU_LSM6DXX |
| 84 | +#define IMU_LSM6DXX_ALIGN CW0_DEG |
| 85 | +#define LSM6DXX_CS_PIN SPI1_NSS_PIN |
| 86 | +#define LSM6DXX_SPI_BUS BUS_SPI1 |
| 87 | + |
| 88 | + |
| 89 | +// *************** I2C/Baro/Mag/EXT********************* |
| 90 | +#define USE_I2C |
| 91 | +#define USE_I2C_DEVICE_2 |
| 92 | +#define I2C2_SCL PH2 // SCL pad |
| 93 | +#define I2C2_SDA PH3 // SDA pad |
| 94 | +#define USE_I2C_PULLUP |
| 95 | + |
| 96 | +#define USE_BARO |
| 97 | +#define BARO_I2C_BUS BUS_I2C2 |
| 98 | +#define USE_BARO_BMP280 |
| 99 | +#define USE_BARO_DPS310 |
| 100 | + |
| 101 | +#define USE_MAG |
| 102 | +#define MAG_I2C_BUS BUS_I2C2 |
| 103 | +#define USE_MAG_HMC5883 |
| 104 | +#define USE_MAG_QMC5883 |
| 105 | +#define DEFAULT_I2C_BUS BUS_I2C2 |
| 106 | + |
| 107 | +// temperature sensors |
| 108 | +//#define TEMPERATURE_I2C_BUS BUS_I2C1 |
| 109 | +// air speed sensors |
| 110 | +//#define PITOT_I2C_BUS BUS_I2C1 |
| 111 | +// ranger sensors |
| 112 | +//#define USE_RANGEFINDER |
| 113 | +//#define RANGEFINDER_I2C_BUS BUS_I2C1 |
| 114 | + |
| 115 | +// *************** OSD ***************************** |
| 116 | +#define USE_SPI_DEVICE_2 |
| 117 | +#define SPI2_SCK_PIN PB13 |
| 118 | +#define SPI2_MISO_PIN PB14 |
| 119 | +#define SPI2_MOSI_PIN PB15 |
| 120 | +#define SPI2_NSS_PIN PB12 |
| 121 | + |
| 122 | +#define USE_MAX7456 |
| 123 | +#define MAX7456_SPI_BUS BUS_SPI2 |
| 124 | +#define MAX7456_CS_PIN SPI2_NSS_PIN |
| 125 | + |
| 126 | + |
| 127 | +// *************** SD/BLACKBOX ************************** |
| 128 | + |
| 129 | +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT |
| 130 | +#define USE_FLASHFS |
| 131 | +#define USE_FLASH_M25P16 |
| 132 | +#define M25P16_SPI_BUS BUS_SPI2 |
| 133 | +#define M25P16_CS_PIN PB5 |
| 134 | + |
| 135 | +#define USE_FLASH_W25N01G |
| 136 | +#define W25N01G_SPI_BUS BUS_SPI2 |
| 137 | +#define W25N01G_CS_PIN PB5 |
| 138 | + |
| 139 | +// *************** UART ***************************** |
| 140 | +#define USE_VCP |
| 141 | +//#define USB_DETECT_PIN PC14 |
| 142 | +#define USE_USB_DETECT |
| 143 | + |
| 144 | +#define USE_UART1 |
| 145 | +#define UART1_RX_PIN PB7 |
| 146 | +#define UART1_TX_PIN PA9 |
| 147 | + |
| 148 | +#define USE_UART2 |
| 149 | +#define UART2_RX_PIN PB0 |
| 150 | +#define UART2_TX_PIN PA2 |
| 151 | + |
| 152 | +#define USE_UART3 |
| 153 | +#define UART3_RX_PIN PB11 |
| 154 | +#define UART3_TX_PIN PB10 |
| 155 | + |
| 156 | +#define USE_UART5 |
| 157 | +#define UART5_RX_PIN PB8 |
| 158 | +#define UART5_TX_PIN PB9 |
| 159 | + |
| 160 | +#define USE_UART7 |
| 161 | +#define UART7_RX_PIN PB3 |
| 162 | +#define UART7_TX_PIN PB4 |
| 163 | + |
| 164 | +#define SERIAL_PORT_COUNT 6 |
| 165 | + |
| 166 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 167 | +#define SERIALRX_PROVIDER SERIALRX_CRSF |
| 168 | +#define SERIALRX_UART SERIAL_PORT_USART7 |
| 169 | + |
| 170 | +// *************** ADC ***************************** |
| 171 | +#define USE_ADC |
| 172 | +#define ADC_INSTANCE ADC1 |
| 173 | + |
| 174 | +#define ADC1_DMA_STREAM DMA2_CHANNEL5 |
| 175 | +#define ADC_CHANNEL_1_PIN PA0 |
| 176 | +#define ADC_CHANNEL_2_PIN PA1 |
| 177 | +//#define ADC_CHANNEL_3_PIN PB0 |
| 178 | +#define VBAT_ADC_CHANNEL ADC_CHN_1 |
| 179 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2 |
| 180 | +//#define RSSI_ADC_CHANNEL ADC_CHN_3 |
| 181 | + |
| 182 | +#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD ) |
| 183 | + |
| 184 | +// #define USE_LED_STRIP |
| 185 | +// #define WS2811_PIN PB10 //TIM2_CH3 |
| 186 | + |
| 187 | +// #define USE_SPEKTRUM_BIND |
| 188 | +// #define BIND_PIN PA3 //UART2_RX_PIN |
| 189 | + |
| 190 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 191 | + |
| 192 | +#define TARGET_IO_PORTA 0xffff |
| 193 | +#define TARGET_IO_PORTB 0xffff |
| 194 | +#define TARGET_IO_PORTC 0xffff |
| 195 | +#define TARGET_IO_PORTD 0xffff |
| 196 | +#define TARGET_IO_PORTE BIT(2) |
| 197 | +#define TARGET_IO_PORTH BIT(1)|BIT(2)|BIT(3) |
| 198 | + |
| 199 | +#define MAX_PWM_OUTPUT_PORTS 8 |
| 200 | +#define USE_DSHOT |
| 201 | +#define USE_ESC_SENSOR |
0 commit comments