Calibration fails with gimbal motor

Hi!
I want to drive a T-Motor GB54-2 using an ODrive Micro.
Specs of this motor:
12N14P, 26KV, 15 Ohm internal resistance.
So I set pole pairs to 7 and KV=26 in the web GUI. I can see that the onboard encoder is working correctly. Then I disconnect USB and connect power(12V-20V) and CAN and run the can_calibrate.py script.(I do this because I do not have a USB insulator)
Then the motor makes some noise and moves a bit. Then the LED flashes red.
The script displays these errors when I play with the calibration voltage and current values:
PHASE_RESISTANCE_OUT_OF_RANGE, PHASE_INDUCTANCE_OUT_OF_RANGE
The ODrive error description tells me that:

config.motor.resistance_calib_max_voltage > calibration_current * phase_resistance
So e.g. 6 > 0.3 * 15 when I power it with 12 V should be alright?

Is there any general problem with this motor or what am I doing wrong?
Any help appreciated!

Hi! Can you try upgrading your Micro to the devel firmware? That increased the limit for acceptable phase inductance on the Micro – I’m guessing this motor is very high inductance. Then 6V calib voltage / 0.3A calib current should be fine.

Thanks! I upgraded to the latest devel firmware and calibration worked after 5 retries!

When it fails I get this error:

uv run python can_calibrate.py --channel can0 --node-id 0 --save-config
opening CAN bus...
waiting for calibration to finish...
Traceback (most recent call last):
  File "/home/cody/Documents/ODriveResources/examples/can_calibrate.py", line 48, in <module>
    asyncio.run(main())
    ~~~~~~~~~~~^^^^^^^^
  File "/usr/lib/python3.13/asyncio/runners.py", line 195, in run
    return runner.run(main)
           ~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
  File "/usr/lib/python3.13/asyncio/base_events.py", line 725, in run_until_complete
    return future.result()
           ~~~~~~~~~~~~~^^
  File "/home/cody/Documents/ODriveResources/examples/can_calibrate.py", line 34, in main
    raise Exception(f"Calibration resulted in {error=}, {procedure_result=}. See here for error codes:\n"
    ...<2 lines>...
    )
Exception: Calibration resulted in error=2048, procedure_result=3. See here for error codes:
- https://docs.odriverobotics.com/v/latest/fibre_types/com_odriverobotics_ODrive.html#ODrive.Error
- https://docs.odriverobotics.com/v/latest/fibre_types/com_odriverobotics_ODrive.html#ODrive.ProcedureResult

Ok, the calibration worked but the motor does not properly turn using the can_simple.py example.
Is this motor kind of special because of its very low KV? I selected it because I need high torque and very low RPM without gears.

The configuration I used:

odrv = odrv0
odrv.config.dc_bus_overvoltage_trip_level = 26
odrv.config.dc_bus_undervoltage_trip_level = 10
odrv.config.dc_max_positive_current = 5
odrv.config.dc_max_negative_current = -0.1
odrv.axis0.config.motor.motor_type = MotorType.PMSM_CURRENT_CONTROL
odrv.axis0.config.motor.pole_pairs = 7
odrv.axis0.config.motor.torque_constant = 0.31807692307692303
odrv.axis0.config.motor.current_soft_max = 3
odrv.axis0.config.motor.current_hard_max = 4.4
odrv.axis0.config.motor.calibration_current = 0.3
odrv.axis0.config.motor.resistance_calib_max_voltage = 6
odrv.axis0.config.calibration_lockin.current = 0.5
odrv.axis0.motor.motor_thermistor.config.enabled = False
odrv.axis0.controller.config.control_mode = ControlMode.VELOCITY_CONTROL
odrv.axis0.controller.config.input_mode = InputMode.VEL_RAMP
odrv.axis0.controller.config.vel_limit = 10
odrv.axis0.controller.config.vel_limit_tolerance = 1.2
odrv.axis0.config.torque_soft_min = -math.inf
odrv.axis0.config.torque_soft_max = math.inf
odrv.axis0.trap_traj.config.accel_limit = 10
odrv.axis0.controller.config.vel_ramp_rate = 10
odrv.can.config.protocol = Protocol.SIMPLE
odrv.can.config.baud_rate = 250000
odrv.axis0.config.can.node_id = 0
odrv.axis0.config.can.heartbeat_msg_rate_ms = 100
odrv.axis0.config.can.encoder_msg_rate_ms = 100
odrv.axis0.config.can.iq_msg_rate_ms = 100
odrv.axis0.config.can.torques_msg_rate_ms = 100
odrv.axis0.config.can.error_msg_rate_ms = 100
odrv.axis0.config.can.temperature_msg_rate_ms = 100
odrv.axis0.config.can.bus_voltage_msg_rate_ms = 100
odrv.axis0.config.enable_watchdog = False
odrv.axis0.config.load_encoder = EncoderId.ONBOARD_ENCODER0
odrv.axis0.config.commutation_encoder = EncoderId.ONBOARD_ENCODER0