diff --git a/boards/px4/fmu-v5x/src/board_config.h b/boards/px4/fmu-v5x/src/board_config.h index 99a15fbaaf..b5fba07d0d 100644 --- a/boards/px4/fmu-v5x/src/board_config.h +++ b/boards/px4/fmu-v5x/src/board_config.h @@ -204,20 +204,6 @@ #define GPIO_HEATER_OUTPUT /* PB10 T2CH3 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN10) #define HEATER_OUTPUT_EN(on_true) px4_arch_gpiowrite(GPIO_HEATER_OUTPUT, (on_true)) -/* PWM Capture - * - * 1 PWM Capture inputs are configured. - * - * Pins: - * - * FMU_CAP1 : PI0 : TIM5_CH4 - */ - -#define GPIO_TIM5_CH4IN /* PI0 T5C4 FMU_CAP1 */ GPIO_TIM5_CH4IN_2 -#define GPIO_TIM5_CH4OUT /* PI0 T5C4 FMU_CAP1 */ GPIO_TIM5_CH4OUT_2 - -#define DIRECT_PWM_CAPTURE_CHANNELS 1 - /* PC12 is nARMED * The GPIO will be set as input while not armed HW will have external HW Pull UP. * While armed it shall be configured at a GPIO OUT set LOW @@ -230,9 +216,9 @@ #endif /* PWM */ -#define DIRECT_PWM_OUTPUT_CHANNELS 8 +#define DIRECT_PWM_OUTPUT_CHANNELS 9 -#define BOARD_DSHOT_MOTOR_ASSIGNMENT {3, 2, 1, 0, 4, 5, 6, 7}; +#define BOARD_DSHOT_MOTOR_ASSIGNMENT {3, 2, 1, 0, 4, 5, 6, 7, 8}; /* Power supply control and monitoring GPIOs */ @@ -314,7 +300,6 @@ #define INPUT_CAP1_TIMER 5 #define INPUT_CAP1_CHANNEL /* T5C4 */ 4 #define GPIO_INPUT_CAP1 /* PI0 */ GPIO_TIM5_CH4IN -#define BOARD_CAPTURE_GPIO /* PI0 */ (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTI|GPIO_PIN0) /* PWM input driver. Use FMU AUX5 pins attached to timer4 channel 2 */ #define PWMIN_TIMER 4 diff --git a/boards/px4/fmu-v5x/src/timer_config.cpp b/boards/px4/fmu-v5x/src/timer_config.cpp index 3073f0c22f..67adba6a23 100644 --- a/boards/px4/fmu-v5x/src/timer_config.cpp +++ b/boards/px4/fmu-v5x/src/timer_config.cpp @@ -72,6 +72,7 @@ constexpr timer_io_channels_t timer_io_channels[MAX_TIMER_IO_CHANNELS] = { initIOTimerChannel(io_timers, {Timer::Timer4, Timer::Channel3}, {GPIO::PortD, GPIO::Pin14}), initIOTimerChannel(io_timers, {Timer::Timer12, Timer::Channel1}, {GPIO::PortH, GPIO::Pin6}), initIOTimerChannel(io_timers, {Timer::Timer12, Timer::Channel2}, {GPIO::PortH, GPIO::Pin9}), + initIOTimerChannelCapture(io_timers, {Timer::Timer5, Timer::Channel4}, {GPIO::PortI, GPIO::Pin0}), }; constexpr io_timers_channel_mapping_t io_timers_channel_mapping =