From 201604c510ca2ae23cd45085437cf3f960428c17 Mon Sep 17 00:00:00 2001 From: camrbuss Date: Thu, 28 May 2020 18:53:57 -0600 Subject: [PATCH] protocol documentation tweaks --- docs/ascii-protocol.md | 4 ++-- docs/can-protocol.md | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/ascii-protocol.md b/docs/ascii-protocol.md index b82863e0..93ba8a02 100644 --- a/docs/ascii-protocol.md +++ b/docs/ascii-protocol.md @@ -20,7 +20,7 @@ The ASCII protocol is human-readable and line-oriented, with each line having th command *42 ; comment [new line character] ``` - * `*42` stands for a GCode compatible checksum and can be omitted. If and only if a checksum is provided, the device will also include a checksum in the response, if any. The checksum is calculated as the bitwise xor of all characters before the asterisk (`*`).
Example of a valid checksum: `r vbus_voltage *93`. + * `*42` stands for a GCode compatible checksum and can be omitted. If and only if a checksum is provided, the device will also include a checksum in the response, if any. If the checksum is provided but is not valid, the line is ignored. The checksum is calculated as the bitwise xor of all characters before the asterisk (`*`).
Example of a valid checksum: `r vbus_voltage *93`. * comments are supported for GCode compatibility * the command is interpreted once the new-line character is encountered @@ -126,7 +126,7 @@ Not all parameters can be accessed via the ASCII protocol but at least all param ``` * `property` name of the property, as seen in ODrive Tool * response: text representation of the requested value - * Example: `r vbus_voltage` => response: `24.087744` + * Example: `r vbus_voltage` => response: `24.087744` <new line> * Writing: ``` w [property] [value] diff --git a/docs/can-protocol.md b/docs/can-protocol.md index b4522bb3..3360b4ce 100644 --- a/docs/can-protocol.md +++ b/docs/can-protocol.md @@ -1,7 +1,7 @@ # CAN Protocol ## Hardware Setup -ODrive assumes the CAN PHY is a standard differential twisted pair in a linear bus configuration with 120 ohm termination resistance at each end. ODrive uses 3.3v as the high output, but conforms to the CAN PHY requirement of achieving a differential voltage > 1.5V to represent a "0". As such, it is compatible with standard 5V bus architectures. +ODrive assumes the CAN PHY is a standard differential twisted pair in a linear bus configuration with 120 ohm termination resistance at each end. ODrive versions less than V3.5 include a soldered 120 ohm termination resistor, but ODrive versions greater than V3.5 implement a dip switch to toggle the termination. ODrive uses 3.3v as the high output, but conforms to the CAN PHY requirement of achieving a differential voltage > 1.5V to represent a "0". As such, it is compatible with standard 5V bus architectures. ODrive currently supports the following CAN baud rates: * 125 kbps @@ -32,6 +32,7 @@ Receive PDO 0x200 + nodeID = 0x223, which does not conflict with the range [0x20 Be careful that you don't assign too many nodeIDs per PDO group. Four CAN Simple nodes (32*4) is all of the available address space of a single PDO. If the bus is strictly ODrive CAN Simple nodes, a simple sequential Node ID assignment will work fine. ### Messages + CMD ID | Name | Sender | Signals | Start byte | Signal Type | Bits | Factor | Offset | Byte Order --: | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- | :-- 0x000 | CANOpen NMT Message\*\* | Master | - | - | - | - | - | - | - @@ -40,7 +41,7 @@ CMD ID | Name | Sender | Signals | Start byte | Signal Type | Bits | Factor | Of 0x003 | Get Motor Error\* | Axis | Motor Error | 0 | Unsigned Int | 32 | 1 | 0 | Intel 0x004 | Get Encoder Error\* | Axis | Encoder Error | 0 | Unsigned Int | 32 | 1 | 0 | Intel 0x005 | Get Sensorless Error\* | Axis | Sensorless Error | 0 | Unsigned Int | 32 | 1 | 0 | Intel -0x006 | Set Axis Node ID | Master | Axis CAN Node ID | 0 | Unsigned Int | 16 | 1 | 0 | Intel +0x006 | Set Axis Node ID | Master | Axis CAN Node ID | 0 | Unsigned Int | 32 | 1 | 0 | Intel 0x007 | Set Axis Requested State | Master | Axis Requested State | 0 | Unsigned Int | 32 | 1 | 0 | Intel 0x008 | Set Axis Startup Config | Master | - Not yet implemented - | - | - | - | - | - | - 0x009 | Get Encoder Estimates\* | Master | Encoder Pos Estimate
Encoder Vel Estimate | 0
4 | IEEE 754 Float
IEEE 754 Float | 32
32 | 1
1 | 0
0 | Intel
Intel