Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Matek H743 #12447

Merged
merged 1 commit into from
Mar 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
52 changes: 47 additions & 5 deletions src/config/MATEKH743/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@
* If not, see <http://www.gnu.org/licenses/>.
*/

/*
This file has been auto generated from unified-targets repo.

The auto generation is transitional only, please remove this comment once the file is edited.
*/

#pragma once

#define FC_TARGET_MCU STM32H743

#define BOARD_NAME MATEKH743
Expand Down Expand Up @@ -85,7 +93,9 @@
#define ADC_VBAT_PIN PC0
#define ADC_RSSI_PIN PC5
#define ADC_CURR_PIN PC1
#define ADC_EXTERNAL1_PIN PC4
#define EXTERNAL1_ADC_PIN PC4 //ADC12 AirS
#define EXTERNAL2_ADC_PIN PA4 //ADC12 VB2
#define EXTERNAL3_ADC_PIN PA7 //ADC12 CU2
#define SDIO_CK_PIN PC12
#define SDIO_CMD_PIN PD2
#define SDIO_D0_PIN PC8
Expand All @@ -99,6 +109,11 @@
#define GYRO_2_EXTI_PIN PE15
#define GYRO_1_CS_PIN PC15
#define GYRO_2_CS_PIN PE11
#define USB_DETECT_PIN PE2
#define VBAT_ADC_PIN PC0 //ADC123 VBAT1
#define CURRENT_METER_ADC_PIN PC1 //ADC123 CURR1
#define RSSI_ADC_PIN PC5 //ADC12 RSSI


#define TIMER_PIN_MAPPING \
TIMER_PIN_MAP( 0, PB0 , 2, 0) \
Expand All @@ -118,7 +133,7 @@
TIMER_PIN_MAP(14, PC7 , 2, 0) \
TIMER_PIN_MAP(15, PC6 , 2, 0) \
TIMER_PIN_MAP(16, PB8 , 1, 0) \
TIMER_PIN_MAP(17, PB9 , 1, 0) \
TIMER_PIN_MAP(17, PB9 , 1, 0)



Expand All @@ -136,18 +151,29 @@
//TODO #define BARO_BUSTYPE I2C
#define BARO_I2C_INSTANCE (I2CDEV_2)
//TODO #define SERIALRX_PROVIDER SBUS
#define USE_SOFTSERIAL1
#define SOFTSERIAL1_TX_PIN PC6 // TX6 Pad
#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS
#define SERIALRX_UART SERIAL_PORT_USART6
//TODO #define BLACKBOX_DEVICE SDCARD
#define USE_BLACKBOX
#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
//TODO #define CURRENT_METER ADC
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
//TODO #define BATTERY_METER ADC
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define VBAT_SCALE_DEFAULT 110
//TODO #define IBATA_SCALE 250
#define CURRENT_METER_SCALE_DEFAULT 250
#define BEEPER_INVERTED
//TODO #define BEEPER_OD OFF
#define BEEPER_PWM_HZ 2500

#define SDIO_USE_4BIT 1
#define SDIO_DEVICE SDIODEV_1
#define USE_SDCARD_SDIO

#define SDCARD_DETECT_PIN NONE
#define SDIO_DEVICE SDIODEV_1
#define SDIO_USE_4BIT 1
#define MAX7456_SPI_INSTANCE SPI2

//TODO #define PINIO_BOX 40,41,255,255
Expand All @@ -158,3 +184,19 @@
#define GYRO_2_SPI_INSTANCE SPI4
#define GYRO_2_ALIGN CW0_DEG_FLIP
#define GYRO_2_ALIGN_PITCH 1800

#define USE_MPU_DATA_READY_SIGNAL
#define ENSURE_MPU_DATA_READY_IS_LOW
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_1
#define USE_VCP
#define USE_USB_DETECT

#define USE_DMA
#define ADC1_DMA_OPT 8
#define ADC3_DMA_OPT 9

#define USE_ADC
#define USE_ADC_INTERNAL // ADC3

#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY )
#define USE_ESCSERIAL