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 "103R"
24 #define LED2 PD2 // PD2 (LED) - Labelled LED4
26 #define BEEPER PA12 // PA12 (Beeper)
28 #define BARO_XCLR_GPIO GPIOC
29 #define BARO_XCLR_PIN PC13
30 #define BARO_EOC_GPIO GPIOC
31 #define BARO_EOC_PIN PC14
32 #define BARO_APB2_PERIPHERALS RCC_APB2Periph_GPIOC
34 #define INVERTER PB2 // PB2 (BOOT1) abused as inverter select GPIO
35 #define INVERTER_USART USART2
38 #define USE_SPI_DEVICE_2
40 #define PORT103R_SPI_INSTANCE SPI2
41 #define PORT103R_SPI_CS_PIN PB12
43 // We either have this 16mbit flash chip on SPI or the MPU6500 acc/gyro depending on board revision:
44 #define M25P16_CS_PIN PORT103R_SPI_CS_PIN
45 #define M25P16_SPI_INSTANCE PORT103R_SPI_INSTANCE
47 #define MPU6000_CS_PIN PORT103R_SPI_CS_PIN
48 #define MPU6000_SPI_INSTANCE PORT103R_SPI_INSTANCE
50 #define MPU6500_CS_PIN PORT103R_SPI_CS_PIN
51 #define MPU6500_SPI_INSTANCE PORT103R_SPI_INSTANCE
55 //#define USE_GYRO_L3G4200D
56 //#define USE_GYRO_L3GD20
57 //#define USE_GYRO_MPU3050
58 #define USE_GYRO_MPU6050
59 #define USE_GYRO_SPI_MPU6000
60 #define USE_GYRO_SPI_MPU6500
64 //#define USE_ACC_ADXL345
65 //#define USE_ACC_BMA280
66 //#define USE_ACC_MMA8452
67 #define USE_ACC_MPU6050
68 #define USE_ACC_SPI_MPU6000
69 #define USE_ACC_SPI_MPU6500
72 #define USE_BARO_MS5611
73 #define USE_BARO_BMP085
74 #define USE_BARO_BMP280
77 #define USE_MAG_HMC5883
78 #define USE_MAG_AK8975
81 #define USE_FLASHTOOLS
82 #define USE_FLASH_M25P16
85 #define SONAR_TRIGGER_PIN PB0
86 #define SONAR_ECHO_PIN PB1
87 #define SONAR_TRIGGER_PIN_PWM PB8
88 #define SONAR_ECHO_PIN_PWM PB9
94 #define USE_SOFTSERIAL1
95 #define USE_SOFTSERIAL2
96 #define SERIAL_PORT_COUNT 4
98 #define SOFTSERIAL_1_TIMER TIM3
99 #define SOFTSERIAL_1_TIMER_RX_HARDWARE 4 // PWM 5
100 #define SOFTSERIAL_1_TIMER_TX_HARDWARE 5 // PWM 6
101 #define SOFTSERIAL_2_TIMER TIM3
102 #define SOFTSERIAL_2_TIMER_RX_HARDWARE 6 // PWM 7
103 #define SOFTSERIAL_2_TIMER_TX_HARDWARE 7 // PWM 8
106 #define I2C_DEVICE (I2CDEV_2)
108 // #define SOFT_I2C // enable to test software i2c
109 // #define SOFT_I2C_PB1011 // If SOFT_I2C is enabled above, need to define pinout as well (I2C1 = PB67, I2C2 = PB1011)
110 // #define SOFT_I2C_PB67
113 #define CURRENT_METER_ADC_PIN PB1
114 #define VBAT_ADC_PIN PA4
115 #define RSSI_ADC_PIN PA1
116 #define EXTERNAL1_ADC_PIN PA5
119 //#define LED_STRIP_TIMER TIM3
121 #define SKIP_CLI_COMMAND_HELP
122 #define SKIP_PID_LUXFLOAT
124 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
126 // IO - stm32f103RCT6 in 64pin package
127 #define TARGET_IO_PORTA 0xffff
128 #define TARGET_IO_PORTB 0xffff
129 #define TARGET_IO_PORTC 0xffff
130 #define TARGET_IO_PORTD (BIT(0)|BIT(1)|BIT(2))
132 #define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4))