diff --git a/src/main/drivers/timer_def.h b/src/main/drivers/timer_def.h index e2d09e9df..8579a180f 100644 --- a/src/main/drivers/timer_def.h +++ b/src/main/drivers/timer_def.h @@ -112,17 +112,21 @@ #ifdef REMAP_TIM16_DMA #define DEF_TIM_DMA__TIM16_CH1 DMA1_CH6 +#define DEF_TIM_DMA__TIM16_CH1N DMA1_CH6 #define DEF_TIM_DMA__TIM16_UP DMA1_CH6 #else #define DEF_TIM_DMA__TIM16_CH1 DMA1_CH3 +#define DEF_TIM_DMA__TIM16_CH1N DMA1_CH3 #define DEF_TIM_DMA__TIM16_UP DMA1_CH3 #endif #ifdef REMAP_TIM17_DMA #define DEF_TIM_DMA__TIM17_CH1 DMA1_CH7 +#define DEF_TIM_DMA__TIM17_CH1N DMA1_CH7 #define DEF_TIM_DMA__TIM17_UP DMA1_CH7 #else #define DEF_TIM_DMA__TIM17_CH1 DMA1_CH1 +#define DEF_TIM_DMA__TIM17_CH1N DMA1_CH1 #define DEF_TIM_DMA__TIM17_UP DMA1_CH1 #endif diff --git a/src/main/target/SIRINFPV/target.c b/src/main/target/SIRINFPV/target.c index 4064c10e6..377de10b8 100644 --- a/src/main/target/SIRINFPV/target.c +++ b/src/main/target/SIRINFPV/target.c @@ -25,13 +25,13 @@ #include "drivers/dma.h" const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = { - DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 1), // PWM1 - PB6 - DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 1), // PWM2 - PB6 - DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 1), // PWM3 - PB8 - DEF_TIM(TIM4, CH4, PB9, TIM_USE_MOTOR, 1), // PWM4 - PB9 - DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 1), // PWM5 - PB0 - *TIM3_CH3 - DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 1), // PWM6 - PB1 - *TIM3_CH4 - DEF_TIM(TIM2, CH4, PB11, TIM_USE_PPM, 0), // RC_CH3 - PB11 - *TIM2_CH4, USART3_RX (AF7)y + DEF_TIM(TIM2, CH4, PB11, TIM_USE_PPM, TIMER_INPUT_ENABLED), // RC_CH3 - PB11 - *TIM2_CH4, USART3_RX (AF7) + DEF_TIM(TIM16,CH1N,PB6, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED | TIMER_OUTPUT_INVERTED), // PWM1 - PB6 + DEF_TIM(TIM3, CH4, PB7, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM2 - PB6 + DEF_TIM(TIM8, CH2, PB8, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM3 - PB8 + DEF_TIM(TIM17,CH1, PB9, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM4 - PB9 + DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM5 - PB0 - *TIM3_CH3 + DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, TIMER_OUTPUT_ENABLED), // PWM6 - PB1 - *TIM3_CH4 }; diff --git a/src/main/target/SIRINFPV/target.h b/src/main/target/SIRINFPV/target.h index 819dca69c..144e5dbd1 100644 --- a/src/main/target/SIRINFPV/target.h +++ b/src/main/target/SIRINFPV/target.h @@ -95,6 +95,9 @@ #define SPI3_MISO_PIN PB4 #define SPI3_MOSI_PIN PB5 +#define REMAP_TIM16_DMA +#define REMAP_TIM17_DMA + #define USE_MAX7456 #define MAX7456_SPI_INSTANCE SPI3 #define MAX7456_SPI_CS_PIN PA15