Skip to content

Commit eab90dd

Browse files
committed
SOLOGOODF722 - target
1 parent 9e4bb24 commit eab90dd

3 files changed

Lines changed: 216 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target_stm32f722xe(SOLOGOODF722)
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* This file is part of INAV.
3+
*
4+
* INAV 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.
8+
*
9+
* INAV 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.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#include <stdint.h>
19+
20+
#include "platform.h"
21+
#include "drivers/io.h"
22+
23+
#include "drivers/dma.h"
24+
#include "drivers/timer.h"
25+
#include "drivers/timer_def.h"
26+
27+
timerHardware_t timerHardware[] = {
28+
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
29+
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
30+
DEF_TIM(TIM1, CH1, PA8, TIM_USE_OUTPUT_AUTO, 0, 1), // S3
31+
DEF_TIM(TIM1, CH2, PA9, TIM_USE_OUTPUT_AUTO, 0, 1), // S4
32+
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
33+
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
34+
DEF_TIM(TIM1, CH3, PA10, TIM_USE_OUTPUT_AUTO, 0, 1), // S7
35+
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S8
36+
37+
DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0), // 2812LED
38+
};
39+
40+
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
Lines changed: 175 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
/*
2+
* This file is part of INAV Project.
3+
*
4+
* INAV 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.
8+
*
9+
* INAV 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.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with INAV. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#pragma once
19+
20+
#define TARGET_BOARD_IDENTIFIER "SGF7"
21+
22+
#define USBD_PRODUCT_STRING "SOLOGOODF722"
23+
24+
#define LED0 PC15
25+
26+
#define BEEPER PC13
27+
#define BEEPER_INVERTED
28+
29+
// *************** Gyro & ACC **********************
30+
#define USE_SPI
31+
#define USE_SPI_DEVICE_1
32+
33+
#define SPI1_NSS_PIN PA4
34+
#define SPI1_SCK_PIN PA5
35+
#define SPI1_MISO_PIN PA6
36+
#define SPI1_MOSI_PIN PA7
37+
38+
39+
#define USE_IMU_MPU6000
40+
#define IMU_MPU6000_ALIGN CW180_DEG
41+
#define MPU6000_CS_PIN SPI1_NSS_PIN
42+
#define MPU6000_SPI_BUS BUS_SPI1
43+
44+
#define USE_IMU_BMI270
45+
#define IMU_BMI270_ALIGN CW180_DEG
46+
#define BMI270_CS_PIN SPI1_NSS_PIN
47+
#define BMI270_SPI_BUS BUS_SPI1
48+
49+
#define USE_IMU_ICM42605
50+
#define IMU_ICM42605_ALIGN CW180_DEG
51+
#define ICM42605_CS_PIN SPI1_NSS_PIN
52+
#define ICM42605_SPI_BUS BUS_SPI1
53+
54+
//resource GYRO_EXTI 1 C04 - donno how to map here!
55+
56+
// *************** I2C/Baro/Mag *********************
57+
#define USE_I2C
58+
#define USE_I2C_DEVICE_1
59+
#define I2C1_SCL PB8
60+
#define I2C1_SDA PB9
61+
62+
#define DEFAULT_I2C_BUS BUS_I2C1
63+
64+
#define USE_BARO
65+
#define BARO_I2C_BUS DEFAULT_I2C_BUS
66+
#define USE_BARO_DPS310
67+
68+
#define USE_MAG
69+
#define MAG_I2C_BUS DEFAULT_I2C_BUS
70+
#define USE_MAG_ALL
71+
72+
#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
73+
74+
#define PITOT_I2C_BUS DEFAULT_I2C_BUS
75+
76+
#define USE_RANGEFINDER
77+
#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
78+
79+
// *************** FLASH **************************
80+
#define USE_SPI_DEVICE_3
81+
#define SPI3_NSS_PIN PA15
82+
#define SPI3_SCK_PIN PC10
83+
#define SPI3_MISO_PIN PC11
84+
#define SPI3_MOSI_PIN PB5
85+
86+
#define M25P16_CS_PIN SPI3_NSS_PIN
87+
#define M25P16_SPI_BUS BUS_SPI3
88+
#define USE_FLASHFS
89+
#define USE_FLASH_M25P16
90+
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
91+
92+
93+
// *************** OSD *****************************
94+
#define USE_SPI_DEVICE_2
95+
#define SPI2_NSS_PIN PB12
96+
#define SPI2_SCK_PIN PB13
97+
#define SPI2_MISO_PIN PB14
98+
#define SPI2_MOSI_PIN PB15
99+
100+
#define USE_MAX7456
101+
#define MAX7456_SPI_BUS BUS_SPI2
102+
#define MAX7456_CS_PIN SPI2_NSS_PIN
103+
104+
// *************** UART *****************************
105+
#define USE_VCP
106+
107+
#define USE_UART1
108+
#define UART1_RX_PIN PB7
109+
#define UART1_TX_PIN PB6
110+
111+
#define USE_UART2
112+
#define UART2_RX_PIN PA3
113+
#define UART2_TX_PIN PA2
114+
115+
#define USE_UART3
116+
#define UART3_RX_PIN PB11
117+
#define UART3_TX_PIN PB10
118+
119+
#define USE_UART4
120+
#define UART4_RX_PIN PA1
121+
#define UART4_TX_PIN PA0
122+
123+
#define USE_UART5
124+
#define UART5_RX_PIN PD2
125+
#define UART5_TX_PIN PC12
126+
127+
#define USE_UART6
128+
#define UART6_RX_PIN PC7
129+
#define UART6_TX_PIN PC6
130+
131+
#define SERIAL_PORT_COUNT 7
132+
133+
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
134+
#define SERIALRX_PROVIDER SERIALRX_CRSF
135+
#define SERIALRX_UART SERIAL_PORT_USART2
136+
137+
// *************** ADC *****************************
138+
#define USE_ADC
139+
#define ADC_INSTANCE ADC1
140+
#define ADC1_DMA_STREAM DMA2_Stream0
141+
#define ADC_CHANNEL_1_PIN PC1
142+
#define ADC_CHANNEL_2_PIN PC3
143+
144+
#define VBAT_ADC_CHANNEL ADC_CHN_1
145+
#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
146+
147+
148+
#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
149+
// *************** PINIO ************************
150+
#define USE_PINIO
151+
#define USE_PINIOBOX
152+
#define PINIO1_PIN PC2 //PC13
153+
#define PINIO2_PIN PC0
154+
155+
// *************** LEDSTRIP ************************
156+
#define USE_LED_STRIP
157+
#define WS2811_PIN PB3
158+
159+
// Others
160+
161+
#define MAX_PWM_OUTPUT_PORTS 8
162+
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
163+
#define USE_DSHOT
164+
#define USE_ESC_SENSOR
165+
#define CURRENT_METER_SCALE 250
166+
167+
#define TARGET_IO_PORTA 0xffff
168+
#define TARGET_IO_PORTB 0xffff
169+
#define TARGET_IO_PORTC 0xffff
170+
#define TARGET_IO_PORTD 0xffff
171+
#define TARGET_IO_PORTE 0xffff
172+
#define TARGET_IO_PORTF 0xffff
173+
174+
#define USE_DSHOT
175+
#define USE_ESC_SENSOR

0 commit comments

Comments
 (0)