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
54 #define GYRO_1_EXTI_PIN PC5
55 #define USE_MPU_DATA_READY_SIGNAL
56 //#define ENSURE_MPU_DATA_READY_IS_LOW
57 //#define EXTI_CALLBACK_HANDLER_COUNT 1 // MPU data ready
59 #define USE_SPI_DEVICE_3 // MAX7456 on V1.2
60 #define SPI3_NSS_PIN PA15
61 #define SPI3_SCK_PIN PC10
62 #define SPI3_MISO_PIN PC11
63 #define SPI3_MOSI_PIN PC12
66 #define MAX7456_SPI_INSTANCE SPI3
67 #define MAX7456_SPI_CS_PIN SPI3_NSS_PIN
70 //#define USB_DETECT_PIN PC15
71 //#define USE_USB_DETECT
74 #define UART1_RX_PIN PA10
75 #define UART1_TX_PIN PA9
78 #define UART2_RX_PIN PA3
79 #define UART2_TX_PIN PA2
81 // Pins are available, not connected
83 //#define UART3_RX_PIN PB11
84 //#define UART3_TX_PIN PB10
87 #define UART4_RX_PIN PA1
88 #define UART4_TX_PIN PA0
91 #define UART5_RX_PIN PD2
92 #define UART5_TX_PIN PC12 // not connected
96 #define UART6_RX_PIN PC7
97 #define UART6_TX_PIN PC6
98 #define SERIAL_PORT_COUNT 6 //VCP, USART1, USART2, UART4, UART5, USART6
100 #define SERIAL_PORT_COUNT 5 //VCP, USART1, USART2, UART4, UART5
101 #define USE_VTX_RTC6705
102 #define USE_VTX_RTC6705_SOFTSPI
103 #define RTC6705_SPI_MOSI_PIN PC6
104 #define RTC6705_SPICLK_PIN PC2
105 #define RTC6705_CS_PIN PC7
108 #define USE_ESCSERIAL
109 #define ESCSERIAL_TIMER_TX_PIN PB8
112 #define USE_SPI_DEVICE_1 // MPU6000
113 #define USE_SPI_DEVICE_2 // SDcard
116 #define USE_SDCARD_SPI
117 #define SDCARD_DETECT_INVERTED
118 #define SDCARD_DETECT_PIN PC13
119 #define SDCARD_SPI_INSTANCE SPI2
120 #define SDCARD_SPI_CS_PIN PB12
121 #define SDCARD_SPI_CS_CFG IOCFG_OUT_OD
122 #define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel 0
124 // Pins are available unless USART3 is connected, not connected
126 //#define I2C_DEVICE (I2CDEV_2)
129 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
130 #define VBAT_ADC_PIN PC0
131 #define CURRENT_METER_ADC_PIN PC1
132 // Reserved pins, not connected
133 //#define RSSI_ADC_PIN PC2
135 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
136 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
137 #define SERIALRX_PROVIDER SERIALRX_SBUS
138 #define SERIALRX_UART SERIAL_PORT_UART5
139 #define SBUS_TELEMETRY_UART SERIAL_PORT_UART4
140 #define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD)
141 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
142 #define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
143 #define CURRENT_METER_SCALE_DEFAULT 140
145 #define TARGET_IO_PORTA 0xffff
146 #define TARGET_IO_PORTB 0xffff
147 #define TARGET_IO_PORTC 0xffff
148 #define TARGET_IO_PORTD (BIT(2))
150 #define USABLE_TIMER_CHANNEL_COUNT 8
151 #define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) )