English
Language : 

LSM330 Datasheet, PDF (22/75 Pages) STMicroelectronics – Power-down and sleep modes
Functionality
LSM330
4.2.3
4.2.4
4.2.5
Bypass mode
In Bypass mode, the FIFO is not operational and it remains empty. For each channel only
the first address is used. The remaining FIFO slots are empty.
Bypass mode must be used in order to reset the FIFO buffer when a different mode is
operating (i.e. FIFO mode).
FIFO mode
In FIFO mode, the buffer continues filling data from the X, Y and Z accelerometer channels
until it is full (set of 32 samples stored). When the FIFO is full it stops collecting data from
the input channels and the FIFO content remains unchanged.
An overrun interrupt can be enabled, P1_OVERRUN = '1' in the CTRL_REG7_A (25h)
register, in order to be raised when the FIFO stops collecting data. When overrun interrupt
occurs, the first data has been overwritten and the FIFO stops collecting data from the input
channels.
At the end of the reads it is necessary to transition from Bypass mode to reset FIFO content.
After this reset command it is possible to restart FIFO mode by writing '001' to FMODE [2:0]
in the FIFO_CTRL_REG_A (2Eh) register.
The FIFO buffer can memorize 32 levels of X, Y and Z data, but the depth of the FIFO can
be reduced by a programmable watermark. In order to enable a FIFO watermark, the
WTM_EN bit in CTRL_REG7_A (25h) is high and the FIFO depth is set by the WTMP [4:0]
bits in the FIFO_CTRL_REG_A (2Eh) register. The watermark interrupt can be enabled on
the INT1_A pad if the P1_WTM bit in the CTRL_REG7_A (25h) register is enabled.
Stream mode
In Stream mode FIFO continues filling data from the X, Y, and Z accelerometer channels.
When the buffer is full (set of 32 samples stored) the FIFO buffer index restarts from the
beginning and older data is replaced by the current. The oldest values continue to be
overwritten until a read operation makes free FIFO slots available.
An overrun interrupt can be enabled, P1_OVERRUN = '1' in the CTRL_REG7_A (25h)
register, in order to read the entire FIFO content at once. If in the application it is mandatory
not to lose data 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 WTMP [4:0] bit in the FIFO_CTRL_REG_A (2Eh) register to value N, 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 already read in the previous burst, so the number of new data
available in FIFO depends on the previous reading (see FIFO_SRC_REG_A (2Fh)).
At the end of the reads it is necessary to transition from Bypass mode to reset FIFO content.
22/75
DocID023426 Rev 3