2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
23 #define USE_TARGET_CONFIG
24 #undef USE_MSP_DISPLAYPORT
27 #define TARGET_BOARD_IDENTIFIER "MLTE"
29 #define TARGET_BOARD_IDENTIFIER "MLTY"
32 #define USBD_PRODUCT_STRING "MotoLabF4"
38 #define BEEPER_PIN PB4
39 #define BEEPER_INVERTED
41 #define GYRO_1_CS_PIN PA4
42 #define GYRO_1_SPI_INSTANCE SPI1
45 #define USE_ACC_SPI_MPU6000
46 #define GYRO_1_ALIGN CW180_DEG
49 #define USE_GYRO_SPI_MPU6000
52 #define GYRO_1_EXTI_PIN PC5
53 //#define ENSURE_MPU_DATA_READY_IS_LOW
54 //#define EXTI_CALLBACK_HANDLER_COUNT 1 // MPU data ready
56 #define USE_SPI_DEVICE_3 // MAX7456 on V1.2
57 #define SPI3_NSS_PIN PA15
58 #define SPI3_SCK_PIN PC10
59 #define SPI3_MISO_PIN PC11
60 #define SPI3_MOSI_PIN PC12
63 #define MAX7456_SPI_INSTANCE SPI3
64 #define MAX7456_SPI_CS_PIN SPI3_NSS_PIN
67 //#define USB_DETECT_PIN PC15
68 //#define USE_USB_DETECT
71 #define UART1_RX_PIN PA10
72 #define UART1_TX_PIN PA9
75 #define UART2_RX_PIN PA3
76 #define UART2_TX_PIN PA2
78 // Pins are available, not connected
80 //#define UART3_RX_PIN PB11
81 //#define UART3_TX_PIN PB10
84 #define UART4_RX_PIN PA1
85 #define UART4_TX_PIN PA0
88 #define UART5_RX_PIN PD2
89 #define UART5_TX_PIN PC12 // not connected
93 #define UART6_RX_PIN PC7
94 #define UART6_TX_PIN PC6
95 #define SERIAL_PORT_COUNT 6 //VCP, USART1, USART2, UART4, UART5, USART6
97 #define SERIAL_PORT_COUNT 5 //VCP, USART1, USART2, UART4, UART5
98 #define USE_VTX_RTC6705
99 #define USE_VTX_RTC6705_SOFTSPI
100 #define RTC6705_SPI_MOSI_PIN PC6
101 #define RTC6705_SPICLK_PIN PC2
102 #define RTC6705_CS_PIN PC7
105 #define USE_ESCSERIAL
106 #define ESCSERIAL_TIMER_TX_PIN PB8
109 #define USE_SPI_DEVICE_1 // MPU6000
110 #define USE_SPI_DEVICE_2 // SDcard
113 #define USE_SDCARD_SPI
114 #define SDCARD_DETECT_INVERTED
115 #define SDCARD_DETECT_PIN PC13
116 #define SDCARD_SPI_INSTANCE SPI2
117 #define SDCARD_SPI_CS_PIN PB12
118 #define SDCARD_SPI_CS_CFG IOCFG_OUT_OD
119 #define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
121 // Pins are available unless USART3 is connected, not connected
123 //#define I2C_DEVICE (I2CDEV_2)
126 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
127 #define VBAT_ADC_PIN PC0
128 #define CURRENT_METER_ADC_PIN PC1
129 // Reserved pins, not connected
130 //#define RSSI_ADC_PIN PC2
132 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
133 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
134 #define SERIALRX_PROVIDER SERIALRX_SBUS
135 #define SERIALRX_UART SERIAL_PORT_UART5
136 #define SBUS_TELEMETRY_UART SERIAL_PORT_UART4
137 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD)
138 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
139 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
140 #define CURRENT_METER_SCALE_DEFAULT 140
142 #define TARGET_IO_PORTA 0xffff
143 #define TARGET_IO_PORTB 0xffff
144 #define TARGET_IO_PORTC 0xffff
145 #define TARGET_IO_PORTD (BIT(2))
147 #define USABLE_TIMER_CHANNEL_COUNT 8
148 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) )