Merge pull request #2942 from AlienWiiBF/AF_update
Alienflight targets configuration cleanup
This commit is contained in:
commit
1ad0546af3
|
@ -29,19 +29,6 @@
|
||||||
|
|
||||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||||
// up to 10 Motor Outputs
|
// up to 10 Motor Outputs
|
||||||
/*
|
|
||||||
DEF_TIM(TIM15, CH2, PB15, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM1 - PB15 - DMA_NONE - TIM1_CH3N, TIM15_CH1N, *TIM15_CH2
|
|
||||||
DEF_TIM(TIM15, CH1, PB14, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM2 - PB14 - DMA1_CH5 - TIM1_CH2N, *TIM15_CH1
|
|
||||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM3 - PA8 - DMA1_CH2 - *TIM1_CH1, TIM4_ETR
|
|
||||||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM4 - PB0 - DMA1_CH2 - *TIM3_CH3, TIM1_CH2N, TIM8_CH2N
|
|
||||||
DEF_TIM(TIM3, CH1, PA6, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM5 - PA6 - DMA1_CH6 - *TIM3_CH1, TIM8_BKIN, TIM1_BKIN, TIM16_CH1
|
|
||||||
DEF_TIM(TIM2, CH3, PA2, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM6 - PA2 - DMA1_CH1 - *TIM2_CH3, !TIM15_CH1
|
|
||||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM7 - PB1 - DMA1_CH3 - *TIM3_CH4, TIM1_CH3N, TIM8_CH3N
|
|
||||||
DEF_TIM(TIM17, CH1, PA7, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM8 - PA7 - DMA1_CH7 - !TIM3_CH2, *TIM17_CH1, TIM1_CH1N, TIM8_CH1
|
|
||||||
DEF_TIM(TIM3, CH2, PA4, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM9 - PA4 - DMA_NONE - *TIM3_CH2
|
|
||||||
DEF_TIM(TIM2, CH2, PA1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM10 - PA1 - DMA1_CH7 - *TIM2_CH2, TIM15_CH1N
|
|
||||||
DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, TIMER_INPUT_ENABLED ), // PPM - PA3 - TIM2_CH4, TIM15_CH2 - PWM13
|
|
||||||
*/
|
|
||||||
DEF_TIM(TIM1, CH3N, PB15, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED | TIMER_OUTPUT_INVERTED ), // PWM1 - PB15 - DMA1_CH6 - *TIM1_CH3N, TIM15_CH1N, TIM15_CH2
|
DEF_TIM(TIM1, CH3N, PB15, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED | TIMER_OUTPUT_INVERTED ), // PWM1 - PB15 - DMA1_CH6 - *TIM1_CH3N, TIM15_CH1N, TIM15_CH2
|
||||||
DEF_TIM(TIM15, CH1, PB14, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM2 - PB14 - DMA1_CH5 - TIM1_CH2N, *TIM15_CH1
|
DEF_TIM(TIM15, CH1, PB14, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM2 - PB14 - DMA1_CH5 - TIM1_CH2N, *TIM15_CH1
|
||||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM3 - PA8 - DMA1_CH2 - *TIM1_CH1, TIM4_ETR
|
DEF_TIM(TIM1, CH1, PA8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED ), // PWM3 - PA8 - DMA1_CH2 - *TIM1_CH1, TIM4_ETR
|
||||||
|
|
|
@ -96,16 +96,15 @@
|
||||||
#define I2C2_SCL PA9
|
#define I2C2_SCL PA9
|
||||||
#define I2C2_SDA PA10
|
#define I2C2_SDA PA10
|
||||||
|
|
||||||
// SPI3
|
|
||||||
// PA15 38 SPI3_NSS
|
|
||||||
// PB3 39 SPI3_SCK
|
|
||||||
// PB4 40 SPI3_MISO
|
|
||||||
// PB5 41 SPI3_MOSI
|
|
||||||
|
|
||||||
#define USE_SPI
|
#define USE_SPI
|
||||||
#define USE_SPI_DEVICE_3
|
#define USE_SPI_DEVICE_3
|
||||||
|
|
||||||
#define MPU6500_CS_PIN PA15
|
#define SPI3_NSS_PIN PA15
|
||||||
|
#define SPI3_SCK_PIN PB3
|
||||||
|
#define SPI3_MISO_PIN PB4
|
||||||
|
#define SPI3_MOSI_PIN PB5
|
||||||
|
|
||||||
|
#define MPU6500_CS_PIN SPI3_NSS_PIN
|
||||||
#define MPU6500_SPI_INSTANCE SPI3
|
#define MPU6500_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
|
@ -114,6 +113,9 @@
|
||||||
#define VBAT_ADC_PIN PA4
|
#define VBAT_ADC_PIN PA4
|
||||||
#define VBAT_SCALE_DEFAULT 20
|
#define VBAT_SCALE_DEFAULT 20
|
||||||
|
|
||||||
|
// LED strip configuration.
|
||||||
|
#define LED_STRIP
|
||||||
|
|
||||||
#define SPEKTRUM_BIND_PIN UART2_RX_PIN
|
#define SPEKTRUM_BIND_PIN UART2_RX_PIN
|
||||||
|
|
||||||
#define BINDPLUG_PIN PB12
|
#define BINDPLUG_PIN PB12
|
||||||
|
|
|
@ -30,21 +30,6 @@
|
||||||
// If UART1 is used motor 8 will not work.
|
// If UART1 is used motor 8 will not work.
|
||||||
|
|
||||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||||
/*
|
|
||||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_PWM | TIM_USE_PPM, TIMER_INPUT_ENABLED, 0), // PWM1 - PA8 RC1
|
|
||||||
DEF_TIM(TIM1, CH2, PB0, TIM_USE_PWM, TIMER_INPUT_ENABLED, 0), // PWM2 - PB0 RC2
|
|
||||||
DEF_TIM(TIM1, CH3, PB1, TIM_USE_PWM, TIMER_INPUT_ENABLED, 0), // PWM3 - PB1 RC3
|
|
||||||
DEF_TIM(TIM8, CH2, PB14, TIM_USE_PWM, TIMER_INPUT_ENABLED, 0), // PWM4 - PA14 RC4
|
|
||||||
DEF_TIM(TIM8, CH3, PB15, TIM_USE_PWM, TIMER_INPUT_ENABLED, 0), // PWM5 - PA15 RC5
|
|
||||||
DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // PWM6 - PB8 OUT1 - DMA1_ST7
|
|
||||||
DEF_TIM(TIM4, CH4, PB9, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // PWM7 - PB9 OUT2 - DMA1_ST3
|
|
||||||
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // PWM8 - PA0 OUT3 - DMA1_ST2
|
|
||||||
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // PWM9 - PA1 OUT4 - DMA1_ST4
|
|
||||||
DEF_TIM(TIM3, CH1, PC6, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // PWM10 - PC6 OUT5 - (DMA1_ST4)
|
|
||||||
DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // PWM11 - PC7 OUT6 - DMA1_ST5
|
|
||||||
DEF_TIM(TIM3, CH3, PC8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // PWM13 - PC8 OUT7 - (DMA1_ST7)
|
|
||||||
DEF_TIM(TIM3, CH4, PC9, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED, 0), // PWM13 - PC9 OUT8 - (DMA1_ST2)
|
|
||||||
*/
|
|
||||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_PWM | TIM_USE_PPM, TIMER_INPUT_ENABLED, 1), // PWM1 - PA8 RC1 - DMA2_ST6, *DMA2_ST1, DMA2_ST3
|
DEF_TIM(TIM1, CH1, PA8, TIM_USE_PWM | TIM_USE_PPM, TIMER_INPUT_ENABLED, 1), // PWM1 - PA8 RC1 - DMA2_ST6, *DMA2_ST1, DMA2_ST3
|
||||||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_PWM, TIMER_INPUT_ENABLED, 0), // PWM2 - PB0 RC2 - DMA1_ST5
|
DEF_TIM(TIM3, CH3, PB0, TIM_USE_PWM, TIMER_INPUT_ENABLED, 0), // PWM2 - PB0 RC2 - DMA1_ST5
|
||||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_PWM, TIMER_INPUT_ENABLED, 0), // PWM3 - PB1 RC3 - DMA1_ST7
|
DEF_TIM(TIM3, CH4, PB1, TIM_USE_PWM, TIMER_INPUT_ENABLED, 0), // PWM3 - PB1 RC3 - DMA1_ST7
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#define USE_MPU_DATA_READY_SIGNAL
|
#define USE_MPU_DATA_READY_SIGNAL
|
||||||
#define ENSURE_MPU_DATA_READY_IS_LOW
|
#define ENSURE_MPU_DATA_READY_IS_LOW
|
||||||
|
|
||||||
#define MPU6500_CS_PIN PA4
|
#define MPU6500_CS_PIN SPI1_NSS_PIN
|
||||||
#define MPU6500_SPI_INSTANCE SPI1
|
#define MPU6500_SPI_INSTANCE SPI1
|
||||||
|
|
||||||
#define ACC
|
#define ACC
|
||||||
|
@ -80,12 +80,10 @@
|
||||||
// Divide to under 25MHz for normal operation:
|
// Divide to under 25MHz for normal operation:
|
||||||
#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 // 21MHz
|
#define SDCARD_SPI_FULL_SPEED_CLOCK_DIVIDER 4 // 21MHz
|
||||||
|
|
||||||
//#ifndef USE_DSHOT
|
|
||||||
#define SDCARD_DMA_CHANNEL_TX DMA1_Stream4
|
#define SDCARD_DMA_CHANNEL_TX DMA1_Stream4
|
||||||
#define SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG DMA_FLAG_TCIF4
|
#define SDCARD_DMA_CHANNEL_TX_COMPLETE_FLAG DMA_FLAG_TCIF4
|
||||||
#define SDCARD_DMA_CLK RCC_AHB1Periph_DMA1
|
#define SDCARD_DMA_CLK RCC_AHB1Periph_DMA1
|
||||||
#define SDCARD_DMA_CHANNEL DMA_Channel_0
|
#define SDCARD_DMA_CHANNEL DMA_Channel_0
|
||||||
//#endif
|
|
||||||
|
|
||||||
// Performance logging for SD card operations:
|
// Performance logging for SD card operations:
|
||||||
// #define AFATFS_USE_INTROSPECTIVE_LOGGING
|
// #define AFATFS_USE_INTROSPECTIVE_LOGGING
|
||||||
|
@ -101,7 +99,6 @@
|
||||||
#define USE_UART1
|
#define USE_UART1
|
||||||
#define UART1_RX_PIN PA10
|
#define UART1_RX_PIN PA10
|
||||||
#define UART1_TX_PIN PA9
|
#define UART1_TX_PIN PA9
|
||||||
#define UART1_AHB1_PERIPHERALS RCC_AHB1Periph_DMA2
|
|
||||||
|
|
||||||
#define USE_UART2
|
#define USE_UART2
|
||||||
#define UART2_RX_PIN PA3
|
#define UART2_RX_PIN PA3
|
||||||
|
@ -115,10 +112,6 @@
|
||||||
#define UART4_RX_PIN PC10
|
#define UART4_RX_PIN PC10
|
||||||
#define UART4_TX_PIN PC11
|
#define UART4_TX_PIN PC11
|
||||||
|
|
||||||
//#define USE_UART5
|
|
||||||
//#define UART5_RX_PIN PD2
|
|
||||||
//#define UART5_TX_PIN PC12
|
|
||||||
|
|
||||||
#define USE_SOFTSERIAL1
|
#define USE_SOFTSERIAL1
|
||||||
#define USE_SOFTSERIAL2
|
#define USE_SOFTSERIAL2
|
||||||
|
|
||||||
|
@ -130,12 +123,22 @@
|
||||||
#define USE_SPI
|
#define USE_SPI
|
||||||
#define USE_SPI_DEVICE_1
|
#define USE_SPI_DEVICE_1
|
||||||
#define USE_SPI_DEVICE_2
|
#define USE_SPI_DEVICE_2
|
||||||
|
#define USE_SPI_DEVICE_3
|
||||||
|
|
||||||
|
#define SPI1_NSS_PIN PA4
|
||||||
|
#define SPI1_SCK_PIN PA5
|
||||||
|
#define SPI1_MISO_PIN PA6
|
||||||
|
#define SPI1_MOSI_PIN PA7
|
||||||
|
|
||||||
#define SPI2_NSS_PIN PB12
|
#define SPI2_NSS_PIN PB12
|
||||||
#define SPI2_SCK_PIN PB13
|
#define SPI2_SCK_PIN PB13
|
||||||
#define SPI2_MISO_PIN PC2
|
#define SPI2_MISO_PIN PC2
|
||||||
#define SPI2_MOSI_PIN PC3
|
#define SPI2_MOSI_PIN PC3
|
||||||
|
|
||||||
#define USE_SPI_DEVICE_3
|
#define SPI3_NSS_PIN PA15
|
||||||
|
#define SPI3_SCK_PIN PB3
|
||||||
|
#define SPI3_MISO_PIN PB4
|
||||||
|
#define SPI3_MOSI_PIN PB5
|
||||||
|
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
#define USE_I2C_PULLUP
|
#define USE_I2C_PULLUP
|
||||||
|
@ -155,6 +158,9 @@
|
||||||
#define CURRENT_METER_OFFSET_DEFAULT 2500 // ACS712/714-30A - 0A = 2.5V
|
#define CURRENT_METER_OFFSET_DEFAULT 2500 // ACS712/714-30A - 0A = 2.5V
|
||||||
#define CURRENT_METER_SCALE_DEFAULT -667 // ACS712/714-30A - 66.666 mV/A inverted mode
|
#define CURRENT_METER_SCALE_DEFAULT -667 // ACS712/714-30A - 66.666 mV/A inverted mode
|
||||||
|
|
||||||
|
// LED strip configuration.
|
||||||
|
#define LED_STRIP
|
||||||
|
|
||||||
#define SPEKTRUM_BIND_PIN UART2_RX_PIN
|
#define SPEKTRUM_BIND_PIN UART2_RX_PIN
|
||||||
|
|
||||||
#define BINDPLUG_PIN PB2
|
#define BINDPLUG_PIN PB2
|
||||||
|
|
|
@ -62,9 +62,13 @@
|
||||||
|
|
||||||
#define BARO
|
#define BARO
|
||||||
#define USE_BARO_MS5611
|
#define USE_BARO_MS5611
|
||||||
|
#define USE_BARO_SPI_MS5611
|
||||||
#define USE_BARO_BMP280
|
#define USE_BARO_BMP280
|
||||||
#define USE_BARO_SPI_BMP280
|
#define USE_BARO_SPI_BMP280
|
||||||
|
|
||||||
|
#define MS5611_CS_PIN SPI3_NSS_PIN
|
||||||
|
#define MS5611_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
#define BMP280_CS_PIN SPI3_NSS_PIN
|
#define BMP280_CS_PIN SPI3_NSS_PIN
|
||||||
#define BMP280_SPI_INSTANCE SPI3
|
#define BMP280_SPI_INSTANCE SPI3
|
||||||
|
|
||||||
|
@ -118,11 +122,10 @@
|
||||||
#define UART4_RX_PIN PC10
|
#define UART4_RX_PIN PC10
|
||||||
#define UART4_TX_PIN PC11
|
#define UART4_TX_PIN PC11
|
||||||
|
|
||||||
//#define USE_UART5
|
#define USE_SOFTSERIAL1
|
||||||
//#define UART5_RX_PIN PD2
|
#define USE_SOFTSERIAL2
|
||||||
//#define UART5_TX_PIN PC12
|
|
||||||
|
|
||||||
#define SERIAL_PORT_COUNT 4
|
#define SERIAL_PORT_COUNT 6
|
||||||
|
|
||||||
//#define USE_ESCSERIAL
|
//#define USE_ESCSERIAL
|
||||||
//#define ESCSERIAL_TIMER_TX_HARDWARE 0 // PWM 1
|
//#define ESCSERIAL_TIMER_TX_HARDWARE 0 // PWM 1
|
||||||
|
@ -149,14 +152,14 @@
|
||||||
|
|
||||||
#define USE_I2C
|
#define USE_I2C
|
||||||
#define USE_I2C_PULLUP
|
#define USE_I2C_PULLUP
|
||||||
|
#define USE_I2C_DEVICE_1
|
||||||
#define I2C_DEVICE (I2CDEV_1)
|
#define I2C_DEVICE (I2CDEV_1)
|
||||||
//#define I2C_DEVICE_EXT (I2CDEV_2)
|
|
||||||
#define I2C1_SCL PB6
|
#define I2C1_SCL PB6
|
||||||
#define I2C1_SDA PB7
|
#define I2C1_SDA PB7
|
||||||
|
|
||||||
#define USE_ADC
|
#define USE_ADC
|
||||||
#define BOARD_HAS_VOLTAGE_DIVIDER
|
//#define BOARD_HAS_VOLTAGE_DIVIDER
|
||||||
#define BOARD_HAS_CURRENT_SENSOR
|
//#define BOARD_HAS_CURRENT_SENSOR
|
||||||
#define VBAT_ADC_PIN PC0
|
#define VBAT_ADC_PIN PC0
|
||||||
#define CURRENT_METER_ADC_PIN PC1
|
#define CURRENT_METER_ADC_PIN PC1
|
||||||
#define RSSI_ADC_PIN PC4
|
#define RSSI_ADC_PIN PC4
|
||||||
|
|
Loading…
Reference in New Issue