Skip to content

Commit 88044f6

Browse files
authored
Merge pull request #10444 from iNavFlight/dzikuvx-speedybee-f405-aio
Speedybee F405 AIO
2 parents f170035 + 6e5b32d commit 88044f6

File tree

6 files changed

+254
-3
lines changed

6 files changed

+254
-3
lines changed

.vscode/c_cpp_properties.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,26 @@
3434
"USE_I2C_IO_EXPANDER",
3535
"USE_PCF8574",
3636
"USE_ESC_SENSOR",
37+
"USE_PROGRAMMING_FRAMEWORK",
38+
"USE_SERIALRX_GHST",
39+
"USE_TELEMETRY_GHST",
40+
"USE_CMS",
41+
"USE_DJI_HD_OSD",
42+
"USE_GYRO_KALMAN",
43+
"USE_RANGEFINDER",
44+
"USE_RATE_DYNAMICS",
45+
"USE_SMITH_PREDICTOR",
46+
"USE_ALPHA_BETA_GAMMA_FILTER",
47+
"USE_MAG_VCM5883",
48+
"USE_TELEMETRY_JETIEXBUS",
49+
"USE_NAV",
50+
"USE_SDCARD_SDIO",
51+
"USE_SDCARD",
52+
"USE_Q_TUNE",
53+
"USE_GYRO_FFT_FILTER",
54+
"USE_BARO_DPS310",
3755
"USE_ADAPTIVE_FILTER",
38-
"MCU_FLASH_SIZE 1024",
56+
"MCU_FLASH_SIZE 1024"
3957
],
4058
"configurationProvider": "ms-vscode.cmake-tools"
4159
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target_stm32f405xg(SPEEDYBEEF405AIO HSE_MHZ 8)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* This file is part of Cleanflight.
3+
*
4+
* Cleanflight 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+
* Cleanflight 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 Cleanflight. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
#include <stdint.h>
19+
20+
#include "platform.h"
21+
22+
#include "fc/fc_msp_box.h"
23+
24+
#include "io/piniobox.h"
25+
#include "io/serial.h"
26+
27+
void targetConfiguration(void)
28+
{
29+
serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART6)].functionMask = FUNCTION_RX_SERIAL;
30+
31+
serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART1)].functionMask = FUNCTION_MSP;
32+
serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART1)].msp_baudrateIndex = BAUD_115200;
33+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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+
22+
#include "drivers/bus.h"
23+
#include "drivers/io.h"
24+
#include "drivers/pwm_mapping.h"
25+
#include "drivers/timer.h"
26+
#include "drivers/pinio.h"
27+
#include "drivers/sensor.h"
28+
29+
timerHardware_t timerHardware[] = {
30+
31+
DEF_TIM(TIM2, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1
32+
DEF_TIM(TIM2, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2
33+
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3
34+
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 1 ), // S4
35+
36+
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // LED
37+
};
38+
39+
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
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+
19+
#pragma once
20+
21+
#define TARGET_BOARD_IDENTIFIER "SF4A"
22+
#define USBD_PRODUCT_STRING "SPEEDYBEEF405AIO"
23+
24+
#define LED0 PD7
25+
26+
#define BEEPER PD11
27+
#define BEEPER_INVERTED
28+
29+
/*
30+
* SPI Buses
31+
*/
32+
#define USE_SPI
33+
#define USE_SPI_DEVICE_1
34+
#define SPI1_SCK_PIN PA5
35+
#define SPI1_MISO_PIN PA6
36+
#define SPI1_MOSI_PIN PA7
37+
38+
#define USE_SPI_DEVICE_2
39+
#define SPI2_SCK_PIN PB13
40+
#define SPI2_MISO_PIN PB14
41+
#define SPI2_MOSI_PIN PB15
42+
43+
#define USE_SPI_DEVICE_3
44+
#define SPI3_SCK_PIN PB3
45+
#define SPI3_MISO_PIN PB4
46+
#define SPI3_MOSI_PIN PB5
47+
48+
/*
49+
* I2C
50+
*/
51+
#define USE_I2C
52+
#define USE_I2C_DEVICE_1
53+
#define I2C1_SCL PB8
54+
#define I2C1_SDA PB9
55+
#define DEFAULT_I2C_BUS BUS_I2C1
56+
#define USE_I2C_PULLUP
57+
58+
/*
59+
* Serial
60+
*/
61+
#define USE_VCP
62+
63+
#define USE_UART1
64+
#define UART1_TX_PIN PA9
65+
#define UART1_RX_PIN PA10
66+
67+
#define USE_UART2
68+
#define UART2_TX_PIN NONE
69+
#define UART2_RX_PIN PD6
70+
71+
#define USE_UART3
72+
#define UART3_TX_PIN PD8
73+
#define UART3_RX_PIN PD9
74+
75+
#define USE_UART4
76+
#define UART4_TX_PIN PC10
77+
#define UART4_RX_PIN PC11
78+
79+
#define USE_UART5
80+
#define UART5_TX_PIN PC12
81+
#define UART5_RX_PIN PD2
82+
83+
#define USE_UART6
84+
#define UART6_TX_PIN PC6
85+
#define UART6_RX_PIN PC7
86+
87+
#define SERIAL_PORT_COUNT 7
88+
89+
/*
90+
* Gyro
91+
*/
92+
#define USE_IMU_ICM42605
93+
#define IMU_ICM42605_ALIGN CW180_DEG
94+
#define ICM42605_CS_PIN PA4
95+
#define ICM42605_SPI_BUS BUS_SPI1
96+
97+
/*
98+
* Other
99+
*/
100+
#define USE_BARO
101+
#define BARO_I2C_BUS DEFAULT_I2C_BUS
102+
#define USE_BARO_ALL
103+
104+
#define USE_MAG
105+
#define MAG_I2C_BUS DEFAULT_I2C_BUS
106+
#define USE_MAG_ALL
107+
108+
#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
109+
#define PITOT_I2C_BUS DEFAULT_I2C_BUS
110+
#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
111+
112+
/*
113+
* OSD
114+
*/
115+
#define USE_MAX7456
116+
#define MAX7456_CS_PIN PD5
117+
#define MAX7456_SPI_BUS BUS_SPI3
118+
119+
/*
120+
* Blackbox
121+
*/
122+
#define USE_FLASHFS
123+
#define USE_FLASH_M25P16
124+
#define M25P16_SPI_BUS BUS_SPI2
125+
#define M25P16_CS_PIN PB12
126+
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
127+
128+
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
129+
#define SERIALRX_PROVIDER SERIALRX_CRSF
130+
#define SERIALRX_UART SERIAL_PORT_USART6
131+
132+
// *************** ADC *****************************
133+
#define USE_ADC
134+
#define ADC_INSTANCE ADC1
135+
#define ADC1_DMA_STREAM DMA2_Stream0
136+
137+
#define ADC_CHANNEL_1_PIN PC0
138+
#define ADC_CHANNEL_2_PIN PC2
139+
140+
#define VBAT_ADC_CHANNEL ADC_CHN_1
141+
#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
142+
143+
// *************** LEDSTRIP ************************
144+
#define USE_LED_STRIP
145+
#define WS2811_PIN PA8
146+
147+
#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
148+
#define CURRENT_METER_SCALE 254
149+
#define CURRENT_METER_OFFSET 0
150+
151+
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
152+
153+
#define TARGET_IO_PORTA 0xffff
154+
#define TARGET_IO_PORTB 0xffff
155+
#define TARGET_IO_PORTC 0xffff
156+
#define TARGET_IO_PORTD 0xffff
157+
158+
#define MAX_PWM_OUTPUT_PORTS 4
159+
160+
#define USE_DSHOT
161+
#define USE_SERIALSHOT
162+
#define USE_ESC_SENSOR

src/main/target/SPEEDYBEEF405MINI/target.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@
101101
*/
102102
#define USE_BARO
103103
#define BARO_I2C_BUS BUS_I2C1
104-
#define USE_BARO_BMP280
105-
#define USE_BARO_MS5611
106104
#define USE_BARO_DPS310
107105

108106
#define USE_MAG

0 commit comments

Comments
 (0)