Interfacing DynamixelSDK with STM32H743ZI running Zephyr RTOS

Hello!

I am attempting to interface an XW540-T260-R and XH430-W210 with a Nucleo STM32H74ZI dev board running Zephyr RTOS. The plan is to use an RS485 transceiver with UART underneath as the protocol. For now I will be supplying power to the servos with the U2D2 Power Hub Board.

I have taken a look at the DynamixelSDK and noticed that there is not any direct way to interface with a microcontroller other than an Arduino. My idea right now is to create a small API which defines a new port handler so that I can make use of the rest of the SDK for packet handling. Alternatively, I was considering maybe creating a wrapper of one of the already existing port handlers, though I am not entirely sure yet what they may look like. Before I dive too deep though, I was wondering if anybody had any suggestion as to whether one of these options or something else is the best course of action, or if there may be a library that already exists somewhere that I could be pointed to that would solve this issue. I am planning on using C or C++ for this.

Thank you and any help is appreciated!

Brandon

It might be hard to modify the DYNAMIXEL SDK directly. Another option is to refer to other approach as you thought.

I found that the following library for the use of DYNAMIXEL X series with Nucleo board, in C. As the DYNAMIXEL follows the same comm rule (DYNAMIXEL Protocol 2.0), it may give you hint how to interface.

https://www.enib.fr/~kerhoas/dynamixel.html

Although, the library suggested using the DYNAMIXEL Shield, you can use RS485 converter or build comm interface instead of using DYNAMIXEL Shield.