Can't run "control close Loop" mode in startup

I’m using the RC5.0 branch and SPI encoder AS5047.
I configured all my parameters and can enable Odrive to AXIS_STATE_CLOSED_LOOP_CONTROL mode.
But when I changed the config : startup_closed_loop_control = True and reboot.
My driver always notified the error (Overspeed)
I only delete errors and enable closed-loop control manual and it works again.
Can you help me check it?

The AS5047 has higher resolution than most encoders so your speed limit (in counts per second) needs to be much higher.
Increase controller.config.vel_limit and see if it works.

I increased vel_limit from 400000 to 600000 and, however it’s still error.
This error only happens when The Odrive reboot.
When I enable STATE_CLOSED_LOOP_CONTROL mode by manual then it works well
Sorry, I’m learning English.

I’m not sure we ever fixed this problem. The axis starts, and shadow_count = 0. Then you get your first encoder value and it’s . dP/dT is high, and therefore estimated velocity is high for the very first sample of the encoder, and it faults out. The fix is to wait to calculate the velocity until after the first sample is received, but that hasn’t been implemented.

Yes, That can be this error. do you help me fix it? i haven’t been able to change setting to close mode. I’m using a Marlin Firmware to control my Odrive by step/dir mode.

I have changed, I am not sure about this, Can you review it? thanks
My file changed :

  • Add Variable to class encoder bool mWorkFirstTime_ = true;

  • Set variable to false in encode::update

    if (std::abs(vel_estimate_) < 0.5f * current_meas_period * pll_ki_) {
        vel_estimate_ = 0.0f;  //align delta-sigma on zero to prevent jitter
        if (mWorkFirstTime_) mWorkFirstTime_ = false;
        snap_to_zero_vel = true;

and change controller.cpp

if (!axis_->encoder_.mWorkFirstTime_){                
       return false;