cancel
Showing results for 
Search instead for 
Did you mean: 

LSM9DS0 Gyro Reading Issue

johnlowen9
Associate
Posted on December 17, 2015 at 22:37

I have a LSM9DS0 that I am trying to get operational. My I2C is working since I can read the correct values for both WHO_AM_I registers. I can also read back a control register and the data read matches what was written. The Gyro readings are not stable and don't look correct. I am operating in fifo bypass mode. I've disabled two of the axes via the control register and those axes continue to update and move around. I would think that there would not be any updates to a disabled axis. I am oring the function register with a 0x80 for a multibyte read and I believe that the I2C is working. Should the disable axes be moving on me? Are there any configuration items that can cause this kind of behavior?

Thanks,

John

#i2c-lsm9ds0
2 REPLIES 2
richardsanden9168
Associate
Posted on February 04, 2016 at 22:45

I've got a similar problem. The gyro has just constant values. All 3 axes are on but they stay constant. That even happens from time to time with the acceleration output. Usually switching the device on/off resolves it. I've got no idea how to resolve it. I was hoping somebody from ST could help.

richardsanden9168
Associate
Posted on February 04, 2016 at 22:58

This is actually take verbatim from this github code (

) and should work (I've tried many different configs). I actually don't need the interrupts but on the other hand they won't harm either for testing.

       // GYRO                                                                                              

        gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG1_G, 0x0f);

        gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG2_G, 0x30);

        gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG3_G, 0x88);

        gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG4_G, 0x00);

        gyro_txrx(GYROTYPE, LSM9DS0_REGISTER_CTRL_REG5_G, 0x10);

here is some sample data in the format:

-1,timestamp,ax,ay,az,gx,gy,gz,mx,my,mz,,,,

the gyro data is constant:

-1,4484,32834,32615,34048,28004,27718,32769,33482,31668,37950,c0,8875913,8248723

-1,4485,32838,32605,34042,28004,27718,32769,33482,31668,37950,c0,8875712,8277381

-1,4486,32850,32589,34042,28004,27718,32769,33482,31668,37950,c0,8875863,8255033

-1,4487,32850,32608,34049,28004,27718,32769,33536,31661,37900,c0,8875814,8262740

-1,4488,32834,32596,34056,28004,27718,32769,33536,31661,37900,c0,8875751,8272598

-1,4489,32842,32608,34043,28004,27718,32769,33536,31661,37900,c0,8875976,8248838

-1,4490,32826,32613,34050,28004,27718,32769,33536,31661,37900,c0,8875701,8277438

-1,4491,32832,32596,34037,28004,27718,32769,33536,31661,37900,c0,8875850,8254841

-1,4492,32831,32600,34039,28004,27718,32769,33536,31661,37900,c0,8875886,8263068

-1,4493,32831,32611,34046,28004,27718,32769,33536,31661,37900,c0,8875797,8272356