From 3644f9c0d9fb6e959349fdf0069eb208d6cbef2b Mon Sep 17 00:00:00 2001 From: emsr Date: Tue, 2 Jan 2024 22:30:35 +0800 Subject: [PATCH] fix adc dma conflict FIX SAGEATF4 S8 DMA CONFLIECT WITH ADC --- src/main/target/NEUTRONRCF435MINI/target.c | 2 +- src/main/target/NEUTRONRCF435MINI/target.h | 2 +- src/main/target/NEUTRONRCF435SE/target.c | 2 +- src/main/target/NEUTRONRCF435SE/target.h | 2 +- src/main/target/SAGEATF4/target.h | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/target/NEUTRONRCF435MINI/target.c b/src/main/target/NEUTRONRCF435MINI/target.c index 472867af578..9400ae4be1b 100644 --- a/src/main/target/NEUTRONRCF435MINI/target.c +++ b/src/main/target/NEUTRONRCF435MINI/target.c @@ -26,7 +26,7 @@ timerHardware_t timerHardware[] = { - DEF_TIM(TMR1, CH1, PA8, TIM_USE_ANY |TIM_USE_LED, 0,7), // PWM1 - LED MCO1 DMA1 CH2 + DEF_TIM(TMR1, CH1, PA8, TIM_USE_ANY |TIM_USE_LED, 0,6), // PWM1 - LED MCO1 DMA1 CH2 DEF_TIM(TMR4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0,0), // motor1 DMA2 CH7 DEF_TIM(TMR4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0,2), // motor2 DMA2 CH6 diff --git a/src/main/target/NEUTRONRCF435MINI/target.h b/src/main/target/NEUTRONRCF435MINI/target.h index 11083bd61e8..2e90f48a69d 100644 --- a/src/main/target/NEUTRONRCF435MINI/target.h +++ b/src/main/target/NEUTRONRCF435MINI/target.h @@ -165,7 +165,7 @@ #define USE_ADC #define ADC_INSTANCE ADC1 -#define ADC1_DMA_STREAM DMA2_CHANNEL5 +#define ADC1_DMA_STREAM DMA2_CHANNEL1 #define ADC_CHANNEL_1_PIN PA0 #define ADC_CHANNEL_2_PIN PA1 //#define ADC_CHANNEL_3_PIN PB0 diff --git a/src/main/target/NEUTRONRCF435SE/target.c b/src/main/target/NEUTRONRCF435SE/target.c index 1d0231e423d..0071615760c 100644 --- a/src/main/target/NEUTRONRCF435SE/target.c +++ b/src/main/target/NEUTRONRCF435SE/target.c @@ -37,7 +37,7 @@ timerHardware_t timerHardware[] = { DEF_TIM(TMR3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0,8), // PWM4 - OUT8 DMA2 CH3 // DEF_TIM(TMR5, CH1, PA0, TIM_USE_ANY, 0, 13), // TIM_USE_CAMERA_CONTROL - DEF_TIM(TMR5, CH2, PA1, TIM_USE_LED, 0,7), // PWM1 - LED MCO1 DMA1 CH2 + DEF_TIM(TMR5, CH2, PA1, TIM_USE_LED, 0,6), // PWM1 - LED MCO1 DMA1 CH2 // DEF_TIM(TMR2, CH4, PA3, TIM_USE_ANY |TIM_USE_PPM, 0,6), // PWM2 - PPM DMA1 CH6 }; diff --git a/src/main/target/NEUTRONRCF435SE/target.h b/src/main/target/NEUTRONRCF435SE/target.h index 10f1f1894c2..48ed7f0c61b 100644 --- a/src/main/target/NEUTRONRCF435SE/target.h +++ b/src/main/target/NEUTRONRCF435SE/target.h @@ -168,7 +168,7 @@ #define USE_ADC #define ADC_INSTANCE ADC1 -#define ADC1_DMA_STREAM DMA2_CHANNEL5 +#define ADC1_DMA_STREAM DMA2_CHANNEL1 #define ADC_CHANNEL_1_PIN PC2 #define ADC_CHANNEL_2_PIN PC1 //#define ADC_CHANNEL_3_PIN PB0 diff --git a/src/main/target/SAGEATF4/target.h b/src/main/target/SAGEATF4/target.h index c7316d2254d..6a05cea4f6a 100644 --- a/src/main/target/SAGEATF4/target.h +++ b/src/main/target/SAGEATF4/target.h @@ -80,7 +80,7 @@ // BMI270 #define USE_IMU_BMI270 -#define IMU_BMI270_ALIGN CW0_DEG +#define IMU_BMI270_ALIGN CW90_DEG #define BMI270_SPI_BUS BUS_SPI1 #define BMI270_CS_PIN SPI1_NSS_PIN @@ -187,7 +187,7 @@ #define USE_ADC #define ADC_INSTANCE ADC1 -#define ADC1_DMA_STREAM DMA2_CHANNEL5 +#define ADC1_DMA_STREAM DMA2_CHANNEL1 #define ADC_CHANNEL_1_PIN PB0 #define ADC_CHANNEL_2_PIN PB1 //#define ADC_CHANNEL_3_PIN PB0