How to config odrive with absolute encoder

Hi, I’m using rc-v0.5.1 to configure the absolute encoder, but there’s something wrong with it. I can read the absolute encoder’s degree, but I failed in the closed loop control. Here is what I did in the configuration:

#step1:
odrv0.axis0.requested_state = AXIS_STATE_MOTOR_CALIBRATION
odrv0.axis0.motor.config.pre_calibrated = True
odrv0.save_configuration()
odrv0.reboot()

#step2:
odrv0.axis0.encoder.config.abs_spi_cs_gpio_pin = 1
odrv0.axis0.encoder.config.mode = 0x101
odrv0.axis0.encoder.config.cpr = 2**14
odrv0.save_configuration()
odrv0.reboot()

#step3:
odrv0.axis0.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION
odrv0.axis0.encoder.config.pre_calibrated = True
odrv0.save_configuration()
odrv0.reboot()

#step4:
odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL

No error was reported in the previous 3 steps, and I can read the corret encoder degree, but I failed in step4:
axis: Error(s):
ERROR_MOTOR_DISARMED
motor: Error(s):
ERROR_CONTROL_DEADLINE_MISSED
encoder: no error
controller: no error

I don’t know where is wrong. Can anyone help me? Thank you.

controller: no error

Really? Odd. It’s quite common to have a velocity error. Try setting controller.config.vel_limit higher

Than you. I tried to set the vel_lim to a very large number, but it still failed, and the error is the same.

After I finished the first 3 steps (run motor calibration and save, configure encoder paramaters and save, run encoder offset calibration and save), I still can’t run the colsed loop control ---- the motor has no reponse and even has no sound, and odrivetool dumps the errors ERROR_MOTOR_DISARMED & ERROR_CONTROL_DEADLINE_MISSED.

Ah I just realized you’re using an absolute encoder. Make sure you’re using v0.5.1-Rc3 which has a fix for absolute encoders. I just released it like an hour ago so you probably don’t have it. Otherwise, your steps look perfect.