STC_CalcTorqueReference function
In the __weak int16_t STC_CalcTorqueReference(SpeednTorqCtrl_Handle_t *pHandle) function
The original ST code contains the below line code.
hMeasuredSpeed = SPD_GetAvrgMecSpeedUnit(pHandle->SPD);
hError = hTargetSpeed - hMeasuredSpeed;
hTorqueReference = PI_Controller(pHandle->PISpeed, (int32_t)hError);
I modified the first line of code to
hMeasuredSpeed = -SPD_GetAvrgMecSpeedUnit(pHandle->SPD); i put a negative sign before the function.
This i have done since the error was never going to 0. Is it correct or i need to remove the negative sign? I have start up issues is it because of this?
