---
title: Motor Drive Settings
slug: microdrive-lpi/motor-drive-settings
icon: ⚙️
docTags: 
createdAt: 2024-01-14T23:54:54.822Z
---

:::hint{type="info"}
The following settings are related to the motor drive and control interfaces on the micro**DRIVE** LPi units.
:::

### Active Hold Strength

| **Description**   | The duty cycle percentage to apply to the motor during the 'Active Hold' stopping behavior. A higher duty cycle will provide a stronger braking force but increase power consumption and temperature. |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x01a1                                                                                                                                                                                                |
| **DroneCAN Name** | ACTV\_HLD\_STR                                                                                                                                                                                        |
| **Units**         | Units are in percentage of duty cycle (% duty cycle)                                                                                                                                                  |

### AFW Enabled

| **Description**   | Enables regenerative braking. The result is far greater linearity on ESC output, alongside increased efficiency. Must be disabled for use with power supplies or systems that cannot handle regenerative current (eg. tethers). |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x0048                                                                                                                                                                                                                          |
| **DroneCAN Name** | AFW\_EN                                                                                                                                                                                                                         |
| **Units**         | N/A                                                                                                                                                                                                                             |

### Automatic Timing Advance

| **Description**   | Toggle the operation of automatically varying the timing advance to the connected motor depending on loading conditions. In most cases, leaving this function enabled results in the best overall efficiency. |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x006c                                                                                                                                                                                                        |
| **DroneCAN Name** | AUTO\_TIMING                                                                                                                                                                                                  |
| **Units**         | N/A                                                                                                                                                                                                           |

### Bus Current Limit

| **Description**   | Limits the maximum current limit allowed on the bus. The unit will cap the maximum power output at the limit setpoint. |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x004d                                                                                                                 |
| **DroneCAN Name** | BUS\_CUR\_LIM                                                                                                          |
| **Units**         | Units are in Amps (A)                                                                                                  |

### Calibrated Values Enable

| **Description**   | Utilise the factory calibrated values for onboard sensors. Disable for base uncalibrated scaling. |
| ----------------- | ------------------------------------------------------------------------------------------------- |
| **ID**            | 0x0078                                                                                            |
| **DroneCAN Name** | USE\_CAL\_EN                                                                                      |
| **Units**         | N/A                                                                                               |

### Drive Mode

| **Description**   | Tailor output drive method. Normal will scale 0-100% throttle in the desired direction, applications include multi-rotors, VTOL, propeller flight. Reversible will scale -100-0-100% throttle for applications such as 3D flying. RPM mode will drive at a constant RPM proportional to the throttle value based off the configured minimum and maximum RPM, applications include helicopters, swashplate flight, constant speed applications. |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x0041                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| **DroneCAN Name** | DRV\_MODE                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| **Units**         | N/A                                                                                                                                                                                                                                                                                                                                                                                                                                            |

**Value Mappings**:

- 0 -> Normal
- 1 -> Reversible
- 2 -> RPM

### Drive Topology

| **Description**   | The algorithm to use commutating the motor. |
| ----------------- | ------------------------------------------- |
| **ID**            | 0x0012                                      |
| **DroneCAN Name** | DRV\_TOP                                    |
| **Units**         | N/A                                         |

**Value Mappings**:

- 0 -> Trapezoidal
- 1 -> FOCAL

### Duty Cycle Build Time

| **Description**   | This sets the duration in seconds that the duty cycle will build to the configured 'Minimum Duty Cycle'. Longer durations will lead to a smoother start to motor drive. This only applies to normal drive mode. |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x01e0                                                                                                                                                                                                          |
| **DroneCAN Name** | DUTY\_BUILD\_TIME                                                                                                                                                                                               |
| **Units**         | Units are in seconds (s)                                                                                                                                                                                        |

### Enable Gradual Braking

| **Description**   | When enabled, during 'Passive Hold' or 'Active Hold' motor stop operations the motor phases will gradually be shorted to provide a smoother braking action. AFW must be enabled. |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x0192                                                                                                                                                                           |
| **DroneCAN Name** | GRAD\_BRAK\_EN                                                                                                                                                                   |
| **Units**         | N/A                                                                                                                                                                              |

