OK did it. Just fired up ST32CubeMX, changed GPIO_6 to Output, generated the code, diffed against master and applied resulting patch, then added a few functions to expose to odrivetool. The whole experience to quickly expose functionality to the host was pretty slick.
I am not knowledgeable enough to use a program like ST32CubeMX at the moment. Is there any workaround to setting a GPIO pin as output using solely odrivetool? For my application, I need to make any pin go HIGH when a motor should be moving and LOW when the motor has stopped.
Thank you for responding! Where should I be looking to set the GPIO as output? I’ve looked into GPIO modes, the pinout page, and GPIO tests so far, but I can’t seem to find anything about writing to a pin. Is output considered a special mode?
When there are no errors, the pin will be LOW at 0. You can set an error with
odrv0.axis0.motor.error = 1
or use an error code that you would not expect in your application. When there is an error present on the ODrive, this pin will be HIGH at 1. Very janky, but it worked for what I needed to do.
EDIT: Here is the corresponding firmware code in case anyone more knowledgeable than me in firmware design wants to take a stab at making this a dedicated feature.