Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
actuators_dshot module

Driver for DSHOT speed controller.

Beware that servo output from the same timer cannot mix PWM and DSHOT. It might be required to disable by hand some PWM output to avoid conflicts when they are activated by default on a board. Currently only implemented over ChibiOS.

Configure DSHOT_BIDIR to TRUE to enable bidirectionnal DSHOT. It overrides the rpm values from the UART dshot telemetry. UART dshot telemetry is still usefull for current and voltage telemetry.

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="actuators_dshot">
b'<define name="DSHOT_SPEED" value="600" />\n '
b'<configure name="DSHOT_BIDIR" value="FALSE" />\n '
b'<configure name="DSHOT1_GPT_TIM" value="7" />\n '
</module>

Module configuration options

Configure Options

  • name: DSHOT_BIDIR value: FALSE
    Description: Bidirectionnal DSHOT for fast rpm feedback
  • name: DSHOT1_GPT_TIM value: 7
    Description: GPT driver used for telemetry timeout

Define Options

  • name: DSHOT_SPEED value: 600
    Description: DSHOT speed (150,300,600,1200)

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw actuators_dshot.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="actuators_dshot" dir="actuators" task="actuators">
<doc>
<description>
Driver for DSHOT speed controller.
Beware that servo output from the same timer cannot mix PWM and DSHOT.
It might be required to disable by hand some PWM output to avoid conflicts when they are activated by default on a board.
Currently only implemented over ChibiOS.
Configure DSHOT_BIDIR to TRUE to enable bidirectionnal DSHOT.
It overrides the rpm values from the UART dshot telemetry.
UART dshot telemetry is still usefull for current and voltage telemetry.
</description>
<configure name="DSHOT_BIDIR" value="FALSE" description="Bidirectionnal DSHOT for fast rpm feedback"/>
<define name="DSHOT_SPEED" value="600" description="DSHOT speed (150,300,600,1200)"/>
<configure name="DSHOT1_GPT_TIM" value="7" description="GPT driver used for telemetry timeout"/>
</doc>
<dep>
<depends>actuators,@commands</depends>
<provides>actuators</provides>
</dep>
<header>
<file name="actuators_dshot.h"/>
</header>
<makefile>
<configure name="DSHOT_BIDIR" default="FALSE"/>
<file_arch name="actuators_dshot_arch.c"/>
<file_arch name="esc_dshot.c" cond="ifeq ($(RTOS),chibios)"/>
<file_arch name="hal_stm32_dma.c" dir="mcu_periph" cond="ifeq ($(RTOS),chibios)"/>
<test/>
</makefile>
<makefile cond="ifeq ($(DSHOT_BIDIR),TRUE)" target="ap">
<define name="DSHOT_BIDIR" value="$(DSHOT_BIDIR)"/>
<define name="USE_GPT$(DSHOT1_GPT_TIM)" value="TRUE"/>
<define name="DSHOT1_BIDIR_GPT" value="GPTD$(DSHOT1_GPT_TIM)"/>
<file_arch name="dshot_rpmCapture.c"/>
<file_arch name="dshot_erps.c"/>
<file_arch name="input_capture_arch.c" dir="mcu_periph"/>
<file_arch name="timerDmaCache.c" dir="mcu_periph"/>
<test/>
</makefile>
</module>