AIRBOTF435 has AT32F435RMT7 processor (#12570)
[betaflight.git] / src / config / AIRBOTF435 / config.h
bloba04bd5adef06ba58be059463bc8c6de7b8550455
1 /*
2 * This file is part of Betaflight.
4 * Betaflight is free software. You can redistribute this software
5 * and/or modify this software under the terms of the GNU General
6 * Public License as published by the Free Software Foundation,
7 * either version 3 of the License, or (at your option) any later
8 * version.
10 * Betaflight is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * 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
17 * License along with this software.
19 * If not, see <http://www.gnu.org/licenses/>.
22 #pragma once
24 #define FC_TARGET_MCU AT32F435M
26 #define BOARD_NAME AIRBOTF435
27 #define MANUFACTURER_ID AIRB
29 #define USE_ACC
30 #define USE_ACC_SPI_ICM42688P
32 #define USE_BARO
33 #define USE_BARO_DPS310
35 #define USE_GYRO
36 #define USE_GYRO_SPI_ICM42688P
37 #define USE_SPI_GYRO
39 #define USE_FLASH
40 #define USE_FLASH_M25P16
42 #define USE_MAX7456
44 #define BEEPER_PIN PB10
45 #define MOTOR1_PIN PC9
46 #define MOTOR2_PIN PC8
47 #define MOTOR3_PIN PB7
48 #define MOTOR4_PIN PB6
49 #define MOTOR5_PIN PB0
50 #define MOTOR6_PIN PB1
51 #define MOTOR7_PIN PC7
52 #define MOTOR8_PIN PC6
54 #define LED_STRIP_PIN PA15
56 #define UART1_TX_PIN PA9
57 #define UART2_TX_PIN PA2
58 #define UART3_TX_PIN PC10
59 #define UART4_TX_PIN PA0
60 #define UART5_TX_PIN PC12
62 #define UART7_TX_PIN PC0
63 #define UART8_TX_PIN PC2
65 #define UART1_RX_PIN PA10
67 #define UART3_RX_PIN PC11
68 #define UART4_RX_PIN PA1
69 #define UART5_RX_PIN PD2
71 #define UART7_RX_PIN PC1
72 #define UART8_RX_PIN PC3
74 #define I2C1_SCL_PIN PB8
75 #define I2C1_SDA_PIN PB9
77 #define LED0_PIN PC15
79 #define SPI1_SCK_PIN PA5
80 #define SPI2_SCK_PIN PB13
81 #define SPI3_SCK_PIN PB3
83 #define SPI1_SDI_PIN PA6
84 #define SPI2_SDI_PIN PB14
85 #define SPI3_SDI_PIN PB4
87 #define SPI1_SDO_PIN PA7
88 #define SPI2_SDO_PIN PB15
89 #define SPI3_SDO_PIN PB5
91 #define ADC_VBAT_PIN PC4
92 #define ADC_CURR_PIN PA3
94 #define PINIO1_PIN PC11
95 //TODO #define PINIO2_PIN PH3
97 #define FLASH_CS_PIN PC13
98 //TODO #define MAX7456_SPI_CS_PIN PH2
100 #define GYRO_1_EXTI_PIN PB12
101 #define GYRO_1_CS_PIN PC14
103 #define TIMER_PIN_MAPPING TIMER_PIN_MAP( 0, LED_STRIP_PIN, 1, -1 ) \
104 TIMER_PIN_MAP( 1, MOTOR4_PIN, 1, 2 ) \
105 TIMER_PIN_MAP( 2, MOTOR3_PIN, 1, 4 ) \
106 TIMER_PIN_MAP( 3, MOTOR2_PIN, 2, 1 ) \
107 TIMER_PIN_MAP( 4, MOTOR1_PIN, 2, 3 ) \
108 TIMER_PIN_MAP( 5, MOTOR5_PIN, 3, 7 ) \
109 TIMER_PIN_MAP( 6, MOTOR6_PIN, 3, 8 ) \
110 TIMER_PIN_MAP( 7, MOTOR8_PIN, 2, 9 ) \
111 TIMER_PIN_MAP( 8, MOTOR7_PIN, 2, 10 )
115 #define ADC1_DMA_OPT 0
116 #define SPI3_TX_DMA_OPT 5
118 #define ADC_INSTANCE ADC1
119 #define BARO_I2C_INSTANCE (I2CDEV_1)
121 #define FLASH_SPI_INSTANCE SPI3
122 #define GYRO_1_SPI_INSTANCE SPI2
123 #define MAX7456_SPI_INSTANCE SPI1
125 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
127 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
128 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC