Refactor pin assignment
- Assign valid timers for PWM5 and 6 - Streamline PWM1 through 4 for burst Dshot operation - PWM5 and 6 are assigned different timers to maximize flexibility.
This commit is contained in:
parent
c0b8f6c7dc
commit
c3b218f9b5
|
@ -26,11 +26,11 @@
|
|||
|
||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||
DEF_TIM(TIM2, CH1, PA15, TIM_USE_PPM, 0), // PPM IN
|
||||
DEF_TIM(TIM16, CH1, PB4, TIM_USE_MOTOR, 0), // PWM1
|
||||
DEF_TIM(TIM17, CH1, PB5, TIM_USE_MOTOR, 0), // PWM2
|
||||
DEF_TIM(TIM8, CH3N, PB1, TIM_USE_MOTOR, 0), // PWM3
|
||||
DEF_TIM(TIM8, CH2N, PB0, TIM_USE_MOTOR, 0), // PWM4
|
||||
DEF_TIM(TIM16, CH1, PB8, TIM_USE_MOTOR, 0), // PWM5
|
||||
DEF_TIM(TIM17, CH1, PB9, TIM_USE_MOTOR, 0), // PWM6
|
||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0), // LED_STRIP
|
||||
DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0), // PWM1 UP(1,3)
|
||||
DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0), // PWM2
|
||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0), // PWM3
|
||||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0), // PWM4
|
||||
DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0), // PWM5 UP(1,7)
|
||||
DEF_TIM(TIM8, CH3, PB9, TIM_USE_MOTOR, 0), // PWM6 UP(2,1)
|
||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0), // LED_STRIP D(1,2)
|
||||
};
|
||||
|
|
|
@ -21,12 +21,12 @@
|
|||
|
||||
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_NONE
|
||||
|
||||
#define USE_DSHOT_DMAR
|
||||
|
||||
#define LED0_PIN PB7
|
||||
|
||||
#define BEEPER PC15
|
||||
|
||||
#define USABLE_TIMER_CHANNEL_COUNT 8
|
||||
|
||||
#define USE_EXTI
|
||||
#define MPU_INT_EXTI PC13
|
||||
#define USE_MPU_DATA_READY_SIGNAL
|
||||
|
@ -44,8 +44,6 @@
|
|||
#define USE_FLASH_M25P16
|
||||
|
||||
#define USE_ESC_SENSOR
|
||||
#define REMAP_TIM17_DMA
|
||||
#define REMAP_TIM16_DMA
|
||||
|
||||
#define USE_VCP
|
||||
#define USE_UART1
|
||||
|
@ -111,4 +109,5 @@
|
|||
#define TARGET_IO_PORTC (BIT(13)|BIT(14)|BIT(15))
|
||||
#define TARGET_IO_PORTF (BIT(0)|BIT(1)|BIT(4))
|
||||
|
||||
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(8) | TIM_N(16) |TIM_N(17))
|
||||
#define USABLE_TIMER_CHANNEL_COUNT 8
|
||||
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8))
|
||||
|
|
Loading…
Reference in New Issue