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 "RMDO" // Ready Made RC DoDo
23 #define LED0_GPIO GPIOB
24 #define LED0_PIN Pin_3
25 #define LED0_PERIPHERAL RCC_AHBPeriph_GPIOB
28 #define BEEP_GPIO GPIOC
29 #define BEEP_PIN Pin_15
30 #define BEEP_PERIPHERAL RCC_AHBPeriph_GPIOC
31 #define BEEPER_INVERTED
33 #define USABLE_TIMER_CHANNEL_COUNT 17
35 #define EXTI_CALLBACK_HANDLER_COUNT 2 // MPU data ready and MAG data ready
37 #define USE_MPU_DATA_READY_SIGNAL
38 #define ENSURE_MPU_DATA_READY_IS_LOW
40 #define USE_MAG_DATA_READY_SIGNAL
41 #define ENSURE_MAG_DATA_READY_IS_HIGH
45 #define USE_GYRO_MPU6050
46 #define GYRO_MPU6050_ALIGN CW270_DEG
49 #define USE_ACC_MPU6050
50 #define ACC_MPU6050_ALIGN CW270_DEG
53 #define USE_BARO_BMP280
56 #define USE_MAG_AK8975
57 #define USE_MAG_HMC5883
58 #define USE_MAG_MAG3110
61 #define USE_FLASH_M25P16
64 #define SONAR_TRIGGER_PIN Pin_0 // RC_CH7 (PB0) - only 3.3v ( add a 1K Ohms resistor )
65 #define SONAR_TRIGGER_GPIO GPIOB
66 #define SONAR_ECHO_PIN Pin_1 // RC_CH8 (PB1) - only 3.3v ( add a 1K Ohms resistor )
67 #define SONAR_ECHO_GPIO GPIOB
68 #define SONAR_EXTI_LINE EXTI_Line1
69 #define SONAR_EXTI_PIN_SOURCE EXTI_PinSource1
70 #define SONAR_EXTI_IRQN EXTI1_IRQn
76 #define USE_SOFTSERIAL1
77 #define USE_SOFTSERIAL2
78 #define SERIAL_PORT_COUNT 5
81 #define UART1_TX_PIN GPIO_Pin_9 // PA9
82 #define UART1_RX_PIN GPIO_Pin_10 // PA10
83 #define UART1_GPIO GPIOA
84 #define UART1_GPIO_AF GPIO_AF_7
85 #define UART1_TX_PINSOURCE GPIO_PinSource9
86 #define UART1_RX_PINSOURCE GPIO_PinSource10
89 #define UART2_TX_PIN GPIO_Pin_14 // PA14 / SWCLK
90 #define UART2_RX_PIN GPIO_Pin_15 // PA15
91 #define UART2_GPIO GPIOA
92 #define UART2_GPIO_AF GPIO_AF_7
93 #define UART2_TX_PINSOURCE GPIO_PinSource14
94 #define UART2_RX_PINSOURCE GPIO_PinSource15
97 #define UART3_TX_PIN GPIO_Pin_10 // PB10 (AF7)
98 #define UART3_RX_PIN GPIO_Pin_11 // PB11 (AF7)
99 #define UART3_GPIO_AF GPIO_AF_7
100 #define UART3_GPIO GPIOB
101 #define UART3_TX_PINSOURCE GPIO_PinSource10
102 #define UART3_RX_PINSOURCE GPIO_PinSource11
105 #define SOFTSERIAL_1_TIMER TIM3
106 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5
107 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6
108 #define SOFTSERIAL_2_TIMER TIM3
109 #define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7
110 #define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8
113 #define I2C_DEVICE (I2CDEV_1) // PB6/SCL, PB7/SDA
116 #define USE_SPI_DEVICE_2 // PB12,13,14,15 on AF5
118 #define SPI2_GPIO GPIOB
119 #define SPI2_GPIO_PERIPHERAL RCC_AHBPeriph_GPIOB
120 #define SPI2_NSS_PIN Pin_12
121 #define SPI2_NSS_PIN_SOURCE GPIO_PinSource12
122 #define SPI2_SCK_PIN Pin_13
123 #define SPI2_SCK_PIN_SOURCE GPIO_PinSource13
124 #define SPI2_MISO_PIN Pin_14
125 #define SPI2_MISO_PIN_SOURCE GPIO_PinSource14
126 #define SPI2_MOSI_PIN Pin_15
127 #define SPI2_MOSI_PIN_SOURCE GPIO_PinSource15
129 #define M25P16_CS_GPIO GPIOB
130 #define M25P16_CS_PIN GPIO_Pin_12
131 #define M25P16_SPI_INSTANCE SPI2
134 #define BOARD_HAS_VOLTAGE_DIVIDER
136 #define ADC_INSTANCE ADC2
137 #define ADC_DMA_CHANNEL DMA2_Channel1
138 #define ADC_AHB_PERIPHERAL RCC_AHBPeriph_DMA2
140 #define VBAT_ADC_GPIO GPIOA
141 #define VBAT_ADC_GPIO_PIN GPIO_Pin_4
142 #define VBAT_ADC_CHANNEL ADC_Channel_1
144 #define CURRENT_METER_ADC_GPIO GPIOA
145 #define CURRENT_METER_ADC_GPIO_PIN GPIO_Pin_5
146 #define CURRENT_METER_ADC_CHANNEL ADC_Channel_2
148 #define RSSI_ADC_GPIO GPIOB
149 #define RSSI_ADC_GPIO_PIN GPIO_Pin_2
150 #define RSSI_ADC_CHANNEL ADC_Channel_12
153 #define LED_STRIP_TIMER TIM1
155 #define USE_LED_STRIP_ON_DMA1_CHANNEL2
156 #define WS2811_GPIO GPIOA
157 #define WS2811_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA
158 #define WS2811_GPIO_AF GPIO_AF_6
159 #define WS2811_PIN GPIO_Pin_8
160 #define WS2811_PIN_SOURCE GPIO_PinSource8
161 #define WS2811_TIMER TIM1
162 #define WS2811_TIMER_APB2_PERIPHERAL RCC_APB2Periph_TIM1
163 #define WS2811_DMA_CHANNEL DMA1_Channel2
164 #define WS2811_IRQ DMA1_Channel2_IRQn
168 //#define NAV_AUTO_MAG_DECLINATION
169 #define NAV_GPS_GLITCH_DETECTION
171 #define SPEKTRUM_BIND
173 #define BIND_PORT GPIOB
174 #define BIND_PIN Pin_11
176 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
178 #undef GPS_PROTO_NAZA
179 #undef TELEMETRY_HOTT
180 #undef TELEMETRY_SMARTPORT
182 // IO - stm32f303cc in 48pin package
183 #define TARGET_IO_PORTA 0xffff
184 #define TARGET_IO_PORTB 0xffff
185 #define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
186 #define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
189 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(15) | TIM_N(16) |TIM_N(17))