Motor not turning after closed loop state


I have a 3.6v board and have successfully calibrated the motor and encoder. I have checked the errors before and after the closed loop state and no errors appear. But when I turn on the closed loop state the motor shakes as if trying to find the correct position and it doesn’t accept any command to rotate to a certain position. What are some possible solutions to this problem?