Problem with closed loop control, velocity mode with BLDC motor and hall sensors

Hi everyone,
I am new to ODrive and am using V3.6 to control a oriental BLDC motor with hall sensors. I have completed all the required settings following the document.
Initially I was getting Illegal_HALL_State error everytime during calibration but then after adding pull-up resistance and caps for noise filter the HALL_Polarity_calibration is getting completed.
But, I reckon there is a problem with closed loop control/velocity mode which I am unable to figure out yet.
As soon as I switch to AXIS_STATE_CLOSED_LOOP_CONTROL the motor starts spinning as per the inpul velocity but when I hold on to its rotor, it doesn’t give much torque and stops while giving no error and starts spinning again when I set it free, while as per my understanding in closed loop control motor should try to maintain the speed and give overcurrent error if that happens. This behaviour looks like open loop to me.
How can I check that it is in closed loop mode and/or what can I do so that the motor produces torque and follows speed.

You will need to check several values in the controller.config structure:

  • pos_gain
  • vel_gain
  • vel_integrator_gain
  • torque_limit

And also axis.motor.config.current_lim

Make sure the integrator gain is not 0 :slight_smile:

https://docs.odriverobotics.com/v/0.5.5/control.html