Skip to content

Using TIM3 for Servo Instead of Motor on SpeedyBee F7 V3 #11468

@myfavorchat001-lang

Description

@myfavorchat001-lang

Image

I’m working on a custom configuration for a SpeedyBee F7 V3 target in iNav and I need some clarification regarding timer usage and "timerOverrides".

Currently, the target configuration forces all these timers for motors:

timerOverridesMutable(timer2id(TIM2))->outputMode = OUTPUT_MODE_MOTORS;
timerOverridesMutable(timer2id(TIM3))->outputMode = OUTPUT_MODE_MOTORS;
timerOverridesMutable(timer2id(TIM4))->outputMode = OUTPUT_MODE_MOTORS;

I would like to modify this so that TIM3 is used only for servo output, not motors.


My intended setup:

  • TIM2 (S1, S2) → Motors
  • TIM3 (S3) → Servo only
  • TIM4 (S4, S5) → Motors

Timer hardware mapping:

timerHardware_t timerHardware[] = {

DEF_TIM(TIM2, CH1, PA15, TIM_USE_OUTPUT_AUTO, 0, 0),  // S1
DEF_TIM(TIM2, CH2, PB3,  TIM_USE_OUTPUT_AUTO, 0, 0),  // S2
DEF_TIM(TIM3, CH1, PB4,  TIM_USE_OUTPUT_AUTO, 0, 0),  // S3
DEF_TIM(TIM4, CH1, PB6,  TIM_USE_OUTPUT_AUTO, 0, 0),  // S4
DEF_TIM(TIM4, CH2, PB7,  TIM_USE_OUTPUT_AUTO, 0, 0),  // S5
DEF_TIM(TIM3, CH2, PB5,  TIM_USE_OUTPUT_AUTO, 0, 0),  // S6 (clash with S2, DShot issue)
DEF_TIM(TIM3, CH3, PB0,  TIM_USE_OUTPUT_AUTO, 0, 0),  // S7
DEF_TIM(TIM3, CH4, PB1,  TIM_USE_OUTPUT_AUTO, 0, 0),  // S8

DEF_TIM(TIM8, CH3, PC8, TIM_USE_LED, 0, 0),          // LED
DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0),          // Camera Control

};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions