cancel
Showing results for 
Search instead for 
Did you mean: 

Reading data asynchronously from I3G4250D

LPats.1
Associate II

Hi all,

I'm trying to read output data from a I3G4250D gyrometer, but despite everything I've done, I can't get rid of data corruption during asynchronous reads.

The corruption seems to be caused by the registers being updated while we're reading data from low and high data registers. For example: while reading OUT_X_L and OUT_X_H register, when a new data is available, it overwrites the content of OUT_X_H before the read is completed. The pattern of data corruption agrees with that (corruption is more visible when values change from positive to negative, or vice-versa, during a read).

This device doesn't have a "Block data update" configuration like other devices we're using (IIS2DH, LSM6DS33...), but the datasheet specifies how to avoid data corruption while performing asynchronous reads:

0693W00000Kcu2sQAB.pngWe're using FIFO in bypass mode, so we perform the steps 2.a (single read from register 0x28) and 2.b (multi-read starting from 0x2A).

Is there something I'm missing? Is any other configuration needed for the asynchronous read to work properly? Does it work on bypass mode, or only on Stream and FIFO modes?

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @Community member​ ,

the sequence is correct.

Can you try also the same sequence configuring the acquisition in FIFO mode?

-Eleon