Skip to content

Commit aa85436

Browse files
authored
Merge pull request #9869 from iNavFlight/dzikuvx-iflight-2raw-h743
iflight 2raw h743
2 parents 59a6ee6 + 68412e6 commit aa85436

File tree

4 files changed

+248
-0
lines changed

4 files changed

+248
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
target_stm32h743xi(IFLIGHT_2RAW_H743)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
#include "fc/config.h"
24+
25+
#include "io/piniobox.h"
26+
27+
void targetConfiguration(void)
28+
{
29+
pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1;
30+
pinioBoxConfigMutable()->permanentId[1] = BOX_PERMANENT_ID_USER2;
31+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
31+
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 1), // S2
32+
33+
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 2), // S3
34+
DEF_TIM(TIM5, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 3), // S4
35+
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 4), // S5
36+
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 5), // S6
37+
38+
DEF_TIM(TIM4, CH1, PD12, TIM_USE_OUTPUT_AUTO, 0, 6), // S7
39+
DEF_TIM(TIM4, CH2, PD13, TIM_USE_OUTPUT_AUTO, 0, 7), // S8
40+
DEF_TIM(TIM4, CH3, PD14, TIM_USE_OUTPUT_AUTO, 0, 0), // S9
41+
DEF_TIM(TIM4, CH4, PD15, TIM_USE_OUTPUT_AUTO, 0, 0), // S10 DMA_NONE
42+
43+
DEF_TIM(TIM15, CH1, PE5, TIM_USE_OUTPUT_AUTO, 0, 0), // S11
44+
DEF_TIM(TIM15, CH2, PE6, TIM_USE_OUTPUT_AUTO, 0, 0), // S12 DMA_NONE
45+
46+
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 9), // LED_2812
47+
};
48+
49+
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
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 "2RH7"
22+
23+
#define USBD_PRODUCT_STRING "IFLIGHT_2RAW_H743"
24+
25+
#define LED0 PE3
26+
#define LED1 PE4
27+
28+
#define BEEPER PC9
29+
#define BEEPER_INVERTED
30+
31+
// SPI Buses
32+
#define USE_SPI
33+
34+
#define USE_SPI_DEVICE_1
35+
#define SPI1_SCK_PIN PA5
36+
#define SPI1_MISO_PIN PA6
37+
#define SPI1_MOSI_PIN PD7
38+
39+
#define USE_SPI_DEVICE_2
40+
#define SPI2_SCK_PIN PB13
41+
#define SPI2_MISO_PIN PB14
42+
#define SPI2_MOSI_PIN PB15
43+
44+
#define USE_SPI_DEVICE_3
45+
#define SPI3_SCK_PIN PC10
46+
#define SPI3_MISO_PIN PC11
47+
#define SPI3_MOSI_PIN PC12
48+
49+
// I2C
50+
#define USE_I2C
51+
#define USE_I2C_DEVICE_1
52+
#define I2C1_SCL PB6
53+
#define I2C1_SDA PB7
54+
55+
#define USE_I2C_DEVICE_2
56+
#define I2C2_SCL PB10
57+
#define I2C2_SDA PB11
58+
59+
// Gyro
60+
#define USE_IMU_ICM42605
61+
#define IMU_ICM42605_ALIGN CW0_DEG
62+
#define ICM42605_SPI_BUS BUS_SPI1
63+
#define ICM42605_CS_PIN PC15
64+
65+
// OSD
66+
// #define USE_MAX7456
67+
// #define MAX7456_SPI_BUS BUS_SPI2
68+
// #define MAX7456_CS_PIN PB12
69+
70+
#define USE_BARO
71+
#define BARO_I2C_BUS BUS_I2C2
72+
#define USE_BARO_ALL
73+
74+
#define USE_MAG
75+
#define MAG_I2C_BUS BUS_I2C1
76+
#define USE_MAG_ALL
77+
78+
#define TEMPERATURE_I2C_BUS BUS_I2C1
79+
#define PITOT_I2C_BUS BUS_I2C1
80+
#define RANGEFINDER_I2C_BUS BUS_I2C1
81+
82+
// *************** UART *****************************
83+
#define USE_VCP
84+
85+
#define USE_UART1
86+
#define UART1_TX_PIN PA9
87+
#define UART1_RX_PIN PA10
88+
89+
#define USE_UART2
90+
#define UART2_TX_PIN PD5
91+
#define UART2_RX_PIN PD6
92+
93+
#define USE_UART3
94+
#define UART3_TX_PIN PD8
95+
#define UART3_RX_PIN PD9
96+
97+
#define USE_UART4
98+
#define UART4_TX_PIN PB9
99+
#define UART4_RX_PIN PB8
100+
101+
#define USE_UART6
102+
#define UART6_TX_PIN PC6
103+
#define UART6_RX_PIN PC7
104+
105+
#define USE_UART7
106+
#define UART7_TX_PIN PE8
107+
#define UART7_RX_PIN PE7
108+
109+
#define USE_UART8
110+
#define UART8_TX_PIN PE1
111+
#define UART8_RX_PIN PE0
112+
113+
#define SERIAL_PORT_COUNT 8
114+
115+
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
116+
#define SERIALRX_PROVIDER SERIALRX_CRSF
117+
#define SERIALRX_UART SERIAL_PORT_USART6
118+
119+
// SD Card
120+
#define USE_SDCARD
121+
#define USE_SDCARD_SPI
122+
#define SDCARD_SPI_BUS BUS_SPI3
123+
#define SDCARD_CS_PIN PA15
124+
125+
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
126+
127+
// ADC
128+
#define USE_ADC
129+
#define ADC_INSTANCE ADC1
130+
131+
#define ADC_CHANNEL_1_PIN PC0
132+
#define ADC_CHANNEL_2_PIN PC1
133+
#define ADC_CHANNEL_3_PIN PC5
134+
#define ADC_CHANNEL_4_PIN PC4
135+
136+
#define VBAT_ADC_CHANNEL ADC_CHN_1
137+
#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
138+
#define RSSI_ADC_CHANNEL ADC_CHN_3
139+
#define AIRSPEED_ADC_CHANNEL ADC_CHN_4
140+
141+
#define VBAT_SCALE_DEFAULT 2100
142+
143+
// PINIO
144+
#define USE_PINIO
145+
#define USE_PINIOBOX
146+
#define PINIO1_PIN PD10
147+
#define PINIO2_PIN PD11
148+
149+
// *************** LEDSTRIP ************************
150+
// #define USE_LED_STRIP
151+
// #define WS2811_PIN PA8
152+
153+
#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX)
154+
#define CURRENT_METER_SCALE 250
155+
156+
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
157+
158+
#define TARGET_IO_PORTA 0xffff
159+
#define TARGET_IO_PORTB 0xffff
160+
#define TARGET_IO_PORTC 0xffff
161+
#define TARGET_IO_PORTD 0xffff
162+
#define TARGET_IO_PORTE 0xffff
163+
164+
#define MAX_PWM_OUTPUT_PORTS 12
165+
#define USE_DSHOT
166+
#define USE_ESC_SENSOR
167+

0 commit comments

Comments
 (0)