Skip to content

Commit

Permalink
fix adc dma conflict
Browse files Browse the repository at this point in the history
FIX SAGEATF4 S8 DMA CONFLIECT WITH ADC
  • Loading branch information
shanggl committed Jan 4, 2024
1 parent d3c7257 commit 3644f9c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/target/NEUTRONRCF435MINI/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/NEUTRONRCF435MINI/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/main/target/NEUTRONRCF435SE/target.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down
2 changes: 1 addition & 1 deletion src/main/target/NEUTRONRCF435SE/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/main/target/SAGEATF4/target.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3644f9c

Please sign in to comment.