### Fixed Timing Advance

| **Description**   | Force the motor timing advance to a constant value. |
| ----------------- | --------------------------------------------------- |
| **ID**            | 0x004c                                              |
| **DroneCAN Name** | TIMING\_ADV                                         |
| **Units**         | Units are in degress (°)                            |

### Gradual Braking Duration

| **Description**   | The duration of the gradual braking routine. This is the duration in which the duty of the motor phases being shorted will increase from the 'Gradual Braking Starting Duty Cycle' to 100% duty cycle. A longer duration will provide a more gradual braking action. |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x017f                                                                                                                                                                                                                                                               |
| **DroneCAN Name** | GB\_DURATION\_S                                                                                                                                                                                                                                                      |
| **Units**         | Units are in seconds (s)                                                                                                                                                                                                                                             |

### Gradual Braking Starting Duty Cycle

| **Description**   | The starting duty cycle percentage of the gradual braking routine. This is the duty cycle of the motor phases being shorted compared to floating. |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x017d                                                                                                                                            |
| **DroneCAN Name** | GBRAK\_STRT\_DC                                                                                                                                   |
| **Units**         | Units are in percentage of duty cycle (% duty cycle)                                                                                              |

### Max Regeneration Current

| **Description**   | The maximum level of regenerative current (when AFW is enabled) on the bus before the unit limits. A higher value will result in a quicker response on throttle down. Regenerative current is negatively signed. |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x003f                                                                                                                                                                                                           |
| **DroneCAN Name** | REGEN\_BUS\_CUR                                                                                                                                                                                                  |
| **Units**         | Units are in Amps (A)                                                                                                                                                                                            |

### Maximum FOCAL PWM Frequency

| **Description**   | The maximum PWM frequency to allow on the output to the motor when operating using FOCAL. Higher values result in smoother motor drive, and higher controller temperatures. FOCAL has a lower frequency range than BLDC. |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **ID**            | 0x005b                                                                                                                                                                                                                   |
| **DroneCAN Name** | MAX\_FOCAL\_FREQ                                                                                                                                                                                                         |
| **Units**         | Units are in Hertz (Hz)                                                                                                                                                                                                  |

### Maximum PWM Frequency

| **Description**   | The maximum PWM frequency to allow on the output to the motor. Higher values result in smoother motor drive, and higher controller temperatures. |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| **ID**            | 0x0046                                                                                                                                           |
| **DroneCAN Name** | MAX\_PWM\_FREQ                                                                                                                                   |
| **Units**         | Units are in Hertz (Hz)                                                                                                                          |

### Maximum RPM Limit

| **Description**   | The maximum RPM to limit the output to when the limit is enabled. |
| ----------------- | ----------------------------------------------------------------- |
| **ID**            | 0x005d                                                            |
| **DroneCAN Name** | MAX\_RPM\_LIM                                                     |
| **Units**         | Units are in Revolutions Per Minute (RPM)                         |

### Minimum Duty Cycle

| **Description**   | The minimum allowed duty cycle to apply to the motor. This is the lowest duty cycle that will be applied when the throttle is non-zero. This should be set to the lowest duty cycle that allows the motor to spin from stopped. |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x016a                                                                                                                                                                                                                          |
| **DroneCAN Name** | MIN\_DUTY                                                                                                                                                                                                                       |
| **Units**         | Units are in duty cycle percent (%)                                                                                                                                                                                             |

### Minimum PWM Frequency

| **Description**   | The minimum PWM frequency to allow on the output to the motor. Lower values result in reduced linearity and capacitor lifetimes. |
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x002b                                                                                                                           |
| **DroneCAN Name** | MIN\_PWM\_FREQ                                                                                                                   |
| **Units**         | Units are in Hertz (Hz)                                                                                                          |

### Motor Kv

| **Description**   | Back EMF constant for connected motor. Used for stability calcuations. Zero value indicates automatic specification. |
| ----------------- | -------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x0035                                                                                                               |
| **DroneCAN Name** | MOT\_KV                                                                                                              |
| **Units**         | Units are in RPM per Volt (RPM/V)                                                                                    |

### Motor Pole Pairs

