2 * This file is part of INAV.
4 * INAV 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.
9 * INAV 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.
14 * You should have received a copy of the GNU General Public License
15 * along with INAV. If not, see <http://www.gnu.org/licenses/>.
20 #ifdef MAMBAH743_2022B
22 #define TARGET_BOARD_IDENTIFIER "M743"
23 #define USBD_PRODUCT_STRING "MAMBAH743_2022B"
25 #elif defined(MAMBAH743_2022B_GYRO2)
27 #define TARGET_BOARD_IDENTIFIER "M743"
28 #define USBD_PRODUCT_STRING "MAMBAH743_2022B_GYRO2"
32 #define TARGET_BOARD_IDENTIFIER "M743"
33 #define USBD_PRODUCT_STRING "MAMBAH743"
37 #define USE_TARGET_CONFIG
43 #define BEEPER_INVERTED
45 // *************** IMU generic ***********************
47 #define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
49 // *************** SPI1 IMU0 MPU6000 ****************
51 #define USE_SPI_DEVICE_1
52 #define SPI1_SCK_PIN PA5
53 #define SPI1_MISO_PIN PA6
54 #define SPI1_MOSI_PIN PA7
56 #define USE_IMU_MPU6000
57 #define IMU_MPU6000_ALIGN CW180_DEG
58 #define MPU6000_SPI_BUS BUS_SPI1
59 #define MPU6000_CS_PIN PA4
61 #define USE_IMU_BMI270
62 #define IMU_BMI270_ALIGN CW180_DEG
63 #define BMI270_SPI_BUS BUS_SPI1
64 #define BMI270_CS_PIN PA4
66 #define USE_SPI_DEVICE_4
67 #define SPI4_SCK_PIN PE12
68 #define SPI4_MISO_PIN PE13
69 #define SPI4_MOSI_PIN PE14
71 #ifdef MAMBAH743_2022B
73 #define USE_IMU_ICM42605
74 #define IMU_ICM42605_ALIGN CW0_DEG
75 #define ICM42605_SPI_BUS BUS_SPI1
76 #define ICM42605_CS_PIN PA4
80 #ifdef MAMBAH743_2022B_GYRO2
82 #define USE_IMU_ICM42605
83 #define IMU_ICM42605_ALIGN CW270_DEG
84 #define ICM42605_SPI_BUS BUS_SPI4
85 #define ICM42605_CS_PIN PE11
89 // *************** SPI2 OSD ***********************
90 #define USE_SPI_DEVICE_2
91 #define SPI2_SCK_PIN PB13
92 #define SPI2_MISO_PIN PB14
93 #define SPI2_MOSI_PIN PB15
96 #define MAX7456_SPI_BUS BUS_SPI2
97 #define MAX7456_CS_PIN PB12
99 // *************** SPI3 FLASH ***********************
100 #define USE_SPI_DEVICE_3
101 #define SPI3_SCK_PIN PC10
102 #define SPI3_MISO_PIN PC11
103 #define SPI3_MOSI_PIN PB2
104 #define SPI3_NSS_PIN PA15
105 #define SPI3_SCK_AF GPIO_AF6_SPI3
106 #define SPI3_MISO_AF GPIO_AF6_SPI3
107 #define SPI3_MOSI_AF GPIO_AF7_SPI3
109 #define M25P16_SPI_BUS BUS_SPI3
110 #define M25P16_CS_PIN SPI3_NSS_PIN
112 #define W25N01G_SPI_BUS BUS_SPI3
113 #define W25N01G_CS_PIN SPI3_NSS_PIN
117 #define USE_FLASH_M25P16
118 #define USE_FLASH_W25N01G
119 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
121 // *************** I2C /Baro/Mag *********************
123 #define USE_I2C_DEVICE_1
127 #define USE_I2C_DEVICE_2
128 #define I2C2_SCL PB10
129 #define I2C2_SDA PB11
132 #define BARO_I2C_BUS BUS_I2C1
133 #define USE_BARO_BMP280
134 #define USE_BARO_MS5611
135 #define USE_BARO_DPS310
136 #define USE_BARO_SPL06
139 #define MAG_I2C_BUS BUS_I2C1
142 #define TEMPERATURE_I2C_BUS BUS_I2C1
143 #define PITOT_I2C_BUS BUS_I2C1
145 #define USE_RANGEFINDER
146 #define RANGEFINDER_I2C_BUS BUS_I2C1
148 // *************** UART *****************************
152 #define UART1_TX_PIN PA9
153 #define UART1_RX_PIN PA10
156 #define UART2_TX_PIN PD5
157 #define UART2_RX_PIN PD6
160 #define UART3_TX_PIN PD8
161 #define UART3_RX_PIN PD9
164 #define UART4_TX_PIN PD1
165 #define UART4_RX_PIN PD0
168 #define UART5_TX_PIN PC12
169 #define UART5_RX_PIN PD2
172 #define UART6_TX_PIN PC6
173 #define UART6_RX_PIN PC7
176 #define UART7_TX_PIN PE8
177 #define UART7_RX_PIN PE7
180 #define UART8_TX_PIN PE1
181 #define UART8_RX_PIN PE0
183 #define SERIAL_PORT_COUNT 9
185 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
186 #define SERIALRX_PROVIDER SERIALRX_SBUS
188 // *************** ADC *****************************
190 #define ADC_INSTANCE ADC3
192 #if defined(MAMBAH743_2022B) || defined(MAMBAH743_2022B_GYRO2)
194 #define ADC_CHANNEL_1_PIN PC1
195 #define ADC_CHANNEL_2_PIN PC3
196 #define ADC_CHANNEL_3_PIN PC0
198 #define VBAT_ADC_CHANNEL ADC_CHN_1
199 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
200 #define AIRSPEED_ADC_CHANNEL ADC_CHN_3
204 #define ADC_CHANNEL_1_PIN PC1
205 #define ADC_CHANNEL_2_PIN PC3
206 #define ADC_CHANNEL_3_PIN PC2
207 #define ADC_CHANNEL_4_PIN PC0
209 #define VBAT_ADC_CHANNEL ADC_CHN_1
210 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
211 #define RSSI_ADC_CHANNEL ADC_CHN_3
212 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
216 // *************** PINIO ***************************
220 #if defined(MAMBAH743_2022B) || defined(MAMBAH743_2022B_GYRO2)
222 #define PINIO1_PIN PC2
223 #define PINIO2_PIN PC5
227 #define PINIO1_PIN PC5
231 // *************** LEDSTRIP ************************
232 #define USE_LED_STRIP
233 #define WS2811_PIN PA8
235 #define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL)
236 #define CURRENT_METER_SCALE 250
238 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
240 #define TARGET_IO_PORTA 0xffff
241 #define TARGET_IO_PORTB 0xffff
242 #define TARGET_IO_PORTC 0xffff
243 #define TARGET_IO_PORTD 0xffff
244 #define TARGET_IO_PORTE 0xffff
246 #define MAX_PWM_OUTPUT_PORTS 8
248 #define USE_ESC_SENSOR