Merge pull request #11483 from SteveCEvans/elrs_race
[betaflight.git] / src / main / target / NUCLEOF722 / target.h
blob61eb2db4fae7d311dc793b6e0f108d9332eaf3bc
1 /*
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)
8 * any later version.
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/>.
21 #pragma once
23 #define TARGET_BOARD_IDENTIFIER "NU72"
25 #define USBD_PRODUCT_STRING "NucleoF722"
27 //#define USE_ESC_TELEMETRY
29 #define LED0_PIN PB7 // blue
30 #define LED1_PIN PB14 // red
32 //#define USE_BEEPER
33 //#define BEEPER_PIN PA0
34 //#define BEEPER_INVERTED
36 #undef USE_MULTI_GYRO
38 #define USE_ACC
39 #define USE_FAKE_ACC
40 #define USE_ACC_MPU6050
42 #define USE_GYRO
43 #define USE_FAKE_GYRO
44 #define USE_GYRO_MPU6050
45 #define GYRO_1_ALIGN CW270_DEG
47 // MPU6050 interrupts
48 #define USE_MPU_DATA_READY_SIGNAL
49 #define USE_EXTI
50 #define USE_GYRO_EXTI
51 #define GYRO_1_EXTI_PIN PB15
52 #define USE_EXTI
54 #define USE_MAG
55 #define USE_FAKE_MAG
56 #define USE_MAG_HMC5883
57 #define USE_MAG_QMC5883
58 #define USE_MAG_LIS3MDL
59 #define MAG_HMC5883_ALIGN CW270_DEG_FLIP
61 #define USE_BARO
62 #define USE_FAKE_BARO
63 #define USE_BARO_MS5611
64 #define USE_BARO_BMP388
66 #define USABLE_TIMER_CHANNEL_COUNT 9
68 #define USE_VCP
69 #define USE_USB_DETECT
70 #define USB_DETECT_PIN PA9
72 //#define USE_UART1
73 //#define UART1_RX_PIN PA10
74 //#define UART1_TX_PIN PA9
76 #define USE_UART2
77 #define UART2_RX_PIN PD6
78 #define UART2_TX_PIN PD5
80 #define USE_UART3
81 #define UART3_RX_PIN PD9
82 #define UART3_TX_PIN PD8
84 #define USE_UART4
85 //#define UART4_RX_PIN PC11 // Used for SDIO
86 //#define UART4_TX_PIN PC10 // Used for SDIO
87 #define UART4_RX_PIN PA1
88 #define UART4_TX_PIN PA0
90 //#define USE_UART5
91 //#define UART5_RX_PIN PD2 // Used for SDIO
92 //#define UART5_TX_PIN PC12 // Used for SDIO
94 //#define USE_UART6
95 #define UART6_RX_PIN PC7
96 #define UART6_TX_PIN PC6
98 //#define USE_UART7
99 #define UART7_RX_PIN PE7
100 #define UART7_TX_PIN PE8
102 //#define USE_UART8
103 #define UART8_RX_PIN PE0
104 #define UART8_TX_PIN PE1
106 #define USE_SOFTSERIAL1
107 #define USE_SOFTSERIAL2
109 #define SERIAL_PORT_COUNT 6 //VCP, USART2, USART3, UART4, SOFTSERIAL x 2
111 #define USE_ESCSERIAL
112 #define ESCSERIAL_TIMER_TX_PIN PB15 // (Hardware=0, PPM)
114 #define USE_SPI
115 #define USE_SPI_DEVICE_1
116 #define USE_SPI_DEVICE_4
118 #define SPI1_NSS_PIN PA4
119 #define SPI1_SCK_PIN PA5
120 #define SPI1_MISO_PIN PA6
121 #define SPI1_MOSI_PIN PA7
123 #define SPI4_NSS_PIN PE11
124 #define SPI4_SCK_PIN PE12
125 #define SPI4_MISO_PIN PE13
126 #define SPI4_MOSI_PIN PE14
128 #define USE_SDCARD
129 //#define SDCARD_DETECT_INVERTED
130 //#define SDCARD_DETECT_PIN PF14
131 //#define SDCARD_SPI_INSTANCE SPI4
132 //#define SDCARD_SPI_CS_PIN SPI4_NSS_PIN
133 //#define SPI4_TX_DMA_OPT 0 // DMA 2 Stream 1 Channel 4
134 #define USE_SDCARD_SDIO
136 #define SDCARD_SDIO_DMA_OPT 0 // DMA 2 Stream 3 Chanel 4
137 //#define SDCARD_SPI_CS_PIN NONE // This is not used on SDIO
139 #define USE_I2C
140 #define USE_I2C_DEVICE_1
141 #define I2C_DEVICE (I2CDEV_1)
142 #define I2C1_SCL PB8
143 #define I2C1_SDA PB9
145 #define USE_ADC
146 #define VBAT_ADC_PIN PA3
147 #define CURRENT_METER_ADC_PIN PC0
148 #define RSSI_ADC_PIN PC3
150 //#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
152 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
153 #define SERIALRX_PROVIDER SERIALRX_SBUS
155 #define TARGET_IO_PORTA 0xffff
156 #define TARGET_IO_PORTB 0xffff
157 #define TARGET_IO_PORTC 0xffff
158 #define TARGET_IO_PORTD 0xffff
159 #define TARGET_IO_PORTE 0xffff
160 #define TARGET_IO_PORTF 0xffff
162 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(9) | TIM_N(12) )