Merge pull request #6048 from jflyper/bfdev-f7-tim8-dmaopt-to-match-f4
F7 TIM8_CH1,2,3 dmaopt ordering to match that of F4
This commit is contained in:
commit
3a5961a758
|
@ -553,9 +553,9 @@
|
|||
#define DEF_TIM_DMA__BTCH_TIM5_CH3 D(1, 0, 6)
|
||||
#define DEF_TIM_DMA__BTCH_TIM5_CH4 D(1, 1, 6),D(1, 3, 6)
|
||||
|
||||
#define DEF_TIM_DMA__BTCH_TIM8_CH1 D(2, 2, 7),D(2, 2, 0)
|
||||
#define DEF_TIM_DMA__BTCH_TIM8_CH2 D(2, 3, 7),D(2, 2, 0)
|
||||
#define DEF_TIM_DMA__BTCH_TIM8_CH3 D(2, 4, 7),D(2, 2, 0)
|
||||
#define DEF_TIM_DMA__BTCH_TIM8_CH1 D(2, 2, 0),D(2, 2, 7)
|
||||
#define DEF_TIM_DMA__BTCH_TIM8_CH2 D(2, 2, 0),D(2, 3, 7)
|
||||
#define DEF_TIM_DMA__BTCH_TIM8_CH3 D(2, 2, 0),D(2, 4, 7)
|
||||
#define DEF_TIM_DMA__BTCH_TIM8_CH4 D(2, 7, 7)
|
||||
|
||||
#define DEF_TIM_DMA__BTCH_TIM4_CH4 NONE
|
||||
|
|
|
@ -28,14 +28,14 @@
|
|||
#include "drivers/timer_def.h"
|
||||
|
||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||
// ADC1 D(2,4) D(2,0)
|
||||
// ADC1 *D(2,4) D(2,0)
|
||||
// ADC2 D(2,2) D(2,3)
|
||||
// ADC3 D(2,0) D(2,1)
|
||||
|
||||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_PPM, 0, 0), // PPM D(1,0)
|
||||
|
||||
// Motors
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // MOTOR1 U(2,1) D(2,2) D(2,4)
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // MOTOR1 U(2,1) *D(2,2) D(2,4)
|
||||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // MOTOR2 U(1,2) D(1,7)
|
||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // MOTOR3 U(1,2) D(1,2)
|
||||
DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0), // MOTOR4 U(1,6) D(1,3)
|
||||
|
|
|
@ -35,10 +35,10 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
DEF_TIM(TIM1, CH1, PA8, TIM_USE_PPM | TIM_USE_LED, 0, 1), // PPM - DMA2_ST6, *DMA2_ST1, DMA2_ST3
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // PWM1 - DMA2_ST2, DMA2_ST2
|
||||
DEF_TIM(TIM3, CH2, PC7, TIM_USE_MOTOR, 0, 0), // PWM2 - DMA1_ST5
|
||||
DEF_TIM(TIM8, CH2N, PB14, TIM_USE_MOTOR, 0, 0), // PWM3 - DMA2_ST3, DMA2_ST2
|
||||
DEF_TIM(TIM8, CH2N, PB14, TIM_USE_MOTOR, 0, 1), // PWM3 - DMA2_ST3, DMA2_ST2
|
||||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // PWM4 - DMA1_ST7
|
||||
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // PWM5 - DMA1_ST2
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // PWM6 - (DMA2_ST4) DMA2_ST2
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // PWM6 - (DMA2_ST4) DMA2_ST2
|
||||
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // PWM7 - (DMA1_ST4) - DMA SDCard, DMA Serial_TX4
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // PWM8 - (DMA2_ST7) - DMA Serial_TX1
|
||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // PWM9 - (DMA1_ST2) - Collision
|
||||
|
|
|
@ -31,8 +31,8 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // S1_IN
|
||||
DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S2_IN
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0 ), // S3_IN DMA2_ST2 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0 ), // S4_IN DMA2_ST3 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0 ), // S5_IN DMA2_ST4 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 1 ), // S4_IN DMA2_ST3 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 1 ), // S5_IN DMA2_ST4 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0 ), // S6_IN DMA2_ST7
|
||||
|
||||
DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0 ), // S10_OUT 1 DMA1_ST7
|
||||
|
|
|
@ -31,8 +31,8 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // S1_IN
|
||||
DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S2_IN
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0 ), // S3_IN DMA2_ST2 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0 ), // S4_IN DMA2_ST3 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0 ), // S5_IN DMA2_ST4 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 1 ), // S4_IN DMA2_ST3 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 1 ), // S5_IN DMA2_ST4 DMA2_ST2
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0 ), // S6_IN DMA2_ST7
|
||||
|
||||
DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0 ), // S10_OUT 1 DMA1_ST7
|
||||
|
|
|
@ -37,7 +37,7 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0),
|
||||
|
||||
DEF_TIM(TIM4, CH2, PB7, TIM_USE_MOTOR, 0, 0),
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 0),
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1),
|
||||
|
||||
DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0)
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@
|
|||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||
DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
|
||||
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // S1 DMA1_ST4
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 0), // S2 DMA2_ST3
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // S3 DMA2_ST4
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // S1 DMA2_ST2 (XXX was DMA1_ST4)
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // S2 DMA2_ST3
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // S3 DMA2_ST4
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // S4 DMA2_ST7
|
||||
|
||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // S5 DMA1_ST2
|
||||
|
|
|
@ -27,14 +27,24 @@
|
|||
#include "drivers/timer.h"
|
||||
#include "drivers/timer_def.h"
|
||||
|
||||
// QUAD + LED_STRIP can be handled without DMAR (dshot_burst).
|
||||
// Anything beyond should use DMAR, as TIM5_CH1 and TIM3_CH4 have
|
||||
// inevitable DMA collision on D(1,2).
|
||||
//
|
||||
// Additional DMA resource info
|
||||
// ADC1 D(2,4)
|
||||
// TIM5_UP U(1,0)
|
||||
// TIM3_UP U(1,2)
|
||||
// TIM8_UP U(2,1)
|
||||
|
||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||
DEF_TIM(TIM3, CH2, PC7, TIM_USE_PPM, 0, 0 ),
|
||||
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0 ),
|
||||
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0 ),
|
||||
DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0 ),
|
||||
DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 1 ),
|
||||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR | TIM_USE_LED, 0, 0 ),
|
||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0 ),
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0 ),
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0 ),
|
||||
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0 ), // D(1,2)
|
||||
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0 ), // D(1,4)
|
||||
DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0 ), // D(1,0)
|
||||
DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0 ), // *D(1,1) D(1,3)
|
||||
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR | TIM_USE_LED, 0, 0 ), // D(1,7)
|
||||
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0 ), // xD(1,2)
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0 ), // *D(2,2) D(2,4)
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0 ), // D(2,7)
|
||||
};
|
||||
|
|
|
@ -33,9 +33,9 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
|
||||
DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // S2_IN
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // S3_IN
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // S4_IN
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 1), // S4_IN
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // S5_IN
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // S6_IN
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 1), // S6_IN
|
||||
|
||||
DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0), // S10_OUT 1
|
||||
DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1), // S1_OUT 4
|
||||
|
|
|
@ -31,9 +31,9 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
|
||||
DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM | TIM_USE_PPM, 0, 0),
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0),
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0),
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 1),
|
||||
// DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // Used for SDIO
|
||||
// DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // Used for SDIO
|
||||
// DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 1), // Used for SDIO
|
||||
|
||||
DEF_TIM(TIM4, CH3, PB8, TIM_USE_MOTOR, 0, 0),
|
||||
DEF_TIM(TIM2, CH4, PA3, TIM_USE_MOTOR, 0, 1),
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||
|
||||
#ifdef FPVM_BETAFLIGHTF7
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_CAMERA_CONTROL, 0, 0), // USED FOR CAMERA CONTROL
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_CAMERA_CONTROL, 0, 1), // USED FOR CAMERA CONTROL
|
||||
#endif
|
||||
DEF_TIM(TIM1, CH3, PE13, TIM_USE_NONE, 0, 1 ), // RC1 / PPM, unusable
|
||||
|
||||
|
@ -45,7 +45,7 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
DEF_TIM(TIM2, CH3, PB10, TIM_USE_NONE, 0, 0 ), // UART3_TX, I2C2_SCL
|
||||
DEF_TIM(TIM2, CH4, PB11, TIM_USE_NONE, 0, 0 ), // UART3_RX, I2C2_SDA
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_NONE, 0, 0 ), // UART6_TX
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_NONE, 0, 0 ), // UART6_RX
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_NONE, 0, 1 ), // UART6_RX
|
||||
DEF_TIM(TIM2, CH4, PA3, TIM_USE_PPM, 0, 0 ), // UART2_RX, joined with PE13
|
||||
|
||||
// For ESC serial
|
||||
|
|
|
@ -36,7 +36,7 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
|
||||
// Additional motors/servos
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_NONE, 0, 0), // MST5 Collision with TX/RX6 (useful for OCTO)
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_NONE, 0, 0), // MST6 Collision with TX/RX6 (useful for OCTO)
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_NONE, 0, 1), // MST6 Collision with TX/RX6 (useful for OCTO)
|
||||
DEF_TIM(TIM11, CH1, PB9, TIM_USE_NONE, 0, 0), // I2C1_SDA, MST7
|
||||
DEF_TIM(TIM10, CH1, PB8, TIM_USE_NONE, 0, 0), // I2C1_SCL, MST8
|
||||
|
||||
|
@ -62,7 +62,7 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
DEF_TIM(TIM5, CH2, PA1, TIM_USE_NONE, 0, 0), // UART4_RX
|
||||
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_NONE, 0, 0), // UART6_TX Collision with MS1&2 (useful for OCTO)
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_NONE, 0, 0), // UART6_RX Collision with MS1&2 (useful for OCTO)
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_NONE, 0, 1), // UART6_RX Collision with MS1&2 (useful for OCTO)
|
||||
|
||||
// Others
|
||||
DEF_TIM(TIM1, CH3, PA10, TIM_USE_NONE, 0, 0), // CS_ExtIMU, Collision with LED_STRIP
|
||||
|
|
|
@ -34,16 +34,16 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
|||
DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // PPM / PWM2 / UART2 TX
|
||||
|
||||
#if (SPRACINGF7DUAL_REV <= 1)
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 0), // ESC 1
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // ESC 1
|
||||
#else
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // ESC 1
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // ESC 1
|
||||
#endif
|
||||
DEF_TIM(TIM8, CH1, PC6, TIM_USE_MOTOR, 0, 0), // ESC 2
|
||||
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // ESC 3
|
||||
#if (SPRACINGF7DUAL_REV <= 1)
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0), // ESC 4
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // ESC 4
|
||||
#else
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 0), // ESC 4
|
||||
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 1), // ESC 4
|
||||
#endif
|
||||
|
||||
DEF_TIM(TIM4, CH1, PB6, TIM_USE_MOTOR, 0, 0), // ESC 5 / Conflicts with USART5_RX / SPI3_RX - SPI3_RX can be mapped to DMA1_ST3_CH0
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include "drivers/timer_def.h"
|
||||
|
||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_PPM, 0, 0 ), // PPM IN
|
||||
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0 ), // S1_OUT - DMA1_ST2
|
||||
DEF_TIM(TIM8, CH3, PC8, TIM_USE_PPM, 0, 1 ), // PPM IN
|
||||
DEF_TIM(TIM2, CH1, PA0, TIM_USE_MOTOR, 0, 0 ), // S1_OUT - DMA1_ST2
|
||||
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0 ), // S2_OUT - DMA1_ST4
|
||||
DEF_TIM(TIM5, CH3, PA2, TIM_USE_MOTOR, 0, 0 ), // S3_OUT - DMA1_ST1
|
||||
DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 1 ), // S4_OUT - DMA1_ST6
|
||||
|
|
Loading…
Reference in New Issue