AIRBOTF435 has AT32F435RMT7 processor (#12570)
[betaflight.git] / src / config / MATEKH743 / config.h
blob353b77cecd09f06ea5f2d95003f9900f01f092be
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 MATEKH743
27 #define MANUFACTURER_ID MTKS
29 #define USE_ACC
30 #define USE_ACC_SPI_MPU6000
31 #define USE_ACC_SPI_MPU6500
32 #define USE_ACC_SPI_ICM42605
33 #define USE_ACC_SPI_ICM42688P
34 #define USE_GYRO
35 #define USE_GYRO_SPI_MPU6000
36 #define USE_GYRO_SPI_MPU6500
37 #define USE_GYRO_SPI_ICM42605
38 #define USE_GYRO_SPI_ICM42688P
39 #define USE_BARO
40 #define USE_BARO_BMP280
41 #define USE_BARO_DPS310
42 #define USE_MAX7456
43 #define USE_SDCARD
45 #define BEEPER_PIN PA15
46 #define MOTOR1_PIN PB0
47 #define MOTOR2_PIN PB1
48 #define MOTOR3_PIN PA0
49 #define MOTOR4_PIN PA1
50 #define MOTOR5_PIN PA2
51 #define MOTOR6_PIN PA3
52 #define MOTOR7_PIN PD12
53 #define MOTOR8_PIN PD13
54 #define SERVO1_PIN PE5
55 #define SERVO2_PIN PE6
56 #define RX_PPM_PIN PC7
57 #define LED_STRIP_PIN PA8
58 #define UART1_TX_PIN PA9
59 #define UART2_TX_PIN PD5
60 #define UART3_TX_PIN PD8
61 #define UART4_TX_PIN PB9
62 #define UART6_TX_PIN PC6
63 #define UART7_TX_PIN PE8
64 #define UART8_TX_PIN PE1
65 #define UART1_RX_PIN PA10
66 #define UART2_RX_PIN PD6
67 #define UART3_RX_PIN PD9
68 #define UART4_RX_PIN PB8
69 #define UART6_RX_PIN PC7
70 #define UART7_RX_PIN PE7
71 #define UART8_RX_PIN PE0
72 #define I2C1_SCL_PIN PB6
73 #define I2C2_SCL_PIN PB10
74 #define I2C1_SDA_PIN PB7
75 #define I2C2_SDA_PIN PB11
76 #define LED0_PIN PE3
77 #define LED1_PIN PE4
78 #define SPI1_SCK_PIN PA5
79 #define SPI2_SCK_PIN PB13
80 #define SPI3_SCK_PIN PB3
81 #define SPI4_SCK_PIN PE12
82 #define SPI1_SDI_PIN PA6
83 #define SPI2_SDI_PIN PB14
84 #define SPI3_SDI_PIN PB4
85 #define SPI4_SDI_PIN PE13
86 #define SPI1_SDO_PIN PD7
87 #define SPI2_SDO_PIN PB15
88 #define SPI3_SDO_PIN PB5
89 #define SPI4_SDO_PIN PE14
90 #define ADC_VBAT_PIN PC0
91 #define ADC_RSSI_PIN PC5
92 #define ADC_CURR_PIN PC1
93 #define ADC_EXTERNAL1_PIN PC4 //ADC12 AirS
94 #define ADC_EXTERNAL2_PIN PA4 //ADC12 VB2
95 #define ADC_EXTERNAL3_PIN PA7 //ADC12 CU2
96 #define SDIO_CK_PIN PC12
97 #define SDIO_CMD_PIN PD2
98 #define SDIO_D0_PIN PC8
99 #define SDIO_D1_PIN PC9
100 #define SDIO_D2_PIN PC10
101 #define SDIO_D3_PIN PC11
102 #define PINIO1_PIN PD10
103 #define PINIO2_PIN PD11
104 #define MAX7456_SPI_CS_PIN PB12
105 #define GYRO_1_EXTI_PIN PB2
106 #define GYRO_2_EXTI_PIN PE15
107 #define GYRO_1_CS_PIN PC15
108 #define GYRO_2_CS_PIN PE11
109 #define USB_DETECT_PIN PE2
111 #define TIMER_PIN_MAPPING \
112 TIMER_PIN_MAP( 0, PB0 , 2, 0) \
113 TIMER_PIN_MAP( 1, PB1 , 2, 1) \
114 TIMER_PIN_MAP( 2, PA0 , 2, 2) \
115 TIMER_PIN_MAP( 3, PA1 , 2, 3) \
116 TIMER_PIN_MAP( 4, PA2 , 2, 4) \
117 TIMER_PIN_MAP( 5, PA3 , 2, 5) \
118 TIMER_PIN_MAP( 6, PD12, 1, 6) \
119 TIMER_PIN_MAP( 7, PD13, 1, 7) \
120 TIMER_PIN_MAP( 8, PD14, 1, 12) \
121 TIMER_PIN_MAP( 9, PD15, 1, -1) \
122 TIMER_PIN_MAP(10, PE5 , 1, 0) \
123 TIMER_PIN_MAP(11, PE6 , 1, -1) \
124 TIMER_PIN_MAP(12, PA8 , 1, 14) \
125 TIMER_PIN_MAP(13, PA15, 1, 0) \
126 TIMER_PIN_MAP(14, PC7 , 2, 0) \
127 TIMER_PIN_MAP(15, PC6 , 2, 0) \
128 TIMER_PIN_MAP(16, PB8 , 1, 0) \
129 TIMER_PIN_MAP(17, PB9 , 1, 0)
133 #define ADC1_DMA_OPT 8
134 #define ADC3_DMA_OPT 9
135 #define TIMUP1_DMA_OPT 0
136 #define TIMUP2_DMA_OPT 0
137 #define TIMUP3_DMA_OPT 2
138 #define TIMUP4_DMA_OPT 1
139 #define TIMUP5_DMA_OPT 0
140 #define TIMUP8_DMA_OPT 0
142 #define BARO_I2C_INSTANCE (I2CDEV_2)
143 #define MAG_I2C_INSTANCE (I2CDEV_1)
145 #define USE_SOFTSERIAL1
146 #define SOFTSERIAL1_TX_PIN PC6 // TX6 Pad
147 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
148 // #define SERIALRX_PROVIDER SERIALRX_SBUS
149 #define SERIALRX_UART SERIAL_PORT_USART6
151 #define DEFAULT_BLACKBOX_DEVICE BLACKBOX_DEVICE_SDCARD
152 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
153 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
154 #define DEFAULT_VOLTAGE_METER_SCALE_DEFAULT 110
155 #define DEFAULT_CURRENT_METER_SCALE 250
156 #define BEEPER_INVERTED
157 #define BEEPER_PWM_HZ 2500
159 #define SDCARD_DETECT_PIN NONE
160 #define SDIO_DEVICE SDIODEV_1
161 #define SDIO_USE_4BIT 1
162 #define MAX7456_SPI_INSTANCE SPI2
164 #define PINIO1_BOX 40
165 #define PINIO2_BOX 41
166 #define USE_SPI_GYRO
167 #define GYRO_1_SPI_INSTANCE SPI1
168 #define GYRO_1_ALIGN CW0_DEG_FLIP
169 #define GYRO_1_ALIGN_PITCH 1800
170 #define GYRO_2_SPI_INSTANCE SPI4
171 #define GYRO_2_ALIGN CW0_DEG_FLIP
172 #define GYRO_2_ALIGN_PITCH 1800
173 #define DEFAULT_GYRO_TO_USE GYRO_CONFIG_USE_GYRO_1
175 #define USE_MPU_DATA_READY_SIGNAL
176 #define ENSURE_MPU_DATA_READY_IS_LOW