Trouble with initial configuration

Hi everyone, I’m having trouble getting my Odrive to work, following instructions as below:
https://docs.odriverobotics.com/
https://docs.odriverobotics.com/encoders

I’m using an Odrive 3.4 48V, a T Motor 5212 and an AS5047D encoder with ABI interface.
I follow the “Getting Started” instructions to the step “save configuration and reboot” then I turn to the instructions on setting up encoder, where I get the problem. After I run

odrv0.axis1.requested_state = AXIS_STATE_ENCODER_OFFSET_CALIBRATION 

check errors by

dump_errors(odrv0)

I get axis error ERROR_INVALID_STATE on axis1.

here is my config info:

Encoder config:

mode = 0 (int)
use_index = False (bool)
find_idx_on_lockin_only = False (bool)
pre_calibrated = False (bool)
zero_count_on_find_idx = True (bool)
cpr = 2000 (int)
offset = 0 (int)
offset_float = 0.0 (float)
enable_phase_interpolation = True (bool)
bandwidth = 1000.0 (float)
calib_range = 0.019999999552965164 (float)
calib_scan_distance = 50.26548385620117 (float)
calib_scan_omega = 12.566370964050293 (float)
idx_search_unidirectional = False (bool)
ignore_illegal_hall_state = False (bool)

Motor Config:

pre_calibrated = False (bool)
pole_pairs = 11 (int)
calibration_current = 10.0 (float)
resistance_calib_max_voltage = 2.0 (float)
phase_inductance = 0.0 (float)
phase_resistance = 0.0 (float)
direction = 0 (int)
motor_type = 2 (int)
current_lim = 10.0 (float)
current_lim_tolerance = 1.25 (float)
inverter_temp_limit_lower = 100.0 (float)
inverter_temp_limit_upper = 120.0 (float)
requested_current_range = 60.0 (float)
current_control_bandwidth = 1000.0 (float)

I can get the encoder readings by shadow_count. I am not sure I provided enough information, please ask me if more is needed, thank you.

That means you’re doing something out of order. Have you calibrated the motor already? AXIS_STATE_MOTOR_CALIBRATION I think