|
| 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 "AEAT" |
| 21 | + |
| 22 | +#define USBD_PRODUCT_STRING "AETAT32" |
| 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 PD15 |
| 43 | +#define LED1 PD14 |
| 44 | + |
| 45 | +// #define BEEPER PB11 |
| 46 | +// #define BEEPER_INVERTED |
| 47 | +// #define BEEPER_PWM_FREQUENCY 2500 //0 Active BB | 2500Hz Passive BB |
| 48 | + |
| 49 | +// *************** Gyro & ACC ********************** |
| 50 | +#define USE_SPI |
| 51 | +#define USE_SPI_DEVICE_1 |
| 52 | + |
| 53 | +#define SPI1_SCK_PIN PA5 |
| 54 | +#define SPI1_MISO_PIN PA6 |
| 55 | +#define SPI1_MOSI_PIN PA7 |
| 56 | +#define SPI1_NSS_PIN PA4 |
| 57 | + |
| 58 | +// MPU6000 |
| 59 | +#define USE_IMU_MPU6000 |
| 60 | +#define IMU_MPU6000_ALIGN CW90_DEG |
| 61 | +#define MPU6000_SPI_BUS BUS_SPI1 |
| 62 | +#define MPU6000_CS_PIN SPI1_NSS_PIN |
| 63 | +// MPU6500 |
| 64 | +#define USE_IMU_MPU6500 |
| 65 | +#define IMU_MPU6500_ALIGN CW90_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 CW90_DEG |
| 72 | +#define ICM42605_SPI_BUS BUS_SPI1 |
| 73 | +#define ICM42605_CS_PIN SPI1_NSS_PIN |
| 74 | + |
| 75 | +// MPU9250 |
| 76 | +#define USE_IMU_MPU9250 |
| 77 | +#define IMU_MPU9250_ALIGN CW90_DEG |
| 78 | +#define MPU9250_SPI_BUS BUS_SPI1 |
| 79 | +#define MPU9250_CS_PIN SPI1_NSS_PIN |
| 80 | + |
| 81 | +// BMI270 |
| 82 | +#define USE_IMU_BMI270 |
| 83 | +#define IMU_BMI270_ALIGN CW0_DEG |
| 84 | +#define BMI270_SPI_BUS BUS_SPI1 |
| 85 | +#define BMI270_CS_PIN SPI1_NSS_PIN |
| 86 | + |
| 87 | +//BMI088 |
| 88 | +#define USE_IMU_BMI088 |
| 89 | + |
| 90 | +#define IMU_BMI088_ALIGN CW90_DEG |
| 91 | +#define BMI088_SPI_BUS BUS_SPI1 |
| 92 | + |
| 93 | +#define BMI088_GYRO_CS_PIN SPI1_NSS_PIN |
| 94 | +#define BMI088_GYRO_EXTI_PIN PA15 |
| 95 | +#define BMI088_ACC_CS_PIN PC13 |
| 96 | +#define BMI088_ACC_EXTI_PIN PD13 |
| 97 | + |
| 98 | +// *************** I2C/Baro/Mag/EXT********************* |
| 99 | +#define USE_I2C |
| 100 | +#define USE_I2C_DEVICE_3 |
| 101 | +#define I2C3_SCL PC0 // SCL pad |
| 102 | +#define I2C3_SDA PC1 // SDA pad |
| 103 | +#define USE_I2C_PULLUP |
| 104 | + |
| 105 | +#define USE_BARO |
| 106 | +#define BARO_I2C_BUS BUS_I2C3 |
| 107 | +#define USE_BARO_BMP280 |
| 108 | +#define USE_BARO_DPS310 |
| 109 | + |
| 110 | +#define USE_MAG |
| 111 | +#define MAG_I2C_BUS BUS_I2C3 |
| 112 | +#define USE_MAG_ALL |
| 113 | + |
| 114 | +// temperature sensors |
| 115 | +//#define TEMPERATURE_I2C_BUS BUS_I2C1 |
| 116 | + |
| 117 | +// air speed sensors |
| 118 | +#define PITOT_I2C_BUS BUS_I2C3 |
| 119 | + |
| 120 | +// ranger sensors |
| 121 | +#define USE_RANGEFINDER |
| 122 | +#define RANGEFINDER_I2C_BUS BUS_I2C3 |
| 123 | + |
| 124 | +// *************** OSD ***************************** |
| 125 | +#define USE_SPI_DEVICE_2 |
| 126 | +#define SPI2_SCK_PIN PD1//PB13 on LQFP64 |
| 127 | +#define SPI2_MISO_PIN PD3//PB14 on LQFP64 |
| 128 | +#define SPI2_MOSI_PIN PD4//PB15 on LQFP64 |
| 129 | +#define SPI2_NSS_PIN PD5 //confirm on lqfp64 |
| 130 | +#define SPI2_SCK_AF GPIO_MUX_6 |
| 131 | +#define SPI2_MISO_AF GPIO_MUX_6 |
| 132 | +#define SPI2_MOSI_AF GPIO_MUX_6 |
| 133 | + |
| 134 | + |
| 135 | +#define USE_MAX7456 |
| 136 | +#define MAX7456_SPI_BUS BUS_SPI2 |
| 137 | +#define MAX7456_CS_PIN SPI2_NSS_PIN |
| 138 | + |
| 139 | + |
| 140 | +// *************** SD/BLACKBOX ************************** |
| 141 | +#define USE_SPI_DEVICE_3 |
| 142 | +#define SPI3_SCK_PIN PC10 |
| 143 | +#define SPI3_MISO_PIN PC11 |
| 144 | +#define SPI3_MOSI_PIN PC12 |
| 145 | +#define SPI3_NSS_PIN PD6 //confirm on lqfp64 |
| 146 | + |
| 147 | +#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT |
| 148 | +#define USE_FLASHFS |
| 149 | +#define USE_FLASH_M25P16 |
| 150 | +#define M25P16_SPI_BUS BUS_SPI3 |
| 151 | +#define M25P16_CS_PIN SPI3_NSS_PIN |
| 152 | + |
| 153 | +#define USE_FLASH_W25N01G |
| 154 | +#define W25N01G_SPI_BUS BUS_SPI3 |
| 155 | +#define W25N01G_CS_PIN SPI3_NSS_PIN |
| 156 | + |
| 157 | +// *************** UART ***************************** |
| 158 | +#define USE_VCP |
| 159 | +#define USB_DETECT_PIN PC14 |
| 160 | +#define USE_USB_DETECT |
| 161 | + |
| 162 | +#define USE_UART1 |
| 163 | +#define UART1_RX_PIN PA10 |
| 164 | +#define UART1_TX_PIN PA9 |
| 165 | + |
| 166 | +#define USE_UART2 |
| 167 | +#define UART2_RX_PIN PA3 |
| 168 | +#define UART2_TX_PIN PA2 |
| 169 | + |
| 170 | +#define USE_UART3 |
| 171 | +#define UART3_RX_PIN PC5 |
| 172 | +#define UART3_TX_PIN PC4 |
| 173 | + |
| 174 | +#define USE_UART4 |
| 175 | +#define UART4_RX_PIN PA1 |
| 176 | +#define UART4_TX_PIN PA0 |
| 177 | + |
| 178 | + |
| 179 | + |
| 180 | +#define USE_UART5 |
| 181 | +#define UART5_RX_PIN PE11 |
| 182 | +#define UART5_TX_PIN PE10 |
| 183 | + |
| 184 | +#define USE_UART7 |
| 185 | +#define UART7_RX_PIN PE7 |
| 186 | +#define UART7_TX_PIN PE8 |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | +#define USE_UART8 |
| 191 | +#define UART8_RX_PIN PC3 |
| 192 | +#define UART8_TX_PIN PC2 |
| 193 | + |
| 194 | +#define SERIAL_PORT_COUNT 8 |
| 195 | + |
| 196 | +#define DEFAULT_RX_TYPE RX_TYPE_SERIAL |
| 197 | +#define SERIALRX_PROVIDER SERIALRX_CRSF |
| 198 | +#define SERIALRX_UART SERIAL_PORT_USART1 |
| 199 | + |
| 200 | +// *************** ADC ***************************** |
| 201 | +#define USE_ADC |
| 202 | +#define ADC_INSTANCE ADC1 |
| 203 | + |
| 204 | +#define ADC1_DMA_STREAM DMA2_CHANNEL1 |
| 205 | +#define ADC_CHANNEL_1_PIN PB0 |
| 206 | +#define ADC_CHANNEL_2_PIN PB1 |
| 207 | +//#define ADC_CHANNEL_3_PIN PB0 |
| 208 | +#define VBAT_ADC_CHANNEL ADC_CHN_1 |
| 209 | +#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2 |
| 210 | +//#define RSSI_ADC_CHANNEL ADC_CHN_3 |
| 211 | + |
| 212 | +#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX) |
| 213 | + |
| 214 | +#define CURRENT_METER_SCALE 240 |
| 215 | +#define CURRENT_METER_OFFSET 1870 //6s Battery |
| 216 | +//#define CURRENT_METER_OFFSET 1300 //4s Battery |
| 217 | + |
| 218 | +#define USE_LED_STRIP |
| 219 | +#define WS2811_PIN PB10 //TIM2_CH3 |
| 220 | + |
| 221 | +// telemetry |
| 222 | +#define USE_SPEKTRUM_BIND |
| 223 | +#define BIND_PIN PA1 //UART4_RX_PIN |
| 224 | + |
| 225 | +#define USE_SERIAL_4WAY_BLHELI_INTERFACE |
| 226 | + |
| 227 | +#define TARGET_IO_PORTA 0xffff |
| 228 | +#define TARGET_IO_PORTB 0xffff |
| 229 | +#define TARGET_IO_PORTC 0xffff |
| 230 | +#define TARGET_IO_PORTD 0xffff |
| 231 | +#define TARGET_IO_PORTE 0xffff |
| 232 | + |
| 233 | +#define MAX_PWM_OUTPUT_PORTS 12 |
| 234 | +#define USE_DSHOT |
| 235 | +#define USE_ESC_SENSOR |
0 commit comments