AnsweredAssumed Answered

LSM303D data synchronization

Question asked by hendrickson.travis on Jan 13, 2014
Latest reply on Jan 17, 2014 by Thiago.Reis@ST
All the example code I've seen reads the acceleration and magnetic field values by polling the appropriate registers.
For example:
x.l = i2c_read(OUT_X_L_A);
x.h = i2c_read(OUT_X_H_A);
y.l = i2c_read(OUT_Y_L_A);
y.h = i2c_read(OUT_Y_H_A);
z.l = i2c_read(OUT_Z_L_A);
z.h = i2c_read(OUT_Z_H_A);

When does the sensor update the register values? How do I know when to read the registers?
I am concerned that the chip could update the register value between polling the OUT_X_L_A and OUT_X_L_H, resulting in a corrupt reading.

Thanks,
Travis

Outcomes