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/>.
19 #define TARGET_BOARD_IDENTIFIER "BRF4"
21 #define USBD_PRODUCT_STRING "BeeRotorF4"
26 #define BEEPER_INVERTED
28 #define MPU6500_CS_PIN SPI1_NSS_PIN
29 #define MPU6500_SPI_BUS BUS_SPI1
31 #define USE_IMU_MPU6500
32 #define IMU_MPU6500_ALIGN CW270_DEG
35 #define BARO_I2C_BUS BUS_I2C1
36 #define USE_BARO_BMP280
39 #define MAG_I2C_BUS BUS_I2C1
42 #define TEMPERATURE_I2C_BUS BUS_I2C1
45 #define MAX7456_SPI_BUS BUS_SPI3
46 #define MAX7456_CS_PIN SPI3_NSS_PIN
49 #define USE_SDCARD_SPI
50 #define SDCARD_DETECT_INVERTED
51 #define SDCARD_DETECT_PIN PC3
52 #define SDCARD_SPI_BUS BUS_SPI2
53 #define SDCARD_CS_PIN SPI2_NSS_PIN
56 #define VBUS_SENSING_ENABLED
57 #define VBUS_SENSING_PIN PC5
59 #define USE_UART_INVERTER
62 #define UART1_RX_PIN PA10
63 #define UART1_TX_PIN PA9
64 #define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
68 #define UART2_RX_PIN PA3 //Shared with PPM
69 #define UART2_TX_PIN PA2
70 #define INVERTER_PIN_UART2_RX PC15
74 #define UART3_RX_PIN PB11
75 #define UART3_TX_PIN PB10
76 #define INVERTER_PIN_UART3_RX PC14
78 #define SERIAL_PORT_COUNT 4
81 #define ESCSERIAL_TIMER_TX_HARDWARE 0 // PWM 1
86 #define USE_SPI_DEVICE_1
87 #define SPI1_NSS_PIN PA4
88 #define SPI1_SCK_PIN PA5
89 #define SPI1_MISO_PIN PA6
90 #define SPI1_MOSI_PIN PA7
93 #define USE_SPI_DEVICE_2
94 #define SPI2_NSS_PIN PB12
95 #define SPI2_SCK_PIN PB13
96 #define SPI2_MISO_PIN PB14
97 #define SPI2_MOSI_PIN PB15
100 #define USE_SPI_DEVICE_3
101 #define SPI3_NSS_PIN PA15
102 #define SPI3_SCK_PIN PC10
103 #define SPI3_MISO_PIN PC11
104 #define SPI3_MOSI_PIN PC12
105 //#define SPI_RX_CS_PIN PD2
108 #define USE_I2C_DEVICE_1
112 #define BOARD_HAS_VOLTAGE_DIVIDER
114 #define ADC_CHANNEL_1_PIN PC0
115 #define ADC_CHANNEL_2_PIN PC1
116 #define ADC_CHANNEL_3_PIN PC2
117 #define VBAT_ADC_CHANNEL ADC_CHN_1
118 #define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
119 #define RSSI_ADC_CHANNEL ADC_CHN_3
121 #define USE_LED_STRIP
122 #define WS2811_PIN PB8
124 //#define TRANSPONDER
125 //#define TRANSPONDER_GPIO_AF GPIO_AF_TIM4
126 //#define TRANSPONDER_PIN PB8
127 //#define TRANSPONDER_TIMER TIM4
128 //#define TRANSPONDER_TIMER_CHANNEL TIM_Channel_3
129 //#define TRANSPONDER_DMA_HANDLER_IDENTIFER DMA1_ST7_HANDLER
130 //#define TRANSPONDER_DMA_STREAM DMA1_Stream7
131 //#define TRANSPONDER_DMA_CHANNEL DMA_Channel_6
132 //#define TRANSPONDER_DMA_IRQ DMA1_Stream7_IRQn
133 //#define TRANSPONDER_DMA_FLAG DMA_FLAG_TCIF7
134 //#define TRANSPONDER_DMA_IT DMA_IT_TCIF7
136 #define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_TELEMETRY | FEATURE_OSD )
137 #define DEFAULT_RX_TYPE RX_TYPE_SERIAL
138 #define DISABLE_RX_PWM_FEATURE
139 #define SERIALRX_PROVIDER SERIALRX_SBUS
140 #define SERIALRX_UART SERIAL_PORT_USART2
142 #define SENSORS_SET (SENSOR_ACC|SENSOR_MAG|SENSOR_BARO)
144 #define USE_SERIAL_4WAY_BLHELI_INTERFACE
146 #define MAX_PWM_OUTPUT_PORTS 8
148 #define TARGET_IO_PORTA 0xffff
149 #define TARGET_IO_PORTB 0xffff
150 #define TARGET_IO_PORTC 0xffff
151 #define TARGET_IO_PORTD (BIT(2))