Half-Duplex Operations

Can the UART system on the OpenMV board be configured for half-duplex operations?

If you edit the firmware, otherwise no. However, you can just tie the two lines (RX/TX) together if you only plan to use one pin to send and receive on. Just make sure to add a series resistor between the two devices.

You can. See this code for the pyboard (STM32F405):

If you set the HDSEL bit in the uart’s CR3 register, then it puts the uart in half-duplex mode, and connects Tx to Rx internally. You only need to use the TX pin externally. I use this for talking to Robotis AX-12 servos.

OpenMV uses the STM32F427 which has the same registers.


@dhylands, thank you for this information. That’s exactly what we were looking for since we’re also using the same AX-12 servos (see link below). We’re hoping to use the OpenMV camera to track a target object and control the robotic arm to grab it.


Just FYI: I have another repository which implements a CLI tool (in Python2) for talking to bioloid devices,
GitHub - dhylands/Bioloid: Python code for working with bioloid devices. (this was written long before MicroPython existed)

The repository with the half-duplex serial stuff: GitHub - dhylands/bioloid3: Python3 code for controlling Bioloid servos and devices will eventually have code for implementing our own devices on the bioloid bus. We’re currently using an Epruino Pico as a USB to bioloid bus adapter and we’ll allow the Pico to also be a node on the bus.

Dave, we’re currently using the python api in the DynamixelSDK with the usb2ax adapter instead of the USB2Dynamixel. Your bioloid3 implementation looks pretty cool though. Thanks for sharing this information.