2 * This file is part of Cleanflight.
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.
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.
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/>.
20 #define TARGET_BOARD_IDENTIFIER "M41T"
21 #define USBD_PRODUCT_STRING "MatekF411TE"
27 #define BEEPER_INVERTED
29 // *************** SPI2 IMU OSD **********************
31 #define USE_SPI_DEVICE_2
32 #define SPI2_SCK_PIN PB13
33 #define SPI2_MISO_PIN PB14
34 #define SPI2_MOSI_PIN PB15
36 #define USE_IMU_BMI270
37 #define BMI270_SPI_BUS BUS_SPI2
38 #define BMI270_CS_PIN PC13
39 #define IMU_BMI270_ALIGN CW270_DEG_FLIP
41 #define USE_IMU_ICM42605
42 #define ICM42605_SPI_BUS BUS_SPI2
43 #define ICM42605_CS_PIN PC13
44 #define IMU_ICM42605_ALIGN CW180_DEG_FLIP
47 #define MAX7456_SPI_BUS BUS_SPI2
48 #define MAX7456_CS_PIN PB12
50 // *************** UART *****************************
54 #define UART1_TX_PIN PA9
55 #define UART1_RX_PIN PA10
58 #define UART2_TX_PIN PA2
59 #define UART2_RX_PIN PA3
61 #define USE_SOFTSERIAL1
62 #define SOFTSERIAL_1_TX_PIN PA0
63 #define SOFTSERIAL_1_RX_PIN PA1
65 #define USE_SOFTSERIAL2
66 #define SOFTSERIAL_2_TX_PIN PA15
67 #define SOFTSERIAL_2_RX_PIN PB3
69 #define SERIAL_PORT_COUNT 5
71 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
72 #define SERIALRX_PROVIDER SERIALRX_CRSF
73 #define SERIALRX_UART SERIAL_PORT_USART2
75 // *************** I2C /Baro/Mag/Pitot ********************
77 #define USE_I2C_DEVICE_1
81 #define DEFAULT_I2C_BUS BUS_I2C1
84 #define BARO_I2C_BUS BUS_I2C1
85 #define USE_BARO_BMP280
86 #define USE_BARO_MS5611
87 #define USE_BARO_SPL06
90 #define MAG_I2C_BUS BUS_I2C1
93 #define PITOT_I2C_BUS BUS_I2C1
94 #define TEMPERATURE_I2C_BUS BUS_I2C1
96 #define USE_RANGEFINDER
97 #define USE_RANGEFINDER_MSP
98 #define RANGEFINDER_I2C_BUS BUS_I2C1
100 // *************** ADC *****************************
102 #define ADC_INSTANCE ADC1
103 #define ADC1_DMA_STREAM DMA2_Stream0
105 #define ADC_CHANNEL_1_PIN PA4
106 #define ADC_CHANNEL_2_PIN PA5
107 #define ADC_CHANNEL_3_PIN PA6
108 #define ADC_CHANNEL_4_PIN PA7
110 #define VBAT_ADC_CHANNEL ADC_CHN_1
111 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
112 #define RSSI_ADC_CHANNEL ADC_CHN_3
113 #define AIRSPEED_ADC_CHANNEL ADC_CHN_4
115 // *************** LED2812 ************************
116 #define USE_LED_STRIP
117 #define WS2811_PIN PA8
119 // *************** PINIO ***************************
122 #define PINIO1_PIN PC15 // power switch
123 #define PINIO2_PIN PB10 // Camera switch
125 // *************** OTHERS *************************
126 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL )
128 #define VBAT_SCALE_DEFAULT 1100
129 #define CURRENT_METER_SCALE 250 //F411-WTE 132A
132 #define USE_ESC_SENSOR
133 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
135 #define TARGET_IO_PORTA 0xffff
136 #define TARGET_IO_PORTB 0xffff
137 #define TARGET_IO_PORTC 0xffff
138 #define TARGET_IO_PORTD (BIT(2))
140 #define MAX_PWM_OUTPUT_PORTS 6