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 "MOTO" // MotoLab
22 #define LED0 PB5 // Blue LEDs - PB5
23 #define LED1 PB9 // Green LEDs - PB9
26 #define BEEPER_INVERTED
30 #define MPU_INT_EXTI PA15
31 #define EXTI15_10_CALLBACK_HANDLER_COUNT 1 // MPU data ready
32 #define USE_MPU_DATA_READY_SIGNAL
33 //#define ENSURE_MPU_DATA_READY_IS_LOW
36 #define USE_GYRO_MPU6050
37 #define GYRO_MPU6050_ALIGN CW180_DEG
40 #define USE_ACC_MPU6050
41 #define ACC_MPU6050_ALIGN CW180_DEG
43 #define USE_GYRO_SPI_MPU6000
44 #define GYRO_MPU6000_ALIGN CW180_DEG
45 #define USE_ACC_SPI_MPU6000
46 #define ACC_MPU6000_ALIGN CW180_DEG
48 #define MPU6000_CS_GPIO GPIOB
49 #define MPU6000_CS_PIN PB12
50 #define MPU6000_SPI_INSTANCE SPI2
53 //#define USE_BARO_MS5611
56 //#define USE_MAG_HMC5883
62 #define SERIAL_PORT_COUNT 4
64 #define UART1_TX_PIN PB6
65 #define UART1_RX_PIN PB7
67 #define UART2_TX_PIN PB3
68 #define UART2_RX_PIN PB4
70 #define UART3_TX_PIN PB10 // PB10 (AF7)
71 #define UART3_RX_PIN PB11 // PB11 (AF7)
74 #define I2C_DEVICE (I2CDEV_2)
79 #define USE_SPI_DEVICE_2
81 #define M25P16_CS_PIN PB12
82 #define M25P16_SPI_INSTANCE SPI2
84 //#define SENSORS_SET (SENSOR_ACC | SENSOR_BARO | SENSOR_GPS | SENSOR_MAG)
85 #define SENSORS_SET (SENSOR_ACC)
88 #define USE_FLASH_M25P16
90 #define BOARD_HAS_VOLTAGE_DIVIDER
92 #define ADC_INSTANCE ADC2
93 #define VBAT_ADC_PIN PA5
94 //#define CURRENT_METER_ADC_PIN PA5
95 #define RSSI_ADC_PIN PB2
100 #define USE_LED_STRIP_ON_DMA1_CHANNEL3
101 #define WS2811_PIN PB8 // TIM16_CH1
102 #define WS2811_TIMER TIM16
103 #define WS2811_DMA_CHANNEL DMA1_Channel3
104 #define WS2811_IRQ DMA1_Channel3_IRQn
105 #define WS2811_DMA_TC_FLAG DMA1_FLAG_TC3
106 #define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH3_HANDLER
110 // Alternate LED strip pin
111 // FIXME DMA IRQ Transfer Complete is never called because the TIM17_DMA_RMP needs to be set in SYSCFG_CFGR1
112 #define LED_STRIP_TIMER TIM17
114 #define USE_LED_STRIP_ON_DMA1_CHANNEL7
115 #define WS2811_GPIO GPIOA
116 #define WS2811_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA
117 #define WS2811_GPIO_AF GPIO_AF_1
118 #define WS2811_PIN GPIO_Pin_7 // TIM17_CH1
119 #define WS2811_PIN_SOURCE GPIO_PinSource7
120 #define WS2811_TIMER TIM17
121 #define WS2811_TIMER_APB2_PERIPHERAL RCC_APB2Periph_TIM17
122 #define WS2811_DMA_CHANNEL DMA1_Channel7
123 #define WS2811_IRQ DMA1_Channel7_IRQn
127 #define SPEKTRUM_BIND
131 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
134 #undef GPS_PROTO_NMEA
135 #undef GPS_PROTO_UBLOX
136 #undef GPS_PROTO_I2C_NAV
137 #undef GPS_PROTO_NAZA
139 // Number of available PWM outputs
140 #define MAX_PWM_OUTPUT_PORTS 8
142 // IO - stm32f303cc in 48pin package
143 #define TARGET_IO_PORTA 0xffff
144 #define TARGET_IO_PORTB 0xffff
145 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
146 // #define TARGET_IO_PORTF (BIT(0)|BIT(1))
147 // !!TODO - check the following line is correct
148 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(3)|BIT(4))
150 #define USABLE_TIMER_CHANNEL_COUNT 9
151 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(15) | TIM_N(17))