Settings - neoxic/ESCape32 GitHub Wiki

This page corresponds to the latest firmware revision. Previous versions can be found here.

arm: 1

Wait for 250ms zero throttle on startup:

  • 0: off
  • 1: on

damp: 1

Damped mode (complementary PWM, active freewheeling):

  • 0: off
  • 1: on

revdir: 0

Reversed motor direction:

  • 0: off
  • 1: on

brushed: 0

Brushed mode:

  • 0: off
  • 1: on

In this mode, the ESC can be used with brushed motors connected to phases A and B (or C and B). The following settings have no effect: timing, sine_range, sine_power, freq_max, duty_spup, prot_stall.

timing: 16

Motor timing (15˚/16) [1..31].

sine_range: 0

Sine startup range (%) [0 - off, 5..25]. This value sets the portion of throttle range dedicated to sine startup mode (crawler mode). Damped mode must be enabled (the default) before sine startup mode can be activated. Stall protection can be used for seamless transition between sine startup and normal drive.

sine_power: 8

Sine startup power (%) [1..15]. Use caution because higher values may lead to overheating.

freq_min: 24

Minimum PWM frequency (kHz) [16..48].

freq_max: 48

Maximum PWM frequency (kHz) [16..96]. Smooth transition from minimum to maximum PWM frequency happens across [30..60] kERPM range.

duty_min: 1

Minimum duty cycle (%) [1..100]. This value sets power level at minimum throttle.

duty_max: 100

Maximum duty cycle (%) [1..100]. This value sets power level at maximum throttle.

duty_spup: 15

Maximum duty cycle during spin-up (%) [1..100]. Higher values give more power to the motor until the first sync'ed revolution, yet may increase the risk of overheating and frying things should the motor get jammed during a full throttle punch. Do not exceed the default value unless you know what you are doing!!!

duty_ramp: 0

Maximum duty cycle ramp (kERPM) [0..100]. This value enables maximum power cap between duty_spup at 0 ERPM and 100% at duty_ramp kERPM. It is most useful for taming a full throttle punch at lower RPM.

duty_rate: 25

Acceleration slew rate (0.1%/ms) [1..100]. This value controls the speed of power increase during acceleration. Should the motor stutter on a full throttle punch, try decreasing this value. Alternatively, you can try increasing timing albeit at the cost of efficiency and torque.

duty_drag: 0

Drag brake amount when the motor is stopped (%) [0..100]. This value is also a starting brake amount in proportional brake mode (RC car mode).

throt_mode: 0

Throttle mode:

  • 0: forward
  • 1: forward/reverse
  • 2: forward/brake/reverse (proportional brake mode)

throt_set: 0

Preset throttle (%) [0..100]. This value also serves as power level at minimum throttle in analog mode. Arming must be disabled before a non-zero value can be set. For example:

set arm 0
set volume 0
set throt_set 10

throt_cal: 1

Automatic throttle calibration for standard servo PWM frequencies, e.g. 50Hz, 100Hz, 125Hz, 200Hz, 250Hz, 333Hz:

  • 0: off
  • 1: on

This mode works by aligning the internal clock with servo PWM period that is a multiple of 1000µs, i.e. for servo PWM frequency F=1000/n where n=3..20. It must be disabled should a non-standard servo PWM signal be used.

throt_min: 1000

Minimum throttle setpoint (µs).

throt_mid: 1500

Middle throttle setpoint (µs).

throt_max: 2000

Maximum throttle setpoint (µs).

analog_min: 100

Minimum analog throttle setpoint (mV).

analog_max: 3200

Maximum analog throttle setpoint (mV).

input_mode: 0

Input mode:

  • 0: servo/Oneshot125/DSHOT
  • 1: analog
  • 2: serial
  • 3: iBUS
  • 4: SBUS/SBUS2
  • 5: CRSF

Analog mode:

  • Available on ESCs with PA2/PA6 input pin.
  • Throttle is unidirectional.
  • Minimum throttle is analog_min (anything below is zero throttle).
  • Maximum throttle is analog_max and above.

