» S
h
o
w
 
M
e
n
u

ESC32 Command Line Interface

The CLI (Command Line Interface) is the most basic way of accessing, configuring, and testing the ESC32

The CLI interface can be accessed via USB or Serial using a terminal program like Putty with the following settings:

230400 baud, 8 bits, 1 stop bit.

Once accessed, the CLI will respond with version serial number, and be ready to receive a command.

New: You can also use the CLI interface embedded in the AutoQuad ESC Configuration Utility. Get more info on our dedicated Wiki page.

 

 

Type “help” – This will bring up a list of commands available:

> help
Available commands:
  arm
  beep  
  binary
  bootloader
  config [READ | WRITE | DEFAULT]
  disarm
  duty 
  help
  input [PWM | UART | I2C | CAN]
  mode [OPEN_LOOP | RPM | THRUST | SERVO]
  play 
  pos 
  rpm 
  serno
  set LIST | [ ]
  start
  status
  stop
  telemetry 
  version
  >
 

Command Overview

Some are simple commands, like arm, start, stop, disarm and some like “duty” or “rpm” needs to be stated with a value or parameter and value added.  The ESC will respond if the Command is valid.

Example – Arming, Starting, Running, Stopping & Disarming

“arm” will set the input mode to UART and arm the motor:

> arm
  Input mode set to UART
  ESC armed

“start” will start the motor

> start
  ESC started

“duty 20” will set the motor duty (throttle) to 20 percent

“Stop” will stop the motor

“Disarm” will disarm the motor

“mode RPM” will set the esc to Closed loop RPM mode for this  session.

“input CAN” will change the input to CAN for this session.

Configuring Parameters from the CLI

Typing  “set list” will bring up the list of changeable parameters and list their current value – shown below for a ESC32v3:

set list
  STARTUP_MODE         = 0
  BAUD_RATE            = 230400 baud
  PTERM                = 0.500
  ITERM                = 0.00500
  FF1TERM              = +0.00000e+00
  FF2TERM              = +0.00000e+00
  MIN_PERIOD           = 50 us
  MAX_PERIOD           = 12000 us
  ADVANCE              = 15.00 Degs
  START_VOLTAGE        = 0.75 Volts
  GOOD_DETECTS_START   = 48
  BAD_DETECTS_DISARM   = 32
  MAX_CURRENT          = 20.00 Amps
  START_CURRENT        = 0.75 Amps
  SWITCH_FREQ          = 20.0 KHz
  MOTOR_POLES          = 14
  PWM_MIN_PERIOD       = 2200 us
  PWM_MAX_PERIOD       = 25000 us
  PWM_MIN_VALUE        = 750 us
  PWM_LO_VALUE         = 1000 us
  PWM_HI_VALUE         = 1950 us
  PWM_MAX_VALUE        = 2250 us
  PWM_MIN_START        = 1100 us
  PWM_RPM_SCALE        = 6000 RPM
  ACTIVE_FREEWHEEL     = 1
  THR1TERM             = +0.00000e+00
  THR2TERM             = +1.00000e+00
  RPM_MEAS_LP          = 0.750
  SERVO_DUTY           = 5.0 %
  SERVO_P              = 0.050
  SERVO_D              = 0.000
  SERVO_MAX_RATE       = 1000.0 deg/s
  SERVO_SCALE          = 360.0 deg
  ESC_ID               = 1
  DIRECTION            = 1
  AUDIO_VOLUME         = 0.0

To change any parameter simply type “set” followed by the parameter name and its new value. Changes will be applied immediately, but wont be made permanent until written to flash memory.

To change the direction of the motor, type

> set DIRECTION -1
  DIRECTION            = -1

Or to set the number of motor poles to 28:

> set MOTOR_POLES 28
  MOTOR_POLES          = 28

Writing to flash memory:

Once you have configured everything, you need to make the configuration permanent by writing it to flash memory or your changes will be lost when the ESC is powered off.

To write the current configuration to flash memory, type

config WRITE

This page was created on 11-Aug-15 by jussi. Last modified on 18-Aug-15 by MaxP.