| **Description**   | Number of motor pole pairs of the connected motor, utilised for scaling eRPM to RPM. |
| ----------------- | ------------------------------------------------------------------------------------ |
| **ID**            | 0x0021                                                                               |
| **DroneCAN Name** | MOT\_POLE\_PAIRS                                                                     |
| **Units**         | N/A                                                                                  |

### Normal Rotation Direction

| **Description**   | Output rotation direction. Toggling this setting reverses the output direction without requiring cabling modification. |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x0044                                                                                                                 |
| **DroneCAN Name** | DIRECTION                                                                                                              |
| **Units**         | N/A                                                                                                                    |

### Phase Current Limit

| **Description**   | The current limit to apply to drive on the phase/output from the controller. |
| ----------------- | ---------------------------------------------------------------------------- |
| **ID**            | 0x004e                                                                       |
| **DroneCAN Name** | PH\_CUR\_LIM                                                                 |
| **Units**         | Units are in Amps (A)                                                        |

### Ramp Down Rate

| **Description**   | Slew rate to apply to transients when decreasing the output duty cycle to the motor. |
| ----------------- | ------------------------------------------------------------------------------------ |
| **ID**            | 0x0011                                                                               |
| **DroneCAN Name** | RAMP\_DWN\_RT                                                                        |
| **Units**         | Units are in % per 10 microseconds (%/10μs)                                          |

### Ramp to Stop Rate

| **Description**   | The rate at which the unit will reduce power after commanded to stop (zero throttle command). The unit is % per 10 microseconds applied to the commanded output duty cycle. |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x006b                                                                                                                                                                      |
| **DroneCAN Name** | RAMP\_STOP\_RT                                                                                                                                                              |
| **Units**         | Units are in % per 10 microseconds (%/10μs)                                                                                                                                 |

### Ramp Up Rate

| **Description**   | Slew rate to apply to transients when increasing the output duty cycle to the motor. |
| ----------------- | ------------------------------------------------------------------------------------ |
| **ID**            | 0x0010                                                                               |
| **DroneCAN Name** | RAMP\_UP\_RT                                                                         |
| **Units**         | Units are in % per 10 microseconds (%/10μs)                                          |

### RPM Limit

| **Description**   | Enable RPM limit. The unit will decrease the output duty cycle as the approach to setting limit occurs. |
| ----------------- | ------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x005c                                                                                                  |
| **DroneCAN Name** | RPM\_LIM\_EN                                                                                            |
| **Units**         | N/A                                                                                                     |

### Stopping Behavior

| **Description**   | Selects the behavior of the bridge when motor drive stops after a 0% throttle signal is given. When set to 'Freewheeling' the bridge will be set to a floating state where all phases are disconnected. 'Passive Hold' will short the motor phases which will provide a braking force, this can prevent the windmilling of propellers and consumes no power. 'Active Hold' will apply the configured active hold duty cycle to the motor to provide a braking force, this is generally stronger than the passive braking force but consumes power and generates heat in the motor. |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x019b                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| **DroneCAN Name** | STOP\_BEHAV                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| **Units**         | N/A                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |

**Value Mappings**:

- 0 -> Freewheeling
- 1 -> Passive Hold
- 2 -> Active Hold

### Stopping Behavior on Armed

| **Description**   | Perform the configured stopping behavior whenever the unit enters armed state. This will cause the stopping behavior on startup once a valid signal is acquired and arming conditions are met. |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x017c                                                                                                                                                                                         |
| **DroneCAN Name** | STOP\_ON\_ARMED                                                                                                                                                                                |
| **Units**         | N/A                                                                                                                                                                                            |

### Truncate Throttle Below Minimum Duty Cycle

| **Description**   | Throttle values that map to a duty cycle below the configured minimum duty cycle are truncated to 0. In normal drive mode if MIN\_DUTY is set to 5% then any throttle below 5% will command 0 output duty. This setting does not affect zero throttle checks. This should be enabled when using 'Dynamic Idle' on Betaflight flight computers. |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **ID**            | 0x017b                                                                                                                                                                                                                                                                                                                                         |
| **DroneCAN Name** | TRNC\_MIN\_DUTY                                                                                                                                                                                                                                                                                                                                |
| **Units**         | N/A                                                                                                                                                                                                                                                                                                                                            |



