It is possible that the issue you are experiencing with your SPM motor could be caused by a problem with the encoder. Some potential issues with the encoder that could cause the motor to block in the q axis include:
Incorrect encoder wiring: Make sure that the encoder is wired correctly and that all connections are secure.
Incorrect encoder resolution: The encoder resolution should match the control system resolution. If the encoder resolution is too low, it may not provide enough feedback to the control system, causing the motor to block in the q axis.
Incorrect encoder direction: Make sure that the encoder direction is set correctly in the control system. If the encoder direction is set incorrectly, the control system may not be able to accurately track the rotor position, causing the motor to block in the q axis.
Encoder damage: If the encoder has been damaged, it may not be providing accurate feedback to the control system, causing the motor to block in the q axis.
If none of these issues seems to be the cause of the problem, you may want to try running the motor without the encoder to see if the issue persists. This will help you determine if the issue is with the encoder or with the control system.