<Protocolapi="62"comment="This is the ICD for the Gen-2 Currawong Engineering Electronic Speed Controller (ESCVelocity). This document details the ESCVelocity command and packet structure for communication with and configuration of the ESC. Note that there may be some differences between this ICD and the ICD for the Gen-1 ESCVelocity. Please refer to the old ICD for the Gen-1 device."endian="big"file="ESCPackets"mapfile="ESC_SettingsMap"name="ESCVelocity"prefix="ESC_"supportBool="true"supportFloat64="false"supportInt64="false"supportSpecialFloat="false"verifyfile="ESC_SettingsVerify"version="3.41"><Includecomment="C string manipulation function header"global="true"name="string.h"/>
<Structurecomment="Status bits associated with the legacy (gen-1) ESC"file="LegacyESCDefines"name="LegacyStatusBits">
<Datacomment="1 = Hardware inhibit is active (ESC is disabled)"inMemoryType="bitfield1"name="hwInhibit"/>
<Datacomment="1 = Software inhibit is active (ESC is disabled)"inMemoryType="bitfield1"name="swInhibit"/>
<Datacomment="0 = Active Freewheeling is not enabled, 1 = Active Freewheeling is enabled"inMemoryType="bitfield1"name="afwEnabled"/>
<Datacomment="0 = Motor direction is FORWARDS, 1= Motor direction is REVERSE"inMemoryType="bitfield1"name="direction"/>
<Datacomment="Set if the ESC command timeout period has elapsed (and the ESC is in STANDBY mode)"inMemoryType="bitfield1"name="timeout"/>
<Datacomment="1 = in starting mode (0 = stopped or running)"inMemoryType="bitfield1"name="starting"/>
<Datacomment="0 = most recent command from CAN, 1 = most recent command from PWM"inMemoryType="bitfield1"name="commandSource"/>
<Datacomment="ESC is running"inMemoryType="bitfield1"name="running"/>
</Structure>
<Structurecomment="Warning bits associated with the legacy (gen-1) ESC"file="LegacyESCDefines"name="LegacyWarningBits">
<Datacomment="Set if RPM signal is not detected"inMemoryType="bitfield1"name="noRPMSignal"/>
<Datacomment="Set if the ESC motor speed exceeds the configured warning threshold"inMemoryType="bitfield1"name="overspeed"/>
<Datacomment="Set if the ESC motor current (positive or negative) exceeds the configured warning threshold"inMemoryType="bitfield1"name="overcurrent"/>
<Datacomment="Set if the internal ESC temperature is above the warning threshold"inMemoryType="bitfield1"name="escTemperature"/>
<Datacomment="Set if the motor temperature is above the warning threshold"inMemoryType="bitfield1"name="motorTemperature"/>
<Datacomment="Set if the input voltage is below the minimum threshold"inMemoryType="bitfield1"name="undervoltage"/>
<Datacomment="Set if the input voltage is above the maximum threshold"inMemoryType="bitfield1"name="overvoltage"/>
<Datacomment="Set if hardware PWM input is enabled but invalid"inMemoryType="bitfield1"name="invalidPWMsignal"/>
</Structure>
<Structurecomment="Error bits associated with the legacy (gen-1) ESC"file="LegacyESCDefines"name="LegacyErrorBits">
<Datacomment="Set if communication link to the motor controller is lost"inMemoryType="bitfield1"name="linkError"/>
<Datacomment="Set if the ESC has detected an overcurrent event and is actively folding back duty cycle"inMemoryType="bitfield1"name="foldback"/>
<Datacomment="Set if the settings checksum does not match the programmed values"inMemoryType="bitfield1"name="settingsChecksum"/>
<Datacomment="Set if the motor settings are invalid"inMemoryType="bitfield1"name="motorSettings"/>
<Datacomment="Reserved for future use"inMemoryType="bitfield1"name="reservedD"/>
<Datacomment="Reserved for future use"inMemoryType="bitfield1"name="reservedE"/>
<Datacomment="Reserved for future use"inMemoryType="bitfield1"name="reservedF"/>
<Datacomment="Reserved for future use"inMemoryType="bitfield1"name="reservedG"/>
</Structure>
<PacketID="PKT_ESC_STATUS_A"comment="Legacy (gen-1) definition for the STATUS_A packet"file="LegacyESCPackets"name="LegacyStatusA"parameterInterface="true">
<DatacheckConstant="true"comment="Set to 0 to indicate a Gen-2 ESC"constant="0"encodedType="bitfield1"inMemoryType="null"name="version"/>
<Datacomment="ESC operating mode. The lower four bits indicate the operational mode of the ESC, in accordance with the ESCOperatingModes enumeration. The upper 3 bits are used for debugging and should be ignored for general use."encodedType="bitfield7"inMemoryType="unsigned8"name="mode"/>
<Datacomment="ESC status bits"name="status"struct="LegacyStatusBits"/>
<Datacomment="ESC operational command - value depends on 'mode' available in this packet. If the ESC is disabled, data reads 0x0000. If the ESC is in open-loop PWM mode, this value is the PWM command in units of 1us, in the range 1000us to 2000us. If the ESC is in closed-loop RPM mode, this value is the RPM command in units of 1RPM"inMemoryType="unsigned16"name="command"/>
<Datacomment="Motor speed"inMemoryType="unsigned16"name="rpm"units="1RPM per bit"/>
<Enumcomment="Constant values required for sending a disable (inhibit) command"description="These values are required for the DISABLE command"name="ESCDisableSequence">
<Valuecomment="Constant value required for disabling the ESC"name="ESC_DISABLE_A"value="0xAA"/>
<Valuecomment="Constant value required for disabling the ESC"name="ESC_DISABLE_B"value="0xC3"/>
</Enum>
<Enumcomment="Constant values required for sending an enable command"description="These values are required for the ENABLE command"name="ESCEnableSequence">
<Valuecomment="Constant value required for enabling the ESC"name="ESC_ENABLE_A"value="0xAA"/>
<Valuecomment="Constant value required for enabling the ESC"name="ESC_ENABLE_B"value="0x3C"/>
</Enum>
<Enumcomment="ESC Operational Modes"description="These values define the various modes of operation of the ESC"lookup="true"name="ESCOperatingModes"prefix="ESC_MODE_">
<Valuecomment="ESC is in standby mode - the motor is OFF but the ESC is ready to accept motor commands"name="STANDBY"value="0x00"/>
<Valuecomment="ESC is controlling motor in open-loop mode based on a 'PWM' (Pulse Width) input"name="PWM"/>
<Valuecomment="ESC is controlling motor speed based on an RPM setpoint"name="RPM"/>
<Enumcomment="ESC Command Sources"description="These values define the source that the ESC has received its most recent valid command from"lookup="true"name="ESCCommandSources"prefix="ESC_COMMAND_SOURCE_">
<Valuecomment="No valid command has been received"name="NONE"value="0x00"/>
<Valuecomment="Most recent command from CAN"name="CAN"/>
<Valuecomment="Most recent command from PWM"name="PWM"/>
</Enum>
<Enumcomment="ESC motor temperature sensor options"description="These values define the supported motor temperature sensors"lookup="true"name="ESCMotorTemperatureSensor"prefix="ESC_MOTOR_TEMP_SENSOR_">
<Valuecomment="No temperature sensor selected"name="OFF"value="0x00"/>
<Valuecomment="KTY84 or equivalent"name="KTY84"/>
<Valuecomment="KTY83 or equivalent"name="KTY83"/>
<Valuecomment="Use a custom temperature lookup table"name="CUSTOM"/>
<Valuecomment="All motor beeps"name="ALL"value="0b11"/>
</Enum>
<Enumcomment="ESC standby cause flags"description="These flags indicate the cause(s) of an ESC standby event."lookup="true"name="ESCStandbyCause"prefix="ESC_STANDBY_CAUSE_">
<Valuecomment="ESC was put into *STANDBY* mode by a command"name="CMD"value="0x0001"/>
<Valuecomment="ESC was put into *STANDBY* mode by SW or HW inhibit"name="INHIBIT"value="0x0002"/>
<Valuecomment="ESC was put into *STANDBY* mode due to keepalive timeout"name="TIMEOUT"value="0x0004"/>
<Valuecomment="ESC was put into *STANDBY* mode due to a hall sensor error"name="HALL_SENSOR_ERROR"value="0x0008"/>
<Valuecomment="ESC was put into *STANDBY* mode due to a command being invalid"name="INVALID_CMD"value="0x0010"/>
<Valuecomment="PWM arming signal detected"name="PWM_ARM"value="0x0020"/>
<Valuecomment="ESC was put into *STANDBY* mode due to failed starting routine"name="FAILED_START"value="0x0040"/>
<Valuecomment="ESC was put into *STANDBY* mode due to the received command below minimum threshold"name="MIN_CMD"value="0x0080"/>
<Valuecomment="ESC was put into *STANDBY* mode due to failed resync routine"name="FAILED_RESYNC"value="0x0100"/>
<Valuecomment=""name="RESET"value="0x8000"/>
</Enum>
<Enumcomment="ESC disable cause flags"description="These flags indicate the cause(s) of an ESC disable event."lookup="true"name="ESCDisableCause"prefix="ESC_DISABLE_CAUSE_">
<Valuecomment="ESC is disabled by a CAN command"name="CAN_CMD"value="0x0001"/>
<Valuecomment="PWM signal lost"name="PWM_TIMEOUT"value="0x0002"/>
<Valuecomment="Hardware enable signal deasserted"name="HARDWARE"value="0x0004"/>
<Valuecomment="ESC disabled due to overcurrent"name="OVERCURRENT"value="0x0008"/>
<Valuecomment="ESC disabled due to overspeed"name="OVERSPEED"value="0x0010"/>
<Valuecomment="ESC disabled due to overtemperature"name="OVERTEMP"value="0x0020"/>
<Valuecomment="ESC disabled due to undervoltage"name="UNDERVOLTAGE"value="0x0040"/>
<Valuecomment="ESC disabled due to starting failure (see ESCFailedStartCause for details)"name="FAILED_START"value="0x0080"/>
<Valuecomment="ESC disabled due to commutation failure"name="COMMUTATION_ERROR"value="0x0100"/>
<Valuecomment="ESC disabled due to invalid commutation state"name="INVALID_STATE"value="0x2000"/>
<Valuecomment="ESC is disabled by processor reset"name="RESET"value="0x8000"/>
</Enum>
<Enumcomment="ESC motor OFF cause"description="These flags indicate the cause(s) of an ESC motor off event"lookup="true"name="ESCMotorOffCause"prefix="ESC_MOTOR_OFF_">
<Valuecomment="Motor turned off due to system standby"name="STANDBY"value="0x0001"/>
<Valuecomment="Motor turned off due to beeping routine"name="BEEP"value="0x0002"/>
<Valuecomment="Motor turned off at system initialisation"name="INITIALISE"value="0x0004"/>
<Valuecomment="Motor turned off due to ESC being inhibited"name="INHIBITED"value="0x0010"/>
<Enumcomment="Failed start cause flags"description="These flags indicate the cause(s) of an ESC motor starting failure"lookup="true"name="ESCFailedStartCause"prefix="ESC_FAILED_START_CAUSE_">
<Valuecomment="No failed start has been recorded"name="RESET"value="0x0000"/>
<Valuecomment="Commutation speed too high"name="OVERSPEED"value="0x0002"/>
<Valuecomment="Starting current exceeded"name="OVERCURRENT"value="0x0004"/>
<Valuecomment="Motor is already spinning, in reverse direction"name="SPIN_REVERSED"value="0x0010"/>
<Valuecomment="Motor is already spinning, above maximum catch speed"name="SPIN_TOO_FAST"value="0x0020"/>
<Valuecomment=""name="INVALID"value="0x8000"/>
</Enum>
<Enumcomment="ESC Multi Command Packets"description="These packets can be used to send commands to 4 (four) ESCs with sequential CAN address identifiers, using a single CAN message. When sending these messages, they must be broadcast (using the special ESC broadcast address) so that each of the four target ESCs accept the CAN message."lookup="true"name="ESCMultiCommandPackets"prefix="PKT_ESC_">
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 1 - 4"name="SETPOINT_1"value="0"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 5 - 8"name="SETPOINT_2"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 9 - 12"name="SETPOINT_3"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 13 - 16"name="SETPOINT_4"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 17 - 20"name="SETPOINT_5"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 21 - 24"name="SETPOINT_6"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 25 - 28"name="SETPOINT_7"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 29 - 32"name="SETPOINT_8"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 33 - 36"name="SETPOINT_9"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 37 - 40"name="SETPOINT_10"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 41 - 44"name="SETPOINT_11"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 45 - 48"name="SETPOINT_12"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 49 - 52"name="SETPOINT_13"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 53 - 56"name="SETPOINT_14"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 57 - 60"name="SETPOINT_15"/>
<Valuecomment="This packet is used to send commands to multiple ESCs with sequential CAN IDs 61 - 64"name="SETPOINT_16"/>
</Enum>
<Enumcomment="ESC Command Packets"description="Command packets are sent to the ESC to change its operational mode. These packets **must** be fully implemented in the connected avionics system for complete operation of the PCU"lookup="true"name="ESCCommandPackets"prefix="PKT_ESC_">
<Valuecomment="Send a PWM (Pulse width) command to a particular ESC"name="PWM_CMD"value="0x10"/>
<Valuecomment="Send an RPM (Speed) command to a particular ESC"name="RPM_CMD"/>
<Valuecomment="Send this packet to an ESC to disable the ESC"name="DISABLE"value="0x20"/>
<Valuecomment="Send this packet to an ESC to enable the ESC and place it in Standby mode"name="STANDBY"/>
</Enum>
<Enumcomment="ESC Status Packets"description="Status packets are transmitted by the ESC at (user-configurable) intervals. These packets contain vital system information and should be fully implemented by the connected avionics device(s)."lookup="true"name="ESCStatusPackets"prefix="PKT_ESC_">
<Valuecomment="ESC Status A telemetry packet transmitted by the ESC at regular intervals"name="STATUS_A"value="0x80"/>
<Valuecomment="ESC Status B telemetry packet transmitted by the ESC at regular intervals"name="STATUS_B"/>
<Valuecomment="ESC Status C telemetry packet transmitted by the ESC at regular intervals (reserved for future use)"name="STATUS_C"/>
<Enumcomment="ESC Packets Definitions"description="ESC configuration packets. Each packet can be requested from the ESC by sending a zero-length packet of the same type."lookup="true"name="ESCPackets"prefix="PKT_ESC_">
<Valuecomment="Send a configuration command to the ESC (followed by optional command data bytes)"name="SYSTEM_CMD"value="0x50"/>
<Valuecomment="Control loop output data - varies depending on the operational mode of the ESC"name="CONTROL_LOOP_DATA"value="0x8A"/>
<Valuecomment="ESC warning / error status information."name="WARNINGS_ERRORS"value="0x86"/>
<Valuecomment="Motor status flags"name="MOTOR_FLAGS"/>
<Enumcomment="ESC System Commands"description="These commands can be sent using the ESC_SYSTEM_CMD packet. Read further in this document for information on individual command packets."lookup="true"name="ESCSystemCommands"prefix="CMD_ESC_">
<Valuecomment="Set the CAN Node ID for the target ESC"name="SET_NODE_ID"value="0x50"/>
<Valuecomment="Set user ID A value"name="SET_USER_ID_A"/>
<Valuecomment="Set user ID B value"name="SET_USER_ID_B"/>
<Valuecomment="Tare the current measurement"name="TARE_CURRENT"value="0x60"/>
<Valuecomment="Identify the ESC with a sequence of LED flashes / beeps"name="IDENTIFY"value="0x70"/>
<Structurecomment="The *status* of the ESC is represented using these status bits. ESC system functionality can be quickly determined using these bits"file="ESCDefines"map="false"name="StatusBits">
<Datacomment="Set if hardware inhibit is active (ESC is disabled)"encodedType="bitfield1"inMemoryType="bool"name="hwInhibit"/>
<Datacomment="Set if software inhibit is active (ESC is disabled)"encodedType="bitfield1"inMemoryType="bool"name="swInhibit"/>
<Datacomment="Set if Active Freewheeling is currently active"encodedType="bitfield1"inMemoryType="bool"name="afwEnabled"/>
<Datacomment="0 = Motor direction is FORWARDS, 1= Motor direction is REVERSE"encodedType="bitfield1"inMemoryType="unsigned8"name="direction"/>
<Datacomment="Set if the ESC command timeout period has elapsed (and the ESC is in STANDBY mode)"encodedType="bitfield1"inMemoryType="bool"name="timeout"/>
<Datacomment="Set if ESC is in starting mode (Cleared if ESC is stopped or running)"encodedType="bitfield1"inMemoryType="bool"name="starting"/>
<Datacomment="0 = most recent command from CAN, 1 = most recent command from PWM"encodedType="bitfield1"inMemoryType="unsigned8"name="commandSource"/>
<Datacomment="Set if ESC is running"encodedType="bitfield1"inMemoryType="bool"name="running"/>
<Datacomment="Warning active - refer to the PKT_ESC_WARNINGS_ERRORS packet"encodedType="bitfield1"inMemoryType="bool"name="anyWarnings"/>
<Datacomment="Error active - refer to the PKT_ESC_WARNINGS_ERRORS packet"encodedType="bitfield1"inMemoryType="bool"name="anyErrors"/>
<Datacomment="Reserved bits for future use"constant="0"encodedType="bitfield5"inMemoryType="null"name="reservedBitsA"/>
<Datacomment="Set if the motor is spinning (even if it is not being driven)"encodedType="bitfield1"inMemoryType="bool"name="spinning"/>
<Datacomment="Set if motor is spinning opposite to configured rotation direction"encodedType="bitfield1"inMemoryType="bool"name="spinningReversed"/>
<Datacomment="Set if motor duty cycle is being limited due to ESC protection settings"encodedType="bitfield1"inMemoryType="bool"name="foldback"/>
<Datacomment="Set if the ESC is attempting to sync with the motor"encodedType="bitfield1"inMemoryType="bool"name="syncing"/>
<Datacomment="Reserved bits for future use"constant="0"encodedType="bitfield4"inMemoryType="null"name="reservedBitsC"/>
<Datacomment="Set if the ESC is in debug mode (factory use only)"encodedType="bitfield1"inMemoryType="bool"name="debug"/>
</Structure>
<Structurecomment="The *warning* bits enumerate various system warnings/errors of which the user (or user software) should be made aware. These *warning* bits are transmitted in the telemetry packets such that user software is aware of any these *warning* conditions and can poll the ESC for particular packets if any further information is needed. The ESC will continue to function in the case of a *warning* state"file="ESCDefines"map="false"name="WarningBits">
<Datacomment="Set if the ESC motor speed exceeds the configured warning threshold"encodedType="bitfield1"inMemoryType="bool"name="overspeed"/>
<Datacomment="Set if the ESC motor current (positive or negative) exceeds the configured warning threshold"encodedType="bitfield1"inMemoryType="bool"name="overcurrent"/>
<Datacomment="Set if the internal ESC temperature is above the warning threshold"encodedType="bitfield1"inMemoryType="bool"name="escTemperature"/>
<Datacomment="Set if the motor temperature is above the warning threshold"encodedType="bitfield1"inMemoryType="bool"name="motorTemperature"/>
<Datacomment="Set if the input voltage is below the minimum threshold"encodedType="bitfield1"inMemoryType="bool"name="undervoltage"/>
<Datacomment="Set if the input voltage is above the maximum threshold"encodedType="bitfield1"inMemoryType="bool"name="overvoltage"/>
<Datacomment="Set if hardware PWM input is enabled but invalid"encodedType="bitfield1"inMemoryType="bool"name="invalidPWMsignal"/>
<Datacomment="Set if the motor demag angle exceeds the maximum threshold"encodedType="bitfield1"inMemoryType="bool"name="demagAngle"/>
<Datacomment="Set if the auto-advance exceeds 25 degrees"encodedType="bitfield1"inMemoryType="bool"name="advanceLimit"/>
<Datacomment="Set if the measured demag pulse is exceptionally long"encodedType="bitfield1"inMemoryType="bool"name="longDemag"/>
<Datacomment="Set if a zero-crossing measurement was missed"encodedType="bitfield1"inMemoryType="bool"name="missedZeroCrossing"/>
<Datacomment="Motor is spinning in the wrong direction"encodedType="bitfield1"inMemoryType="bool"name="spinningReversed"/>
<Datacomment="Motor has reached maximum allowable commutation speed"encodedType="bitfield1"inMemoryType="bool"name="commSpeedLimit"/>
<Structurecomment="The *error* bits enumerate critical system errors that will cause the ESC to stop functioning until the error cases are alleviated"file="ESCDefines"map="false"name="ErrorBits">
<Structurecomment="These bits are used to determine which packets are automatically transmitted as telemetry data by the ESC. Only the packets described here can be configured as telemetry packets"file="ESCDefines"map="true"name="TelemetryPackets">
<Datacomment="If this bit is set, the STATUS_A packet will be transmitted at the configured rate"encodedType="bitfield1"inMemoryType="bool"initialValue="1"name="statusA"/>
<Datacomment="If this bit is set, the STATUS_B packet will be transmitted at the configured rate"encodedType="bitfield1"inMemoryType="bool"initialValue="1"name="statusB"/>
<Datacomment="If this bit is set, the STATUS_C packet will be transmitted at the configured rate"encodedType="bitfield1"inMemoryType="bool"initialValue="1"name="statusC"/>
<Datacomment="If this bit is set, the ACCELEROMETER packet will be transmitted at the configured rate"encodedType="bitfield1"inMemoryType="bool"initialValue="0"name="accelerometer"/>
<Datacomment="If this bit is set, the STATUS_D packet will be transmitted at the configured rate"encodedType="bitfield1"inMemoryType="bool"name="statusD"/>
<Datacomment="Reserved for future use"encodedType="bitfield1"inMemoryType="bool"name="reservedTelemA"/>
<Datacomment="If this bit is set, any STATUS_x packets selected for telemetry will be mirrored on the Piccolo Downlink packet group (0x14)"encodedType="bitfield1"inMemoryType="bool"name="piccoloDownlink"/>
<Datacomment="Reserved for future use"encodedType="bitfield1"inMemoryType="bool"name="reservedTelemC"/>
</Structure>
<Structurecomment="These bits are used to select which debug packets are transmitted at high-frequency by the ESC"file="ESCDefines"name="DebugPackets">
<PacketID="PKT_ESC_SETPOINT_1 PKT_ESC_SETPOINT_2 PKT_ESC_SETPOINT_3 PKT_ESC_SETPOINT_4 PKT_ESC_SETPOINT_5 PKT_ESC_SETPOINT_6 PKT_ESC_SETPOINT_7 PKT_ESC_SETPOINT_8 PKT_ESC_SETPOINT_9 PKT_ESC_SETPOINT_10 PKT_ESC_SETPOINT_11 PKT_ESC_SETPOINT_12 PKT_ESC_SETPOINT_13 PKT_ESC_SETPOINT_14 PKT_ESC_SETPOINT_15 PKT_ESC_SETPOINT_16"comment="Send this packet to command ESCs which have CAN ID values in the range {1,4} (inclusive). This packet must be sent as a broadcast packet (address = 0xFF) such that all ESCs can receive it. Similiar commands are available for commanding ESCs with ID values up to 64, using different ESC_SETPOINT_x packet ID values."name="CommandMultipleESCs"parameterInterface="true">
<Datacomment="The PWM (pulse width) command for ESC with CAN ID 1"inMemoryType="unsigned16"name="pwmValueA"units="1us per bit"/>
<Datacomment="The PWM (pulse width) command for ESC with CAN ID 2"inMemoryType="unsigned16"name="pwmValueB"units="1us per bit"/>
<Datacomment="The PWM (pulse width) command for ESC with CAN ID 3"inMemoryType="unsigned16"name="pwmValueC"units="1us per bit"/>
<Datacomment="The PWM (pulse width) command for ESC with CAN ID 4"inMemoryType="unsigned16"name="pwmValueD"units="1us per bit"/>
</Packet>
<PacketID="PKT_ESC_DISABLE"comment="Send this packet to the ESC to disable it. The ESC will not accept PWM/RPM commands until it is re-enabled."name="Disable"parameterInterface="true">
<DatacheckConstant="true"comment="This value must be set for the command to be accepted"constant="ESC_DISABLE_A"encodedType="unsigned8"inMemoryType="null"name="disableSequenceA"/>
<DatacheckConstant="true"comment="This value must be set for the command to be accepted"constant="ESC_DISABLE_B"encodedType="unsigned8"inMemoryType="null"name="disableSequenceB"/>
</Packet>
<PacketID="PKT_ESC_STANDBY"comment="Send this packet to the ESC to enable it. The ESC will be placed in Standby mode."name="Enable"parameterInterface="true">
<DatacheckConstant="true"comment="This value must be set for the command to be accepted"constant="ESC_ENABLE_A"encodedType="unsigned8"inMemoryType="null"name="enableSequenceA"/>
<DatacheckConstant="true"comment="This value must be set for the command to be included"constant="ESC_ENABLE_B"encodedType="unsigned8"inMemoryType="null"name="enableSequenceB"/>
</Packet>
<PacketID="PKT_ESC_PWM_CMD"comment="Send a PWM (pulse width) command to an individual ESC. The pulse width value in specified in microseconds for compatibility with standard ESC interface. Use the broadcast ID (0xFF) to send this command to all ESCs on the CAN bus."name="PWMCommand"parameterInterface="true">
<Datacomment="PWM command"inMemoryType="unsigned16"name="pwmCommand"units="1us per bit"/>
</Packet>
<PacketID="PKT_ESC_RPM_CMD"comment="Send an RPM (speed) command to an individual ESC. Use the broadcast ID (0xFF) to send this command to all ESCs on the CAN bus"name="RPMCommand"parameterInterface="true">
<PacketID="PKT_ESC_STATUS_A"comment="The ESC_STATUS_A packet contains high-priority ESC status information. This packet is transmitted by the ESC at regular (user-configurable) intervals. It can also be requested (polled) from the ESC by sending a zero-length packet of the same type."map="false"name="StatusA"parameterInterface="true">
<DatacheckConstant="true"comment="Set to 1 to indicate a Gen-2 ESC"constant="1"encodedType="bitfield1"inMemoryType="null"name="version"/>
<Datacomment="Reserved for future use"constant="0"encodedType="bitfield3"inMemoryType="null"name="reservedA"/>
<Datacomment="ESC operating mode. The lower four bits indicate the operational mode of the ESC, in accordance with the ESCOperatingModes enumeration. The upper three bits are used for debugging and should be ignored for general use."encodedType="bitfield4"inMemoryType="unsigned8"name="mode"/>
<Datacomment="ESC status bits"name="status"struct="StatusBits"/>
<Datacomment="ESC operational command - value depends on 'mode' available in this packet. If the ESC is disabled, data reads 0x0000. If the ESC is in open-loop PWM mode, this value is the PWM command in units of 1us, in the range 1000us to 2000us. If the ESC is in closed-loop RPM mode, this value is the RPM command in units of 1RPM"inMemoryType="unsigned16"name="command"/>
<Datacomment="Motor speed"inMemoryType="unsigned16"name="rpm"units="1RPM per bit"/>
</Packet>
<PacketID="PKT_ESC_STATUS_B"comment="The ESC_STATUS_B packet contains ESC operational information. This packet is transmitted by the ESC at regular (user-configurable) intervals. It can also be requested (polled) from the ESC by sending a zero-length packet of the same type."map="false"name="StatusB"parameterInterface="true">
<Datacomment="ESC Rail Voltage"inMemoryType="unsigned16"name="voltage"units="0.1V per bit"/>
<Datacomment="ESC Current. Current IN to the ESC is positive. Current OUT of the ESC is negative"inMemoryType="signed16"name="current"units="0.1A per bit"/>
<Datacomment="ESC Motor Duty Cycle"inMemoryType="unsigned16"name="dutyCycle"units="0.1% per bit"/>
<Datacomment="ESC Logic Board Temperature"inMemoryType="signed8"name="escTemperature"range="-128C to +127C"units="1 degree C per bit"/>
<Datacomment="ESC Motor Temperature"inMemoryType="unsigned8"name="motorTemperature"range="-50 to +205 (0 = -50C)"units="1 degree C per bit"/>
<Datacomment="Current motor PWM frequency (10 Hz per bit)"inMemoryType="unsigned16"name="pwmFrequency"/>
<Datacomment="Current timing advance (0.1 degree per bit)"inMemoryType="unsigned16"name="timingAdvance"/>
</Packet>
<PacketID="PKT_ESC_ACCELEROMETER"comment="This packet contains raw accelerometer data from the ESC. It can be requested (polled) from the ESC by sending a zero-length packet of the same type. It can also be transmitted by the ESC at high-frequency using the high-frequency streaming functionality of the ESC"map="false"name="Accelerometer"parameterInterface="true">
<Datacomment="X axis acceleration value"inMemoryType="signed16"name="xAcc"notes="Multiply by (0.5 * fullscale / 2^resolution) to get acceleration value in 'g' units"range="-0x7FFF to +0x7FFF"/>
<Datacomment="Y axis acceleration value"inMemoryType="signed16"name="yAcc"notes="Multiply by (0.5 * fullscale / 2^resolution) to get acceleration value in 'g' units"range="-0x7FFF to +0x7FFF"/>
<Datacomment="Z axis acceleration value"inMemoryType="signed16"name="zAcc"notes="Multiply by (0.5 * fullscale / 2^resolution) to get acceleration value in 'g' units"range="-0x7FFF to +0x7FFF"/>
<Datacomment="Accelerometer measurement resolution, in 'bits'."inMemoryType="unsigned8"name="resolution"/>
</Packet>
<PacketID="PKT_ESC_WARNINGS_ERRORS"comment="Warning and error status information"map="false"name="WarningErrorStatus"parameterInterface="true"structureInterface="true">
<Dataname="warnings"struct="WarningBits"/>
<Dataname="errors"struct="ErrorBits"/>
</Packet>
<PacketID="PKT_ESC_SYSTEM_CMD"comment="Set the CAN Node ID of the target ESC"file="ESCCommands"map="false"name="SetNodeID"parameterInterface="true">
<Datacomment="The serial number must match that of the target ESC for the command to be accepted"inMemoryType="unsigned32"name="serialNumber"/>
<Datacomment="The new Node ID of the ESC"inMemoryType="unsigned8"name="nodeID"notes="An ESC with a Node ID of zero (0) will be disabled"range="0 to 254"/>
</Packet>
<PacketID="PKT_ESC_SYSTEM_CMD"comment="Set User ID A"file="ESCCommands"map="false"name="SetUserIDA"parameterInterface="true">
<DatacheckConstant="true"comment="This byte is required for the command to be accepted"constant="0xAB"encodedType="unsigned8"inMemoryType="null"name="resetSeqA"/>
<DatacheckConstant="true"comment="This byte is required for the command to be accepted"constant="0xCD"encodedType="unsigned8"inMemoryType="null"name="resetSeqA"/>
<Datacomment="Serial number must match ESC"inMemoryType="unsigned16"name="serialNumber"/>
<DatacheckConstant="true"comment="This byte is required for the command to be accepted"constant="0xAA"encodedType="unsigned8"inMemoryType="null"name="bootSeqA"/>
<DatacheckConstant="true"comment="This byte is required for the command to be accepted"constant="0x55"encodedType="unsigned8"inMemoryType="null"name="bootSeqB"/>
<DatacheckConstant="true"comment="This byte is required for the command to be accepted"constant="0xAA"encodedType="unsigned8"inMemoryType="null"name="resetSeqA"/>
<DatacheckConstant="true"comment="This byte is required for the command to be accepted"constant="0xCC"encodedType="unsigned8"inMemoryType="null"name="resetSeqB"/>
</Packet>
<PacketID="PKT_ESC_MOTOR_FLAGS"comment="Motor status flags"name="MotorStatusFlags"parameterInterface="true"structureInterface="true">
<Datacomment="Cause of most recent standby event"enum="ESCStandbyCause"inMemoryType="unsigned16"name="standbyCause"/>
<Datacomment="Cause of most recent disable event"enum="ESCDisableCause"inMemoryType="unsigned16"name="disableCause"/>
<Datacomment="Cause of most recent motor-stop event"enum="ESCMotorOffCause"inMemoryType="unsigned16"name="offCause"/>
<Datacomment="Cause of most recent failed-start"enum="ESCFailedStartCause"inMemoryType="unsigned16"name="failedStartCause"/>
<Datacomment="1 = ESC is inhibited (disabled) on startup"encodedType="bitfield1"inMemoryType="bool"initialValue="1"name="swInhibit"/>
<Datacomment="1 = ESC will respond to PICCOLO autopilot commands"encodedType="bitfield1"inMemoryType="bool"initialValue="1"name="piccoloCommands"/>
<Datacomment="1 = ESC will accept broadcast command messages"encodedType="bitfield1"inMemoryType="bool"initialValue="1"name="broadcastCommands"/>
<Datacomment="Command input source priority, refer to enumeration ESCCommandPriorities"encodedType="bitfield2"inMemoryType="unsigned8"initialValue="ESC_COMMAND_PRIORITY_CAN_PRIORITY"name="commandInputPriority"/>
<Datacomment="Reserved for future use"constant="0"encodedType="bitfield1"inMemoryType="null"name="reserved"/>
<Datacomment="External motor temperature sensor configuration"encodedType="bitfield2"inMemoryType="unsigned8"name="motorTempSensor"/>
<Datacomment="ESC keepalive timeout - If this is non-zero, the ESC will automatically revert to *STANDBY* mode if it does not receive a valid command for the alloted period"inMemoryType="unsigned8"initialValue="100"name="keepalive"notes="0 = No timeout"range="0 to 250 (0.0s to 25.0s)"units="100ms per bit"verifyMaxValue="250"/>
<Datacomment="Reserved for future use"encodedType="unsigned8"inMemoryType="null"name="reservedA"/>
<Datacomment="Reserved for future use"encodedType="unsigned8"inMemoryType="null"name="reservedB"/>
<Datacomment="Reserved for future use"encodedType="unsigned8"inMemoryType="null"name="reservedC"/>
<Datacomment="Reserved for future use"encodedType="unsigned16"inMemoryType="null"name="reservedD"/>
<Datacomment="Motor beep volume"encodedType="bitfield5"inMemoryType="unsigned8"initialValue="20"name="motorBeepVolume"units="5% per bit"verifyMaxValue="30"verifyMinValue="1"/>
<PacketID="PKT_ESC_SERIAL_NUMBER"comment="This packet contains the serial number for the ESC. Additionally there are two extra values (each 16-bit) which can be programmed by the user for any purpose."name="Address"packetType="config"parameterInterface="true"structureInterface="true">
<Datacomment="ESC hardware revision (OTP - not configurable by user)"inMemoryType="unsigned8"name="HardwareRevision"/>
<Datacomment="ESC model (OTP - not configurable by user)"inMemoryType="unsigned8"name="Model"/>
<Datacomment="ESC Serial Number (OTP - not configurable by user)"inMemoryType="unsigned16"name="SerialNumber"/>
<Datacomment="User ID Value A - user can set this value to any value"inMemoryType="unsigned16"name="UserIDA"/>
<Datacomment="User ID Value B - user can set this value to any value"inMemoryType="unsigned16"name="UserIDB"/>
</Packet>
<PacketID="PKT_ESC_TITLE"comment="This packet contains a zero-terminated string (max-length 8) used to identify the particular ESC."name="Title"parameterInterface="true">
<Dataarray="8"comment="Description of this ESC"inMemoryType="unsigned8"name="ESCTitle"/>
<PacketID="PKT_ESC_FIRMWARE"comment="This packet contains the firmware version of the ESC"name="Firmware"packetType="config"parameterInterface="true"structureInterface="true">
<Datacomment="Telemetry period code (maps indirectly to a telemetry period value)"inMemoryType="unsigned8"initialValue="74"name="period"notes="0 = Telemetry disabled"/>
<Datacomment="Telemetry silence period (delay after RESET before telemetry data is sent)"inMemoryType="unsigned8"initialValue="20"name="silence"range="0 - 250 (0.0s to 25.0s)"units="50ms per bit"verifyMaxValue="250"/>
<Datacomment="Bitfield describing which telemetry packets are enabled"name="packets"struct="TelemetryPackets"/>
</Packet>
<PacketID="PKT_ESC_TELEMETRY_SETTINGS"comment="This packet contains the telemetry packet configuration"name="TelemetrySettings"parameterInterface="true">
<PacketID="PKT_ESC_EEPROM"comment="This packet contains information on the non-volatile ESC settings"name="EEPROMSettings"parameterInterface="true"structureInterface="true">
<Datacomment="Set if the ESC settings are locked"encodedType="bitfield1"inMemoryType="bool"name="settingsLocked"/>
<Datacomment="Version of EEPROM data"encodedType="bitfield7"inMemoryType="unsigned8"name="version"range="1 to 127"/>
<Datacomment="Maximum recorded internal temperature"inMemoryType="unsigned8"initialValue="0"name="maxTemperature"/>
<Datacomment="Maximum recorded MOSFET temperature"inMemoryType="unsigned8"initialValue="0"name="maxFetTemperature"/>
<Datacomment="Maximum recorded motor temperature"inMemoryType="unsigned8"initialValue="0"name="maxMotorTemperature"/>
<Datacomment="Maximum recorded battery voltage"default="0"inMemoryType="unsigned8"initialValue="0"name="maxRippleVoltage"/>
<Datacomment="Maximum recorded battery current"default="0"encodedType="signed16"inMemoryType="float"initialValue="0"name="maxBatteryCurrent"scaler="10"/>
<Datacomment="Maximum recorded regen current"default="0"encodedType="signed16"inMemoryType="float"initialValue="0"name="maxRegenCurrent"scaler="10"/>
<Datacomment="Number of successful motor start events"default="0"inMemoryType="unsigned16"initialValue="0"name="totalStarts"/>
<Datacomment="Number of failed motor start events"default="0"inMemoryType="unsigned16"initialValue="0"name="failedStarts"/>
<Datacomment="ESC run time"default="0"inMemoryType="unsigned32"initialValue="0"name="escRunTime"/>
<Datacomment="Motor run time"default="0"inMemoryType="unsigned32"initialValue="0"name="motorRunTime"/>
<Datacomment="Number of recorded motor desync events"default="0"inMemoryType="unsigned32"initialValue="0"name="desyncEvents"/>
</Packet>
<PacketID="PKT_ESC_GIT_HASH"comment="Git commit hash for the ESC firmware"name="GitHash">
<Datacomment="PWM value corresponding with 0% throttle"inMemoryType="unsigned16"initialValue="1000"name="inputMin"units="us"verifyMaxValue="2500"verifyMinValue="250"/>
<Datacomment="PWM value corresponding with 1000% throttle"inMemoryType="unsigned16"initialValue="2000"name="inputMax"units="us"verifyMaxValue="2500"verifyMinValue="250"/>