Problems with M0 when calibrating it

I tried to calibrate M0 and M1 and got this error:

config:
  abs_spi_cs_gpio_pin: 1 (uint16)
  bandwidth: 250.0 (float)
  calib_range: 0.019999999552965164 (float)
  calib_scan_distance: 150.0 (float)
  calib_scan_omega: 12.566370964050293 (float)
  cpr: 90 (int32)
  direction: 1 (int32)
  enable_phase_interpolation: True (bool)
  find_idx_on_lockin_only: False (bool)
  hall_polarity: 0 (uint8)
  hall_polarity_calibrated: False (bool)
  ignore_illegal_hall_state: False (bool)
  index_offset: 0.0 (float)
  mode: 1 (uint16)
  phase_offset: 0 (int32)
  phase_offset_float: 0.0 (float)
  pre_calibrated: False (bool)
  sincos_gpio_pin_cos: 4 (uint16)
  sincos_gpio_pin_sin: 3 (uint16)
  use_index: False (bool)
  use_index_offset: True (bool)
count_in_cpr: 0 (int32)
delta_pos_cpr_counts: 0.0 (float)
error: 528 (uint16)
hall_state: 1 (uint8)
index_found: False (bool)
interpolation: 0.5 (float)
is_ready: False (bool)
phase: 0.0 (float)
pos_abs: 0 (int32)
pos_circular: 0.0 (float)
pos_cpr_counts: 0.0 (float)
pos_estimate: 0.0 (float)
pos_estimate_counts: 0.0 (float)
set_linear_count(obj: object_ref, count: int32)
shadow_count: 0 (int32)
spi_error_rate: 0.0 (float)
vel_estimate: 0.0 (float)
vel_estimate_counts: 0.0 (float)  and Axis1:
calib_scan_response: 144.0 (float)
config:
  abs_spi_cs_gpio_pin: 1 (uint16)
  bandwidth: 250.0 (float)
  calib_range: 0.019999999552965164 (float)
  calib_scan_distance: 150.0 (float)
  calib_scan_omega: 12.566370964050293 (float)
  cpr: 90 (int32)
  direction: 1 (int32)
  enable_phase_interpolation: True (bool)
  find_idx_on_lockin_only: False (bool)
  hall_polarity: 0 (uint8)
  hall_polarity_calibrated: True (bool)
  ignore_illegal_hall_state: False (bool)
  index_offset: 0.0 (float)
  mode: 1 (uint16)
  phase_offset: 69 (int32)
  phase_offset_float: 1.4637079238891602 (float)
  pre_calibrated: False (bool)
  sincos_gpio_pin_cos: 4 (uint16)
  sincos_gpio_pin_sin: 3 (uint16)
  use_index: False (bool)
  use_index_offset: True (bool)
count_in_cpr: 88 (int32)
delta_pos_cpr_counts: 5.605193857299268e-45 (float)
error: 0 (uint16)
hall_state: 4 (uint8)
index_found: False (bool)
interpolation: 0.5 (float)
is_ready: True (bool)
phase: 0.03800535202026367 (float)
pos_abs: 0 (int32)
pos_circular: 0.9784607291221619 (float)
pos_cpr_counts: 88.0615234375 (float)
pos_estimate: -0.02153862826526165 (float)
pos_estimate_counts: -1.9384765625 (float)
set_linear_count(obj: object_ref, count: int32)
shadow_count: -2 (int32)
spi_error_rate: 0.0 (float)
vel_estimate: 0.0 (float)
vel_estimate_counts: 0.0 (float)

I tried the solution of adding capacitors 22uf but still getting the error. What is weird is that I always get count_in_cpr: 0 on M0, even if I swap the motors M1 works ok but M0 fails during calibration.

Any suggestion of what can be the problem?

Hi there,

Can you only post the errors? Using dump_errors(odrv0)

Note they should be 22nF capacitors, not 22uF.

That was the problem. I changed them to 22nF and I was able to perform the calibration on both motors. Thanks!

Great!