Serial mode:

  • Available on ESCs with PA2 input pin.
  • 460800 baud, 8 data bits, no parity, 1 stop bit.
  • Update rate is 40Hz or higher.
  • Inbound frame format:
    • Byte0: descriptor
      • Low nibble: value type
        • 0x0: none
        • 0x1: throttle [-2000..2000]
        • 0x2: reversed motor direction [0..1]
        • 0x3: drag brake amount [0..100]
        • 0x4: LED on/off bits [0..15]
      • High nibble: request type
        • 0x0: none
        • 0x8: combined telemetry
        • 0x9: electrical revolution time (µs)
        • 0xA: temperature (˚C)
        • 0xB: voltage (V/100)
        • 0xC: current (A/100)
        • 0xD: consumption (mAh)
    • Byte1: value (low byte)
    • Byte2: value (high byte)
    • Byte3: CRC8 (byte0..byte2)
  • Outbound frame format:
    • Combined telemetry (0x8):
      • Byte0: temperature
      • Byte1: voltage (low byte)
      • Byte2: voltage (high byte)
      • Byte3: current (low byte)
      • Byte4: current (high byte)
      • Byte5: consumption (low byte)
      • Byte6: consumption (high byte)
      • Byte7: electrical revolution time (low byte)
      • Byte8: electrical revolution time (high byte)
      • Byte9: CRC8 (byte0..byte8)
    • Individual telemetry values (0x9..0xD):
      • Byte0: value (low byte)
      • Byte1: value (high byte)
      • Byte2: CRC8 (byte0..byte1)

SBUS/SBUS2 is uninverted on AT32F421 MCU. To enable SBUS2 telemetry, telem_mode must be set to 0 (KISS), and a non-zero physical ID must be assigned using telem_phid to determine telemetry slot range:

ID Slots
1 3..7
2 11..15
3 19..23
4 27..31

Three sensors are exposed on the bus by the firmware (ID=1 as an example):

  1. SBS-01T - slot 3 (temperature)
  2. SBS-01R - slot 4 (RPM)
  3. SBS-01C - slot 5 (current), slot 6 (voltage), slot 7 (consumption)

input_chid: 0

Serial channel ID [0 - off, 1..14 - iBUS, 1..16 - SBUS/SBUS2/CRSF].

telem_mode: 0

Telemetry mode:

  • 0: KISS
  • 1: KISS auto
  • 2: iBUS
  • 3: S.Port
  • 4: CRSF

In KISS auto and CRSF mode, telemetry data is sent every 32ms.

S.Port is uninverted on AT32F421 MCU.

telem_phid: 0

Telemetry physical ID [0 - off, 1..3 - iBUS, 1..28 - S.Port, 1..4 - SBUS2].

telem_poles: 14

Number of motor poles for RPM telemetry [2..100].

prot_stall: 0

Stall protection (ERPM) [0 - off, 1800..3200]. If enabled, up to 8% power boost is applied to prevent the motor from slowing down below the threshold. This value also overrides the default maximum RPM in sine startup mode (2300 ERPM).

prot_temp: 0

Temperature threshold (˚C) [0 - off, 60..140]. If enabled, maximum power is reduced when the MCU becomes hotter than this temperature. The maximum power reduction is 75% (50% during sine startup) at 15˚C above the theshold.

prot_volt: 0

Low voltage cutoff per battery cell (V/10) [0 - off, 28..38].

prot_cells: 0

Number of battery cells [0 - auto, 1..16].

prot_curr: 0

Maximum current (A) [0..255].

music

Startup music. A sequence of characters is translated into music in the following way:

  • An optional number in the beginning defines tempo (BPM);
  • _ (underscore) is a pause;
  • cdefgab are low notes;
  • CDEFGAB are high notes;
  • # (pound) after a note makes it a sharp note;
  • n (number) after a note or pause is a duration: 1 - 1/16 (default), 2 - 1/8, 3 - 3/16, 4 - 1/4, etc.
  • + (plus) enables octave shift;
  • - (minus) disables octave shift;

volume: 25

Sound volume (%) [0..100].

beacon: 50

Beacon volume (%) [0..100].

bec: 0

BEC voltage control (if equipped):

  • 0: 5.5V
  • 1: 6.5V
  • 2: 7.4V
  • 3: 8.4V

led: 0

LED on/off bits [0..15].