Making DSHOT ESC and PWm servos work in the same time


I would like to use dshot ESC to control my motor and get telemetry back from the speed controller, and still have PWM signals for servos. Dshot ESC has to be connected to AUX ports, and for that I have to set parameter SYS_USE_IO=0. That way I cannot command my servos from MAIN ports, as the AUX ports now behave like they were the MAIN ( Can I set somehow that I use both kind of ports in the same time?

My setup:
Flight control board: Holybro Durandal
Flight control software: PX4 master version

Thanks for any help!

You might have to change the mixer files to suit you.


Which model (SYS_AUTOSTART param) are you using?

Thanks for the quick answer @JulianOes.

I am using SYS_AUTOSTART=2100 (standard plane) airframe. (Later possibly I will change to custom airframe.)

From the mixer files I understand that their name (.aux or .main) defines if it outputs to aux or main ports, so I cannot mix the two in one file. Therefore I changed the 2100_standard_plane file in /ROMFS/px4_common/init.d/airframes to include both set MIXER AETRFG and set MIXER_AUX AETRFG (and created the corresponding .aux mixer with one throttle output).

I also tried modifying rc.interface file in the same folder to

  1. configure pwm values for main ports even when dshot module is running and
  2. have the parameter USE_IO always as yes no matter what the SYS_USE_IO is set to.

That caused that I can control servos from main even if SYS_USE_IO parameter is set to 0, but I still cannot control the motor. Dshot module is running (I checked in mavlink shell) but I cannot get esc_info.

Little update on the problem: with current developer build, the SYS_USE_IO parameter does not have any effect. Even if it is set to 0, I can control motor on MAIN port in pwm mode.

I was able to disable MAIN ports with the SYS_USE_IO parameter and get dshot signal on AUX ports.
With modifying the code, now I can have dshot signal on AUX and servos working on MAIN ports. However the dshot signal does not change to throttle command from transmitter.

My mixer configuration is that I have main mixer with two servos and aux mixer with two zero mixers and one thrust (group 0 channel 3) and I load both in the 2100_standard_plane file.

I noticed that to ramp up a motor on MAIN ports I need to disable fw_att_control module, can this module be an issue that for example overwrites the transmitter’s command?

I don’t know if that is any help, but this is the output of the dshot status command. (Sorry for the image, I could not copy from QGC.)
The AUX mixer seems to loaded, as if I comment out the part where it loads in rc.interface file ( the dshot signal disappears on the AUX ports. (And I have dshot signal in the first three pins, just as I have three mixers in the AUX mixer file.) Also, it is loaded from etc/mixers/ folder.

I could finally make it work with using Tilt-Quadrotor airframe. I haven’t tested with other airframes, but must be something with control modules (e.g. mc_att_control vs fw_att_control).