Torque Control using the FOC current

Excuse me friends,
I want to ask about the problem I’m facing in making a controller with the simpleFOC program At the moment I am trying to run a 650w bldc motor, I am trying the torque control program code without using sensor current it can run smoothly.

But when I add the current sensor the motor doesn’t move normally, the sound of the motor is rough and the serial command can only reach T1 if it reaches T2 the motor is getting unstable.

Do I have to set the PID setting myself when using the foc current torque control? and if so, please provide instructions on how to set the PID.

Here I am using the STM32 Nucleo F401RE and using the ACS 758 LCB 050B Current sensor.

Please help friends to solve the bug using the Current sensor so that the motor rotation can be smooth and smooth, Thank you