AIRBOTF435 has AT32F435RMT7 processor (#12570)
[betaflight.git] / src / config / SKYSTARSH7HD / config.h
blob6e7d2f7f9553513fb797f060bb1719a4f4d3009a
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 STM32H743
26 #define BOARD_NAME SKYSTARSH7HD
27 #define MANUFACTURER_ID SKST
29 #define USE_GYRO
30 #define USE_ACC
31 #define USE_ACCGYRO_BMI270
32 #define USE_BARO
33 #define USE_BARO_BMP280
34 #define USE_FLASH
35 #define USE_FLASH_W25Q128FV
36 #define USE_MAX7456
38 #define BEEPER_PIN PB3
39 #define MOTOR1_PIN PB0
40 #define MOTOR2_PIN PB1
41 #define MOTOR3_PIN PD12
42 #define MOTOR4_PIN PD13
43 #define MOTOR5_PIN PA0
44 #define MOTOR6_PIN PA1
45 #define MOTOR7_PIN PA2
46 #define MOTOR8_PIN PA3
47 #define SERVO1_PIN PE5
48 #define SERVO2_PIN PE6
49 #define RX_PPM_PIN PC7
50 #define LED_STRIP_PIN PA8
51 #define UART1_TX_PIN PA9
52 #define UART2_TX_PIN PD5
53 #define UART3_TX_PIN PD8
54 #define UART4_TX_PIN PD1
55 #define UART5_TX_PIN PB6
56 #define UART6_TX_PIN PC6
57 #define UART7_TX_PIN PE8
58 #define UART8_TX_PIN PE1
59 #define UART1_RX_PIN PA10
60 #define UART2_RX_PIN PD6
61 #define UART3_RX_PIN PD9
62 #define UART4_RX_PIN PD0
63 #define UART5_RX_PIN PB5
64 #define UART6_RX_PIN PC7
65 #define UART7_RX_PIN PE7
66 #define UART8_RX_PIN PE0
67 #define I2C1_SCL_PIN PB8
68 #define I2C2_SCL_PIN PB10
69 #define I2C1_SDA_PIN PB9
70 #define I2C2_SDA_PIN PB11
71 #define LED0_PIN PE3
72 #define LED1_PIN PE4
73 #define SPI1_SCK_PIN PA5
74 #define SPI2_SCK_PIN PB13
75 #define SPI3_SCK_PIN PC10
76 #define SPI4_SCK_PIN PE12
77 #define SPI1_SDI_PIN PA6
78 #define SPI2_SDI_PIN PB14
79 #define SPI3_SDI_PIN PC11
80 #define SPI4_SDI_PIN PE13
81 #define SPI1_SDO_PIN PD7
82 #define SPI2_SDO_PIN PB15
83 #define SPI3_SDO_PIN PC12
84 #define SPI4_SDO_PIN PE14
85 #define ADC_VBAT_PIN PC0
86 #define ADC_RSSI_PIN PC3
87 #define ADC_CURR_PIN PC1
88 #define ADC_EXTERNAL1_PIN PC4
89 #define PINIO1_PIN PC5
90 #define PINIO2_PIN PC2
91 #define PINIO3_PIN PD11
92 #define FLASH_CS_PIN PA15
93 #define MAX7456_SPI_CS_PIN PB12
94 #define GYRO_1_EXTI_PIN PB2
95 #define GYRO_2_EXTI_PIN PE15
96 #define GYRO_1_CS_PIN PC15
97 #define GYRO_2_CS_PIN PE11
98 #define USB_DETECT_PIN PE2
100 #define TIMER_PIN_MAPPING \
101 TIMER_PIN_MAP( 0, PB0 , 2, 0) \
102 TIMER_PIN_MAP( 1, PB1 , 2, 1) \
103 TIMER_PIN_MAP( 2, PA0 , 2, 2) \
104 TIMER_PIN_MAP( 3, PA1 , 2, 3) \
105 TIMER_PIN_MAP( 4, PA2 , 2, 4) \
106 TIMER_PIN_MAP( 5, PA3 , 2, 5) \
107 TIMER_PIN_MAP( 6, PD12, 1, 6) \
108 TIMER_PIN_MAP( 7, PD13, 1, 7) \
109 TIMER_PIN_MAP( 8, PD14, 1, 12) \
110 TIMER_PIN_MAP( 9, PD15, 1, -1) \
111 TIMER_PIN_MAP(10, PE5 , 1, 0) \
112 TIMER_PIN_MAP(11, PE6 , 1, -1) \
113 TIMER_PIN_MAP(12, PA8 , 1, 14) \
114 TIMER_PIN_MAP(13, PA15, 1, 0) \
115 TIMER_PIN_MAP(14, PC7 , 2, 0) \
116 TIMER_PIN_MAP(15, PC6 , 2, 0) \
117 TIMER_PIN_MAP(16, PB8 , 1, 0) \
118 TIMER_PIN_MAP(17, PB9 , 1, 0)
121 #define ADC1_DMA_OPT 8
122 #define ADC3_DMA_OPT 9
123 #define TIMUP1_DMA_OPT 0
124 #define TIMUP2_DMA_OPT 0
125 #define TIMUP3_DMA_OPT 2
126 #define TIMUP4_DMA_OPT 1
127 #define TIMUP5_DMA_OPT 0
128 #define TIMUP8_DMA_OPT 0
130 #define DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_BOTH
131 //TODO #define MAG_BUSTYPE I2C
132 #define MAG_I2C_INSTANCE (I2CDEV_1)
133 #define BARO_I2C_INSTANCE (I2CDEV_2)
134 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_FLASH
135 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
136 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
137 #define DEFAULT_CURRENT_METER_SCALE 290
138 #define BEEPER_INVERTED
139 #define MAX7456_SPI_INSTANCE SPI2
140 #define PINIO1_BOX 40
141 #define PINIO2_BOX 41
142 #define FLASH_SPI_INSTANCE SPI3
143 #define USE_SPI_GYRO
144 #define GYRO_1_SPI_INSTANCE SPI1
145 #define GYRO_1_ALIGN CW90_DEG
146 #define GYRO_1_ALIGN_YAW 900
147 #define GYRO_2_SPI_INSTANCE SPI4