2 * This is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
7 * This software is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this software. If not, see <http://www.gnu.org/licenses/>.
18 #define TARGET_BOARD_IDENTIFIER "UAVP"
20 #define USBD_PRODUCT_STRING "UAVP-NG HW-0.30-mini"
28 #define BEEPER_PIN PB0
29 #define BEEPER_INVERTED
32 #define USE_ACC_SPI_MPU6000
35 #define USE_GYRO_SPI_MPU6000
37 #define GYRO_1_CS_PIN PA4
38 #define GYRO_1_SPI_INSTANCE SPI1
41 #define GYRO_1_ALIGN CW180_DEG
46 #define GYRO_1_EXTI_PIN PE0
47 #define USE_MPU_DATA_READY_SIGNAL
50 #define USE_MAG_HMC5883
51 #define MAG_HMC5883_ALIGN CW90_DEG
52 #define MAG_I2C_INSTANCE I2CDEV_2
53 #define HMC5883_I2C_INSTANCE I2CDEV_2
54 #define MAG_INT_EXTI PE12
55 #define USE_MAG_DATA_READY_SIGNAL
58 #define USE_BARO_MS5611
59 #define USE_BARO_SPI_MS5611
60 #define BARO_CS_PIN PE1
61 #define BARO_SPI_INSTANCE SPI1
63 #if 0 // TODO: Enable SDCard and blackbox logging
64 #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
66 #define USE_SDCARD_SPI
67 #define SDCARD_DETECT_INVERTED
68 #define SDCARD_DETECT_PIN PE2
69 #define SDCARD_SPI_INSTANCE SPI2
70 #define SDCARD_SPI_CS_PIN SPI2_NSS_PIN
71 #warning Missing channel for F4/F7 spec dma 1 stream 4; DMA_OPT assumed as 0
72 #define SPI2_TX_DMA_OPT 0 // DMA 1 Stream 4 Channel unknown
76 //#define VBUS_SENSING_PIN PC5
79 #define UART1_RX_PIN PB7
80 #define UART1_TX_PIN PB6
83 #define UART2_RX_PIN PD6
84 #define UART2_TX_PIN PD5
87 #define UART3_RX_PIN PD9
88 #define UART3_TX_PIN PD8
91 #define UART6_RX_PIN PC6
92 #define UART6_TX_PIN PC7
94 #define SERIAL_PORT_COUNT 5 //VCP, USART1, USART2, USART3, USART6
98 #define ESCSERIAL_TIMER_TX_PIN PA2
101 #define USE_SPI_DEVICE_1
102 #define SPI1_NSS_PIN PA4
103 #define SPI1_SCK_PIN PA5
104 #define SPI1_MISO_PIN PA6
105 #define SPI1_MOSI_PIN PA7
107 /// I2C Configuration
109 #define USE_I2C_PULLUP
110 #define USE_I2C_DEVICE_1
114 #define USE_I2C_DEVICE_2
115 #define I2C2_SCL PB10
116 #define I2C2_SDA PB11
118 #define I2C_DEVICE (I2CDEV_2)
121 #define VBAT_ADC_PIN PC1
122 #define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
124 #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
126 #define TARGET_IO_PORTA (0xffff & ~(BIT(0)|BIT(1)|BIT(10)|BIT(13)|BIT(14)|BIT(15)))
127 #define TARGET_IO_PORTB (0xffff & ~(BIT(2)|BIT(3)|BIT(4)))
128 #define TARGET_IO_PORTC (0xffff & ~(BIT(15)|BIT(14)|BIT(13)))
129 #define TARGET_IO_PORTD (0xffff & ~(BIT(0)|BIT(1)))
130 #define TARGET_IO_PORTE (0xffff & ~(BIT(15)))
132 #define USABLE_TIMER_CHANNEL_COUNT 10
135 //#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) | TIM_N(8) | TIM_N(9) | TIM_N(12))
136 // Defined Timers in timer.c
137 #define USED_TIMERS ( TIM_N(1) | TIM_N(3) | TIM_N(4))