> For the complete documentation index, see [llms.txt](https://docs.holybro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.holybro.com/esc/motor-direction-setup-in-px4-and-ardupilot.md).

# Motor Direction Setup In PX4 and Ardupilot

All current Holybro Tekko series ESCs support DShot and allow users to change motor direction without resoldering the motor phase wire. This article will guide you on how to change the motor direction using ground control software such as QGroundControl (PX4) and MissionPlanner (Ardupilot).

{% hint style="info" %}
For Pixhawk controllers and other controllers with an IOMCU, it is recommended to use AUX (FMU) PWM outputs for DShot ESCs.
{% endhint %}

## PX4 Firmware

Open the QGroundControl application and connect your flight controller to update your firmware to the current stable version.

Once the controller is up to date, select the desired airframe (generic quadcopter is used as an&#x20;

example below).

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2F5Q8CLP1X7KnEnOWoEHRP%2F%E5%9B%BE%E7%89%87.png?alt=media&amp;token=01dbad65-3d74-4735-9951-9f96686efd68" alt=""><figcaption></figcaption></figure>

Apply the setting and restart.

After the auto-reboot, navigate to the Actuators tab and set AUX 1-4 to DShot300. Assign AUX 1-4 (FMU PWM outputs 1-4) as motor 1-4.

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2FKknGCFwSm0r6e4cf4PIB%2F%E5%9B%BE%E7%89%87.png?alt=media&amp;token=b088783d-2542-41c4-b31e-0a50a50ec876" alt=""><figcaption></figcaption></figure>

Test your motor direction by powering up the ESC, enabling the Actuator Testing tab, and dragging the slider upward.

If a motor is spinning in the incorrect direction, scroll down to find the Set Spin Direction option. Click Direction 1 or 2 and select the motor you want to change the direction of the motor. If spin direction 1 does not change the motor direction, try spin direction 2.

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2FoH0cOGfyxI6oQkv4uK4R%2F%E5%9B%BE%E7%89%87.png?alt=media&amp;token=9db2488d-c0c8-49bd-bc02-34edf8cdd71c" alt=""><figcaption></figcaption></figure>

## Ardupilot Firmware

An official Ardupilot article below provides a detailed guide on how to set up Dshot ESC for your controller.

{% embed url="<https://ardupilot.org/copter/docs/common-dshot-escs.html>" %}

With the DShot configured, navigate to CONFIG->Full Parameter List and search SERVO\_BLH\_RVMASK.

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2FnSYWXK0obSKmdg6scPQZ%2F%E5%9B%BE%E7%89%87.png?alt=media&amp;token=3e738428-7284-4168-b984-f7a7394a7ee5" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2367252986-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLIgtGDAvVGkCKGOJb1bR%2Fuploads%2FVnk1tgmNxfq6umJkYiNP%2F%E5%9B%BE%E7%89%87.png?alt=media&amp;token=8fd4757d-aea6-41ee-aedc-db7ac531034c" alt=""><figcaption></figcaption></figure>

Set the bitmask based on the servo channel your motor/ESC needs to reverse is connected to. AUX (FMU) PWM outputs 1-8 correspond to Ardupilot's servo channels 9-16.

Write the parameters and reboot or power cycle the flight controller.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.holybro.com/esc/motor-direction-setup-in-px4-and-ardupilot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
