English
Language : 

LSM303C Datasheet, PDF (19/53 Pages) –
LSM303C
Functionality
4.2.2
4.2.3
FIFO mode
In FIFO mode (FIFO_CTRL (FMODE [2:0]) = 001) data from the X, Y and Z channels are
stored in the FIFO until it is full. An overrun interrupt can be enabled, CTRL_REG3_A
(INT_XL_OVR) = '1', in order to be raised when the FIFO stops collecting data. When the
overrun interrupt occurs, the first set of data has been overwritten and the FIFO stops
collecting data from the input channels. To reset the FIFO content, Bypass mode should be
written in FIFO_CTRL (FMODE [2:0]) as '000'. After this reset command it is possible to
restart FIFO mode by writing '001' to FIFO_CTRL (FMODE [2:0]).
The FIFO buffer can memorize 32 levels of X, Y and Z data, but the depth of the FIFO can
be reduced by means of the CTRL_REG3_A (STOP_ FTH) bit. Setting the STOP_FTH bit
to '1', the FIFO depth is limited to FIFO_CTRL (FTH [4:0]) - 1.
Stream mode
Stream mode (FIFO_CTRL (FMODE [2:0]) = 010) provides a continuous FIFO update. As
new data arrives the older data is discarded.
An overrun interrupt can be enabled, CTRL_REG3_A (INT_XL_OVR) = '1', in order to read
the entire content of the FIFO at once. If in the application no data can be lost and it is not
possible to read at least one sample for each axis within one ODR period, a watermark
interrupt can be enabled in order to read partially the FIFO and leave free memory slots for
incoming data. Setting the FIFO_CTRL (FTH [4:0]) to an N value, the number of X, Y and Z
data samples that should be read at the rise of the watermark interrupt is up to (N+1).
In the latter case, reading all FIFO content before an overrun interrupt has occurred, the first
data read is equal to the last data already read in the previous burst, so the number of new
data available in FIFO depends on the previous reading (see FIFO_SRC behavior depicted
in the following figure).
Figure 6. Stream mode
Stream mode is intended to be used to read all 32 samples of FIFO within an ODR after
receiving an overrun signal.
DocID024975 Rev 2
19/53
53