UART Interface
Connection
Using the datasheet (Pro, S1) as a reference, UART should be connected like this:
Supply 3.3V - 5V to
ISO VDD
with respect toISO GND
. The logic level ofUART TX
andUART RX
is defined by the voltage you supply toISO VDD
.Connect
UART TX
<=> Rx of other deviceConnect
UART RX
<=> Tx of other deviceConnect
ISO GND
<=> GND of the other device
Configuration
The ODrive’s UART interface is disabled by default. Identify the RX and TX gpio numbers from the datasheet (Pro, S1) and enter the following to enable:
odrv0.config.enable_uart_a
= Trueodrv0.config.gpio(RX)_mode
=GpioMode.UART_A
odrv0.config.gpio(TX)_mode
=GpioMode.UART_A
odrv0.save_configuration()
Once enabled, the UART interface by default runs the ASCII Protocol at a baudrate of 115200. This setting is compatible with the Arduino Library.
For other use cases, you might want to change the baudrate or the protocol:
Name |
Type |
Default |
---|---|---|
unsigned int |
115200 |
|