Merge pull request #11198 from SteveCEvans/sce_rc2
[betaflight.git] / src / main / target / NUCLEOF722 / target.h
blob5c64a8d84cd5472df6cb0c2dde7a418551b012f8
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_DEBUG_PIN
29 //#define USE_ESC_TELEMETRY
31 #define LED0_PIN PB7 // blue
32 #define LED1_PIN PB14 // red
34 //#define USE_BEEPER
35 //#define BEEPER_PIN PA0
36 //#define BEEPER_INVERTED
38 #undef USE_MULTI_GYRO
40 #define USE_ACC
41 #define USE_FAKE_ACC
42 #define USE_ACC_MPU6050
44 #define USE_GYRO
45 #define USE_FAKE_GYRO
46 #define USE_GYRO_MPU6050
47 #define GYRO_1_ALIGN CW270_DEG
49 // MPU6050 interrupts
50 #define USE_MPU_DATA_READY_SIGNAL
51 #define USE_EXTI
52 #define USE_GYRO_EXTI
53 #define GYRO_1_EXTI_PIN PB15
54 #define USE_EXTI
56 #define USE_MAG
57 #define USE_FAKE_MAG
58 #define USE_MAG_HMC5883
59 #define USE_MAG_QMC5883
60 #define USE_MAG_LIS3MDL
61 #define MAG_HMC5883_ALIGN CW270_DEG_FLIP
63 #define USE_BARO
64 #define USE_FAKE_BARO
65 #define USE_BARO_MS5611
66 #define USE_BARO_BMP388
68 #define USABLE_TIMER_CHANNEL_COUNT 9
70 #define USE_VCP
71 #define USE_USB_DETECT
72 #define USB_DETECT_PIN PA9
74 //#define USE_UART1
75 //#define UART1_RX_PIN PA10
76 //#define UART1_TX_PIN PA9
78 #define USE_UART2
79 #define UART2_RX_PIN PD6
80 #define UART2_TX_PIN PD5
82 #define USE_UART3
83 #define UART3_RX_PIN PD9
84 #define UART3_TX_PIN PD8
86 #define USE_UART4
87 //#define UART4_RX_PIN PC11 // Used for SDIO
88 //#define UART4_TX_PIN PC10 // Used for SDIO
89 #define UART4_RX_PIN PA1
90 #define UART4_TX_PIN PA0
92 //#define USE_UART5
93 //#define UART5_RX_PIN PD2 // Used for SDIO
94 //#define UART5_TX_PIN PC12 // Used for SDIO
96 //#define USE_UART6
97 #define UART6_RX_PIN PC7
98 #define UART6_TX_PIN PC6
100 //#define USE_UART7
101 #define UART7_RX_PIN PE7
102 #define UART7_TX_PIN PE8
104 //#define USE_UART8
105 #define UART8_RX_PIN PE0
106 #define UART8_TX_PIN PE1
108 #define USE_SOFTSERIAL1
109 #define USE_SOFTSERIAL2
111 #define SERIAL_PORT_COUNT 6 //VCP, USART2, USART3, UART4, SOFTSERIAL x 2
113 #define USE_ESCSERIAL
114 #define ESCSERIAL_TIMER_TX_PIN PB15 // (Hardware=0, PPM)
116 #define USE_SPI
117 #define USE_SPI_DEVICE_1
118 #define USE_SPI_DEVICE_4
120 #define SPI1_NSS_PIN PA4
121 #define SPI1_SCK_PIN PA5
122 #define SPI1_MISO_PIN PA6
123 #define SPI1_MOSI_PIN PA7
125 #define SPI4_NSS_PIN PE11
126 #define SPI4_SCK_PIN PE12
127 #define SPI4_MISO_PIN PE13
128 #define SPI4_MOSI_PIN PE14
130 #define USE_SDCARD
131 //#define SDCARD_DETECT_INVERTED
132 //#define SDCARD_DETECT_PIN PF14
133 //#define SDCARD_SPI_INSTANCE SPI4
134 //#define SDCARD_SPI_CS_PIN SPI4_NSS_PIN
135 //#define SPI4_TX_DMA_OPT 0 // DMA 2 Stream 1 Channel 4
136 #define USE_SDCARD_SDIO
138 #define SDCARD_SDIO_DMA_OPT 0 // DMA 2 Stream 3 Chanel 4
139 //#define SDCARD_SPI_CS_PIN NONE // This is not used on SDIO
141 #define USE_I2C
142 #define USE_I2C_DEVICE_1
143 #define I2C_DEVICE (I2CDEV_1)
144 #define I2C1_SCL PB8
145 #define I2C1_SDA PB9
147 #define USE_ADC
148 #define VBAT_ADC_PIN PA3
149 #define CURRENT_METER_ADC_PIN PC0
150 #define RSSI_ADC_PIN PC3
152 //#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
154 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
155 #define SERIALRX_PROVIDER SERIALRX_SBUS
157 #define TARGET_IO_PORTA 0xffff
158 #define TARGET_IO_PORTB 0xffff
159 #define TARGET_IO_PORTC 0xffff
160 #define TARGET_IO_PORTD 0xffff
161 #define TARGET_IO_PORTE 0xffff
162 #define TARGET_IO_PORTF 0xffff
164 #define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) | TIM_N(9) | TIM_N(12) )