sparkfun / SparkFun_LSM9DS1_Arduino_Library

Arduino library for the LSM9DS1 9DOF IMU.
Other
64 stars 78 forks source link

FIFO random issue #28

Open u0078867 opened 4 years ago

u0078867 commented 4 years ago

Did anyone experience random infinite loop while calibrating?

while (samples < 0x1F)
{
    samples = (xgReadByte(FIFO_SRC) & 0x3F); // Read number of stored samples
}

When this happens the first time (randomly and seldom), the only solution is to disconnect Vcc...

I think it is safe to put a timeout condition to exit the loop.

What do you think?