Unverified Commit 14539dbd authored by Paweł Spychalski's avatar Paweł Spychalski Committed by GitHub
Browse files

Merge pull request #6807 from nmaggioni/nm_zeezf7v2

ZEEZF7V2 target
parents 209e47c3 c7b9637a
target_stm32f722xe(ZEEZF7)
target_stm32f722xe(ZEEZF7V2)
......@@ -25,6 +25,8 @@
void targetConfiguration(void)
{
#ifndef ZEEZF7V2
pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1; // VTX power switcher
//pinioBoxConfigMutable()->permanentId[1] = BOX_PERMANENT_ID_USER2;
#endif
}
......@@ -25,10 +25,21 @@
#include "drivers/timer.h"
const timerHardware_t timerHardware[] = {
#ifdef ZEEZF7V2
DEF_TIM(TIM4, CH2, PB7, TIM_USE_MC_MOTOR, 0, 0), // S1
DEF_TIM(TIM4, CH1, PB6, TIM_USE_MC_MOTOR, 0, 0), // S2
DEF_TIM(TIM3, CH1, PB4, TIM_USE_MC_MOTOR, 0, 0), // S3
DEF_TIM(TIM2, CH2, PB3, TIM_USE_MC_MOTOR, 0, 0), // S4
DEF_TIM(TIM3, CH3, PC8, TIM_USE_MC_MOTOR, 0, 0), // S5
DEF_TIM(TIM3, CH2, PC7, TIM_USE_MC_MOTOR, 0, 0), // S6
DEF_TIM(TIM8, CH1, PC6, TIM_USE_MC_MOTOR, 0, 0), // S7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MC_MOTOR, 0, 0), // S8
#else
DEF_TIM(TIM4, CH3, PB8, TIM_USE_MC_MOTOR, 0, 0), // S1
DEF_TIM(TIM4, CH2, PB7, TIM_USE_MC_MOTOR, 0, 0), // S2
DEF_TIM(TIM4, CH1, PB6, TIM_USE_MC_MOTOR, 0, 0), // S3
DEF_TIM(TIM3, CH1, PB4, TIM_USE_MC_MOTOR, 0, 0), // S4
#endif
DEF_TIM(TIM1, CH2N, PB0, TIM_USE_LED , 0, 0), // LED STRIP
};
......
......@@ -17,9 +17,13 @@
#pragma once
#ifdef ZEEZF7V2
#define TARGET_BOARD_IDENTIFIER "ZEF7V2"
#define USBD_PRODUCT_STRING "ZEEZF7V2"
#else
#define TARGET_BOARD_IDENTIFIER "ZEF7"
#define USBD_PRODUCT_STRING "ZEEZF7"
#endif
#define LED0 PC14
#define LED1 PC15
......@@ -29,6 +33,21 @@
// *************** Gyro & ACC **********************
#define USE_SPI
#ifdef ZEEZF7V2
#define USE_SPI_DEVICE_1
#define SPI1_SCK_PIN PA5
#define SPI1_MISO_PIN PA6
#define SPI1_MOSI_PIN PA7
#define MPU6000_CS_PIN PA4
#define MPU6000_SPI_BUS BUS_SPI1
#define GYRO_INT_EXTI PC4
#define IMU_MPU6000_ALIGN CW0_DEG
#else
#define USE_SPI_DEVICE_2
#define SPI2_SCK_PIN PB13
#define SPI2_MISO_PIN PB14
......@@ -36,15 +55,44 @@
#define MPU6000_CS_PIN PB12
#define MPU6000_SPI_BUS BUS_SPI2
#define GYRO_INT_EXTI PC9
#define IMU_MPU6000_ALIGN CW180_DEG
#endif
#define USE_EXTI
#define GYRO_INT_EXTI PC9
#define USE_MPU_DATA_READY_SIGNAL
#define USE_IMU_MPU6000
#define IMU_MPU6000_ALIGN CW180_DEG
// *************** I2C/Baro/Mag *********************
#ifdef ZEEZF7V2
#define USE_I2C
#define USE_BARO
#define USE_BARO_BMP280
#define BARO_I2C_BUS BUS_I2C1
#define USE_I2C_DEVICE_1
#define I2C1_SCL PB8
#define I2C1_SDA PB9
// External I2C Pads -- I2C2
#define USE_I2C_DEVICE_2
#define I2C2_SCL PA8
#define I2C2_SDA PC9
#define USE_MAG
#define MAG_I2C_BUS BUS_I2C2
#define USE_MAG_HMC5883
#define USE_MAG_QMC5883
#define USE_MAG_IST8310
#define USE_MAG_IST8308
#define USE_MAG_MAG3110
#define USE_MAG_LIS3MDL
#define USE_MAG_AK8975
#else
// Target has no I2C but can use MSP devices, such as those provided on Mateksys MQ8-CAN/MSP
// Which contains: GPS SAM-M8Q, Compass QMC5883L, Barometer DPS310
// See: http://www.mateksys.com/?portfolio=m8q-can
......@@ -55,18 +103,34 @@
#define USE_MAG
#define USE_MAG_QMC5883
#endif
// *************** Flash ****************************
#define USE_SPI_DEVICE_1
#ifdef ZEEZF7V2
#define USE_SPI_DEVICE_2
#define SPI2_SCK_PIN PB13
#define SPI2_MISO_PIN PC2
#define SPI2_MOSI_PIN PC3
#define M25P16_SPI_BUS BUS_SPI2
#define M25P16_CS_PIN PB12
#else
#define USE_SPI_DEVICE_1
#define SPI1_SCK_PIN PA5
#define SPI1_MISO_PIN PA6
#define SPI1_MOSI_PIN PA7
#define USE_FLASHFS
#define USE_FLASH_M25P16
#define M25P16_SPI_BUS BUS_SPI1
#define M25P16_CS_PIN PA4
#endif
#define USE_FLASHFS
#define USE_FLASH_M25P16
#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
// *************** OSD *****************************
......@@ -82,14 +146,16 @@
#define MAX7456_CS_PIN PA15
// *************** PINIO ***************************
#ifdef ZEEZF7
#define USE_PINIO
#define USE_PINIOBOX
#define PINIO1_PIN PB11 // VTX power switcher
#endif
// *************** UART *****************************
#define USE_VCP
//#define VBUS_SENSING_PIN PB12
//#define VBUS_SENSING_ENABLED
#define USE_UART1
#define UART1_RX_PIN PA10
......@@ -111,12 +177,20 @@
#define UART5_RX_PIN PD2
#define UART5_TX_PIN PC12
#ifdef ZEEZF7V2
#define SERIAL_PORT_COUNT 6
#else
#define USE_UART6
#define UART6_RX_PIN PC7
#define UART6_TX_PIN PC6
#define SERIAL_PORT_COUNT 7
#endif
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS
#define SERIALRX_UART SERIAL_PORT_USART4
......@@ -125,15 +199,24 @@
#define USE_ADC
#define ADC_INSTANCE ADC1
#define ADC1_DMA_STREAM DMA2_Stream0
#ifdef ZEEZF7V2
#define ADC_CHANNEL_1_PIN PC0
#define ADC_CHANNEL_2_PIN PC1
#else
#define ADC_CHANNEL_1_PIN PC2
#define ADC_CHANNEL_2_PIN PC3
#endif
#define VBAT_ADC_CHANNEL ADC_CHN_1
#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD )
#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_LED_STRIP)
#ifdef ZEEZF7V2
#define CURRENT_METER_SCALE 250
#endif
#define USE_LED_STRIP
#define WS2811_PIN PB0
#define WS2811_PIN PB0
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
......@@ -142,7 +225,11 @@
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD (BIT(2))
#define MAX_PWM_OUTPUT_PORTS 4
#ifdef ZEEZF7V2
#define MAX_PWM_OUTPUT_PORTS 8
#else
#define MAX_PWM_OUTPUT_PORTS 4
#endif
#define USE_DSHOT
#define USE_ESC_SENSOR
#define USE_SERIALSHOT
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment