Is there a parameter that can be set to “lock” a rotor by sending current through two of the phases. I have found in my tests with sensorless-velocity control that when I command the motor to spin at 0rpm, if the motor is rotated while idle, it may continue to move in that direction. I assume that’s an error with the sensorless estimator at low speeds which makes sense. A feature to simply lock the rotor shouldn’t be too difficult as I understand it as you could just pulse current through two phases.
You can use the “lockin spin” feature (currently only available on the devel
branch), and set the velocity to zero, and the current to the magnitude that you wish to hold with.
axis.config.lockin.<various settings>
axis.requested_state = AXIS_STATE_LOCKIN_SPIN