Hi Ragu,
Sorry for the delayed reply. The FOC is made to calibrate the offset, which requires the still sensor to read the sensor offset and calibrate it. When performing gyro FOC test, the sensor should be stationary, not shaken. The code has misunderstanding.
... View more