UART Interface

Connection

Using the Pinout as reference, UART should be connected like this:

  • Supply 3.3V - 5V to ISO VDD with respect to ISO GND. The logic level of UART TX and UART RX is defined by the voltage you supply to ISO VDD.

  • Connect UART TX <=> Rx of other device

  • Connect UART RX <=> Tx of other device

  • Connect ISO GND <=> GND of the other device

Configuration

The ODrive’s UART interface is disabled by default. You can enable it by running:

odrv0.config.enable_uart_a = True
odrv0.config.gpio12_mode = GpioMode.UART_A
odrv0.config.gpio13_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

odrv0.config.uart_a_baudrate

unsigned int

115200

odrv0.config.uart0_protocol

StreamProtocolType

StreamProtocolType.ASCII_AND_STDOUT