English
Language : 

LSM303C Datasheet, PDF (18/53 Pages) –
Functionality
4
Functionality
LSM303C
4.1
Self-test
The self-test allows checking the linear acceleration functionality without moving it. The self-
test function is off when the self-test bits (ST) are programmed to ‘00’. When the self-test
bits are changed, an actuation force is applied to the sensor, simulating a definite input
acceleration. In this case the sensor outputs will exhibit a change in their DC levels which
are related to the selected full scale through the device sensitivity. When the self-test is
activated, the device output level is given by the algebraic sum of the signals produced by
the acceleration acting on the sensor and by the electrostatic test force. If the output signals
change within the amplitude limits specified inside Table 3, then the sensor is working
properly and the parameters of the interface chip are within the defined specifications.
The self-test function is also available for the magnetic sensor. When the magnetic self-test
is enabled, a current is forced into a coil near the sensor. This current will generate a
magnetic field that will produce a variation of the magnetometer output signals. If the output
signals change within the amplitude limits specified in Table 3, then the sensor is working
properly and the parameters of the interface chip are within the defined specifications.
4.2
4.2.1
FIFO
The LSM303C embeds an acceleration data FIFO for each of the three output channels, X,
Y and Z. This allows consistent power saving for the system, since the host processor does
not need to continuously poll data from the sensor, but it can wake up only when needed
and burst the significant data out from the FIFO. This buffer can work accordingly to the
following different modes: Bypass mode, FIFO mode, Stream mode, Stream-to-FIFO mode,
Bypass-to-Stream, Bypass-to-FIFO. Each mode is selected by the FIFO_MODE bits in the
FIFO_CTRL register. Programmable FIFO threshold level, FIFO empty or FIFO overrun
events are in the FIFO_SRC register and can be set to generate a dedicated interrupt on the
INT_XL pin.
FIFO_SRC (EMPTY) is equal to '1' when no samples are available.
FIFO_SRC (FTH) goes to '1' if new data arrives and FIFO_SRC(FSS [4:0]) is greater than or
equal to FIFO_CTRL (FTH [4:0]). FIFO_SRC (FTH) goes to '0' if reading a X, Y, Z data slot
from FIFO and FIFO_SRC (FSS [4:0]) is less than or equal to FIFO_CTRL (FTH [4:0]).
FIFO_SRC (OVR) is equal to '1' if a FIFO slot is overwritten.
The FIFO feature is enabled by writing a '1' to the FIFO_EN bit in CTRL_REG3_A.
To guarantee the correct acquisition of data during the switching into and out of FIFO, the
first sample acquired must be discarded.
Bypass mode
In Bypass mode (FIFO_CTRL (FMODE [2:0])= 000), the FIFO is not operational and it
remains empty.
Bypass mode is also used to reset the FIFO when in FIFO mode.
18/53
DocID024975 Rev 2