Hi, I’m using odrive v3.6, firmware 0.5.1, AS5047P encoder with SPI.
As long as I don’t run odrv0.save_configuration()
, everything works fine.
I find it hard to believe that this is caused by interface or pool wiring, otherwise I shouldn’t be able to run closed loop control.
Reconnected to ODrive as odrv0
In [25]: odrv0.axis1.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
In [26]: dump_errors(odrv0)
axis0
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
In [27]: odrv0.axis1.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
In [28]: dump_errors(odrv0)
axis0
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
axis1
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
In [29]: odrv0.save_configuration()
In [30]: dump_errors(odrv0)
axis0
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
axis1
axis: Error(s):
AXIS_ERROR_ENCODER_FAILED
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: Error(s):
ENCODER_ERROR_ABS_SPI_COM_FAIL
controller: no error
This may be a transient issue on boot – if you run odrv0.clear_errors()
does the error show up again?
At first it gave one more error.
Oh no odrv0 disappeared
Reconnected to ODrive as odrv0
In [4]: odrv0.axis1.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
In [5]: odrv0.save_configuration()
In [6]: dump_errors(odrv0)
axis0
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
axis1
axis: Error(s):
AXIS_ERROR_CURRENT_MEASUREMENT_TIMEOUT
AXIS_ERROR_ENCODER_FAILED
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: Error(s):
ENCODER_ERROR_ABS_SPI_COM_FAIL
controller: no error
In [7]: odrv0.axis1.clear_errors()
In [8]: dump_errors(odrv0)
axis0
axis: no error
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: no error
controller: no error
axis1
axis: Error(s):
AXIS_ERROR_CURRENT_MEASUREMENT_TIMEOUT
AXIS_ERROR_ENCODER_FAILED
motor: no error
fet_thermistor: no error
motor_thermistor: no error
encoder: Error(s):
ENCODER_ERROR_ABS_SPI_COM_FAIL
controller: no error
After I rebooted the board again, the CURRENT_MEASUREMENT_TIMEOUT error disappeared. odrv0.axis1.clear_errors()
does clear the error, but I still have to re-calibrate encoder because odrv0.save_configuration()
doesn’t save the calibration result as document says.
Try also setting odrv0.axis1.encoder.config.pre_calibrated = True
before the save_configuration()
ODrive now is working as I intend, though still get the annoying ABS_SPI_COM_FAIL
error when run odrv0.save_configuration()
.
thx for your response!
Great to hear it’s working! Note I think you can ignore the error if needed – it should be cleared when you enter closed loop.
It could also be an EMI or wiring issue - if you want to send a picture of your wiring, happy to take a look.