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/>.
26 \ | _ _| __| \ |\ \ /| | _ \ _ \ _ \
27 _ \ | | _| . | \ \ \ / __ | ( |( |__/
28 _/ _\____|___|___|_|\_| \_/\_/ _| _|\___/\___/_|
31 Take me to your leader-board...
39 /* Multi-Arch Support for 168MHz or 216MHz ARM Cortex processors - STM32F405RGT or STM32F7RET
41 #if defined(ALIENWHOOPF4)
42 #define TARGET_BOARD_IDENTIFIER "AWF4"
43 #define USBD_PRODUCT_STRING "AlienWhoopF4"
45 #define TARGET_BOARD_IDENTIFIER "AWF7"
46 #define USBD_PRODUCT_STRING "AlienWhoopF7"
49 #define USE_TARGET_CONFIG // see config.c for target specific customizations
51 #define BRUSHED_MOTORS
53 /* Visual Alerts - SMD LEDs
55 #define LED0_PIN PC12 // conflicts UART5
56 #define LED1_PIN PD2 // conflicts UART5
58 /* Lost Quad Mode and Alerts - RCX03-787 Low Voltage Active Buzzer
61 #define BEEPER_PIN PA2
62 #define BEEPER_INVERTED
64 /* Serial Peripheral Interface (SPI) - Up to 50 Mbit/s on F7
67 #define USE_SPI_DEVICE_1 // SPI1 can communicate at up to 42 Mbits/s on F4
68 #define USE_SPI_DEVICE_2 // SPI2 and SPI3 can communicate at up to 21 Mbit/s on F4
69 #define USE_SPI_DEVICE_3 // All SPIs can be served by the DMA controller.
70 #if defined(ALIENWHOOPF7)
72 //#define USE_SPI_DEVICE_4
73 //#define USE_SPI_DEVICE_5
76 #define SPI1_NSS_PIN PA4 // LQFP64 pin 20 (PA4)
77 #define SPI1_SCK_PIN PA5 // LQFP64 pin 21 (PA5)
78 #define SPI1_MISO_PIN PA6 // LQFP64 pin 22 (PA6)
79 #define SPI1_MOSI_PIN PA7 // LQFP64 pin 23 (PA7)
81 #define SPI2_NSS_PIN PB12 // LQFP64 pin 33 (PB12)
82 #define SPI2_SCK_PIN PB13 // LQFP64 pin 34 (PB13)
83 #define SPI2_MISO_PIN PB14 // LQFP64 pin 35 (PB14)
84 #define SPI2_MOSI_PIN PB15 // LQFP64 pin 36 (PB15)
86 #define SPI3_NSS_PIN PA15 // LQFP64 pin 50 (PA15)
87 //#define SPI3_SCK_PIN PC10 // LQFP64 pin 51 (PC10)
88 //#define SPI3_MISO_PIN PC11 // LQFP64 pin 52 (PC11)
89 //#define SPI3_MOSI_PIN PC12 // LQFP64 pin 53 (PC12)
90 #define SPI3_SCK_PIN PB3 // LQFP64 pin 55 (PB3)
91 #define SPI3_MISO_PIN PB4 // LQFP64 pin 56 (PB4)
92 #define SPI3_MOSI_PIN PB5 // LQFP64 pin 57 (PB5)
94 #if defined(ALIENWHOOPF7)
95 //TODO: define SPI4 and SPI5 for F7 target
96 //#define SPI4_NSS_PIN
97 //#define SPI4_SCK_PIN
98 //#define SPI4_MISO_PIN
99 //#define SPI4_MOSI_PIN
100 //#define SPI5_NSS_PIN
101 //#define SPI5_SCK_PIN
102 //#define SPI5_MISO_PIN
103 //#define SPI5_MOSI_PIN
108 #define MAX7456_SPI_INSTANCE SPI2
109 #define MAX7456_SPI_CS_PIN SPI2_NSS_PIN
111 /* BLACKBOX dataflash available as of V2.1 -- did not exist on V1 and V2 */
113 #define USE_FLASH_M25P16
114 #define FLASH_CS_PIN SPI3_NSS_PIN
115 #define FLASH_SPI_INSTANCE SPI3
116 #define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
118 /* Motion Processing Unit (MPU) - Invensense 6-axis MPU-6500 or 9-axis MPU-9250
122 #define USE_GYRO_EXTI
123 #define GYRO_1_EXTI_PIN PC14
125 #define GYRO_1_CS_PIN SPI1_NSS_PIN
126 #define GYRO_1_SPI_INSTANCE SPI1
127 #define USE_MPU_DATA_READY_SIGNAL
128 #define ENSURE_MPU_DATA_READY_IS_LOW
131 #define USE_MAG_AK8963
132 #define USE_MAG_LIS3MDL
133 #define MAG_AK8963_ALIGN CW0_DEG
134 #define USE_MAG_DATA_READY_SIGNAL
135 #define ENSURE_MAG_DATA_READY_IS_HIGH
138 #define USE_GYRO_SPI_MPU6500
139 #define GYRO_1_ALIGN CW0_DEG
142 #define USE_ACC_SPI_MPU6500
144 /* Optional Digital Pressure Sensor (barometer) - Bosch BMP280
145 * TODO: not implemented on V1 or V2 pcb
147 #if defined(BREADBOARD)
149 #define USE_BARO_BMP280
150 #define USE_BARO_SPI_BMP280
151 #define BARO_SPI_INSTANCE SPI3
152 #define BARO_CS_PIN SPI3_NSS_PIN
164 #define SERIAL_PORT_COUNT 6
167 #define UART1_TX_PIN PA9 // PB1 INCOMPAT F4 -> F7
168 #define UART1_RX_PIN PA10 // PB0 INCOMPAT F4 -> F7
171 #define UART2_TX_PIN PA2 //PA12
172 #define UART2_RX_PIN PA3 //PA13
175 #define UART3_TX_PIN PC10 // PB10 INCOMPAT F4 -> F7
176 #define UART3_RX_PIN PC11 // PB11 INCOMPAT F4 -> F7
178 // UART4 async only on F4
179 #define UART4_TX_PIN PA0 // PC10 currently used by USART3
180 #define UART4_RX_PIN PA1 // PC11 currently used by USART3
182 // UART5 async only on F4 ... PB3 and PB4 used by SPI3
183 //#define UART5_TX_PIN PB3 // PC12
184 //#define UART5_RX_PIN PB4 // PD2
186 /* Receiver - e.g. FrSky XM/XM+ or Spektrum/Lemon DSM/DSMX capable of 3.3V
188 /* Assume Spektrum following defines inherited from common_fc_pre.h:
189 //#define USE_SERIALRX_SPEKTRUM
192 #define BINDPLUG_PIN PC13 // PC13 Current Limited (3 mA). Not suitable for LED/Beeper
193 #define SERIALRX_UART SERIAL_PORT_USART3
194 #define RX_CHANNELS_TAER //RX_CHANNELS_AETR
195 #define SERIALRX_PROVIDER SERIALRX_SPEKTRUM2048 //SERIALRX_SBUS
197 /* Defaults - What do we want out of the box?
199 #if defined(BREADBOARD)
200 #define DEFAULT_FEATURES (FEATURE_RX_SERIAL | FEATURE_MOTOR_STOP | FEATURE_LED_STRIP | FEATURE_OSD )
202 #define DEFAULT_FEATURES (FEATURE_RX_SERIAL | FEATURE_MOTOR_STOP ) // TODO FEATURE_OSD for V3 board ... FEATURE_TELEMETRY changes bind pin from rx to tx
207 #if defined(BREADBOARD)
210 #define USE_I2C_DEVICE_1
211 #define I2C_DEVICE (I2CDEV_1)
212 #define USE_I2C_PULLUP
216 //#undef USE_CMS // TODO: OSD depends upon CMS
220 /* MCU Pin Mapping - LPFQ64 Flags
222 #define TARGET_IO_PORTA 0xffff
223 #define TARGET_IO_PORTB 0xffff
224 #define TARGET_IO_PORTC 0xffff
225 #if defined(ALIENWHOOPF4)
227 #define TARGET_IO_PORTD (BIT(2))
230 #define TARGET_IO_PORTD 0xffff
231 #define TARGET_IO_PORTE 0xffff
236 #define USABLE_TIMER_CHANNEL_COUNT 5
237 #define USED_TIMERS ( TIM_N(3) | TIM_N(8) | TIM_N(5) )