An5038 Lis2dw12 Alwayson 3axis Accelerometer Stmicroelectronics
An5038 Lis2dw12 Alwayson 3axis Accelerometer Stmicroelectronics
Application note
Introduction
This document provides usage information and application hints related to ST’s LIS2DW12 motion sensor.
The LIS2DW12 is a 3-axis digital accelerometer system-in-package with a digital I²C/SPI serial interface standard output,
performing at 90 µA in high-resolution mode and below 1 µA in low-power mode. Thanks to the ultralow noise performance of
the accelerometer, the device combines always-on low-power features with superior sensing precision for an optimal motion
experience for the consumer. Furthermore, the accelerometer features smart sleep-to-wakeup (activity) and return-to-sleep
(inactivity) functions that allow advanced power saving.
The device has a dynamic user-selectable full-scale acceleration range of ±2/±4/±8/±16 g and is capable of measuring
accelerations with output data rates from 1.6 Hz to 1600 Hz. The LIS2DW12 can be configured to generate interrupt signals by
using hardware recognition of free-fall events, 6D orientation, tap and double-tap sensing, activity or inactivity, and wake-up
events.
The LIS2DW12 has an integrated 32-level first-in, first-out (FIFO) buffer allowing the user to store data in order to limit
intervention by the host processor.
The LIS2DW12 is available in a small thin plastic, land grid array (LGA) package and it is guaranteed to operate over an
extended temperature range from -40°C to +85°C.
The ultrasmall size and weight of the SMD package make it an ideal choice for handheld portable applications such as
smartphones, IoT connected devices, and wearables or any other application where reduced package size and weight are
required.
1 Pin description
SPI enable
I²C/SPI mode selection
2 CS Default: input with internal pull-up(1)
1: SPI idle mode / I²C communication enabled
0: SPI communication mode / I²C disabled
6 GND 0 V supply
8 GND 0 V supply
Interrupt pin 2
11 INT2 Default: push-pull output forced to ground
Clock input when selected in single data conversion on demand.
1. In order to disable the internal pull-up on the CS pin, write the CS_PU_DISC bit to 1 in CTRL2 (21h).
2. Internal pull-up on SDO/SA0 pin cannot be disabled: do not connect this pin to GND in low-power applications.
Table 2. Registers
Register name Address Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
OUT_T_H(1) 0Eh TEMP11 TEMP10 TEMP9 TEMP8 TEMP7 TEMP6 TEMP5 TEMP4
WHO_AM_I(1) 0Fh 0 1 0 0 0 1 0 0
CTRL1 20h ODR3 ODR2 ODR1 ODR0 MODE1 MODE0 LP_MODE1 LP_MODE0
SLP_MODE
CTRL3 22h ST2 ST1 PP_OD LIR H_LACTIVE 0 SLP_MODE_1
_SEL
INT1_
CTRL4_INT1_PAD_CTRL 23h INT1_6D INT1_WU INT1_FF INT1_TAP INT1_DIFF5 INT1_FTH INT1_DRDY
SINGLE_TAP
OUT_T(1) 26h TEMP7 TEMP6 TEMP5 TEMP4 TEMP3 TEMP2 TEMP1 TEMP0
STATUS(1) 27h FIFO_THS WU_IA SLEEP_STATE DOUBLE_TAP SINGLE_TAP 6D_IA FF_IA DRDY
OUT_X_H(1) 29h X_H7 X_H6 X_H5 X_H4 X_H3 X_H2 X_H1 X_H0
OUT_Y_H(1) 2Bh Y_H7 Y_H6 Y_H5 Y_H4 Y_H3 Y_H2 Y_H1 Y_H0
OUT_Z_H(1) 2Dh Z_H7 Z_H6 Z_H5 Z_H4 Z_H3 Z_H2 Z_H1 Z_H0
FIFO_CTRL 2Eh FMode2 FMode1 FMode0 FTH4 FTH3 FTH2 FTH1 FTH0
FIFO_SAMPLES(1) 2Fh FIFO_FTH FIFO_OVR Diff5 Diff4 Diff3 Diff2 Diff1 Diff0
TAP_THS_X 30h 4D_EN 6D_THS1 6D_THS0 TAP_THSX_4 TAP_THSX_3 TAP_THSX_2 TAP_THSX_1 TAP_THSX_0
TAP_THS_Y 31h TAP_PRIOR_2 TAP_PRIOR_1 TAP_PRIOR_0 TAP_THSY_4 TAP_THSY_3 TAP_THSY_2 TAP_THSY_1 TAP_THSY_0
TAP_THS_Z 32h TAP_X_EN TAP_Y_EN TAP_Z_EN TAP_THSZ_4 TAP_THSZ_3 TAP_THSZ_2 TAP_THSZ_1 TAP_THSZ_0
INT_DUR 33h LATENCY3 LATENCY2 LATENCY1 LATENCY0 QUIET1 QUIET0 SHOCK1 SHOCK0
SINGLE_
WAKE_UP_THS 34h SLEEP_ON WK_THS5 WK_THS4 WK_THS3 WK_THS 2 WK_THS 1 WK_THS 0
DOUBLE_TAP
AN5038
Registers
WAKE_UP_DUR 35h FF_DUR5 WAKE_DUR1 WAKE_DUR0 STATIONARY SLEEP_DUR3 SLEEP_DUR2 SLEEP_DUR1 SLEEP_DUR0
page 3/52
FREE_FALL 36h FF_DUR4 FF_DUR3 FF_DUR2 FF_DUR1 FF_DUR0 FF_THS2 FF_THS1 FF_THS0
AN5038 - Rev 6
Register name Address Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
STATUS_DUP(1) 37h OVR DRDY_T SLEEP_STATE_IA DOUBLE_TAP SINGLE_TAP 6D_IA FF_IA DRDY
SLEEP_
ALL_INT_SRC(1) 3Bh 0 0 6D_IA DOUBLE_TAP SINGLE_TAP WU_IA FF_IA
CHANGE_IA
X_OFS_USR 3Ch X_OFS_USR_7 X_OFS_USR_6 X_OFS_USR_5 X_OFS_USR_4 X_OFS_USR_3 X_OFS_USR_2 X_OFS_USR_1 X_OFS_USR_0
Y_OFS_USR 3Dh Y_OFS_USR_7 Y_OFS_USR_6 Y_OFS_USR_5 Y_OFS_USR_4 Y_OFS_USR_3 Y_OFS_USR_2 Y_OFS_USR_1 Y_OFS_USR_0
Z_OFS_USR 3Eh Z_OFS_USR_7 Z_OFS_USR_6 Z_OFS_USR_5 Z_OFS_USR_4 Z_OFS_USR_3 Z_OFS_USR_2 Z_OFS_USR_1 Z_OFS_USR_0
1. Read-only register
2. If low-power mode 1 is enabled, this bit is set to 0.
AN5038
Registers
page 4/52
AN5038
Operating modes
3 Operating modes
The device offers a wide VDD voltage range from 1.62 V to 3.6 V and a VDDIO range from 1.62 V to VDD + 0.1 V.
In order to avoid potential conflicts, during the power-on sequence it is recommended to set the lines (on the host
side) connected to the device IO pins floating or connected to ground, until VDDIO is set. After VDDIO is set, the
lines connected to the IO pins have to be configured according to their default status described in Table 1. In
order to avoid an unexpected increase in current consumption, the input pins that are not pulled-up/pulled-down
must be polarized by the host.
When the VDD power supply is applied, the device performs a 20 ms (maximum) boot procedure to load the
trimming parameters. After the boot is completed, both the accelerometer and the gyroscope are automatically
configured in power-down mode. To guarantee proper power-off of the device, VDD needs to be lower than
100 mV for at least 10 ms.
Note: VDD cannot be lower than VDDIO. VDD = 0 V and VDDIO "on" is allowed: when this power supply configuration
is applied, an internal pull-up is applied also to the SDA and SCL pins (the other pins maintain the default status
indicated in Table 1).
High-performance mode Low-power mode 4 Low-power mode 3 Low-power mode 2 Low-power mode 1
These operating modes are selected by writing the MODE[1:0] and LP_MODE[1:0] bits in CTRL1 (20h) shown in
the table below.
b7 b6 b5 b4 b3 b2 b1 b0
From each of these five sets, two configurations have been designed:
• Very low power (low noise off)
• Low noise
Writing the LOW_NOISE bit in CTRL6 (25h) selects the desired configuration. The LOW_NOISE bit in CTRL6
(25h) impacts front-end noise and current consumption. Bandwidths and settling time are not impacted.
Table 7 shows the typical values of power consumption for the different operating modes.
0 1 0 1 0 1 0 1 0 1
Table 8 and Table 9 show the typical noise values for the different operating modes.
LOW_NOISE
Full scale
0 1
±2 g 110 90
±4 g 110 100
±8 g 130 120
±16 g 170 160
Note: In high-performance mode, the noise density is the same for all ODRs.
Full scale 0 1 0 1 0 1 0 1
Note: In low-power mode, the RMS noise is the same for all ODRs.
0000 Power-down
0001 High-performance 12.5 Hz / low-power mode 1.6 Hz
0010 12.5 Hz (independent of power mode)
0011 25 Hz (independent of power mode)
0100 50 Hz (independent of power mode)
0101 100 Hz (independent of power mode)
0110 200 Hz (independent of power mode)
0111 High-performance 400 Hz / low-power mode 200 Hz
1000 High-performance 800 Hz / low-power mode 200 Hz
1001 High-performance 1600 Hz / low-power mode 200 Hz
The maximum data rate using single data conversion mode is 200 Hz and the time of conversion depends on the
low-power mode selected (refer to the following table).
Mode 1 1.20 ms
Mode 2 1.70 ms
Mode 3 2.30 ms
Mode 4 3.55 ms
Note: If the ODR[3:0] bits of the CTRL1 register are set to 0000, the accelerometer is permanently configured in
power-down mode and no conversion can be triggered. When the single data conversion mode has to be used,
the ODR[3:0] bits of the CTRL1 register must be different than 0000.
Interrupts, embedded features, and FIFO are still supported when using single data conversion mode. Also the
embedded filters LPF1, LPF2, and HP are available in single data conversion (on-demand mode) with the same
bandwidth and settling time of the selected low-power mode (see Section 3.4 Accelerometer bandwidth for
details).
As shown in the figure above, data can be generated using three different filter paths:
• Only LPF1 (green path): in order to select this path set BW_FILT[1:0] = 00 and FDS = 0. Additional details
in Table 12. Low-pass filter 1 bandwidth.
• LPF1 + LPF2 (purple path): in order to select this path set BW_FILT[1:0] to a value different from 00 and
FDS = 0. Additional details in Table 13. Bandwidth: low-pass path.
• LPF1 + HP (blue path): these outputs are available by setting FDS = 1. Additional details in
Table 14. Bandwidth: high-pass path.
BW_FILT[1:0] = 00
Mode ODR selection Samples to discard(1)
Cutoff [Hz]
Settling @95%
1. The starting condition of ODR[3:0], MODE[1:0], LP_MODE[1:0], and BW_FILT[1:0] do not impact these values. The turn-on
time (first sample available starting from power-down condition) is 1 / ODR.
1. The starting condition of ODR[3:0], MODE[1:0], LP_MODE[1:0] and BW_FILT[1:0] do not impact these values.
1. The starting condition of ODR[3:0], MODE[1:0], LP_MODE[1:0] and BW_FILT[1:0] do not impact these values.
Setting USR_OFF_ON_OUT = 1 in CTRL7 does not change the bandwidth of the system. In this configuration,
the values written in registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR are subtracted from the respective axis.
The offset values are signed values (two's complement).
The weight of the bits in registers X_OFS_USR, Y_OFS_USR, Z_OFS_USR is defined through the USR_OFF_W
bit in CTRL7.
Sensitivity [mg/LSB]
Full scale
12-bit format(1) 14-bit format
±2 g 0.976 0.244
±4 g 1.952 0.488
±8 g 3.904 0.976
±16 g 7.808 1.952
OUT_X_H: FDh
OUT_Y_L: 78h
OUT_Y_H: 00h
OUT_Z_L: FCh
OUT_Z_H: 42h
Do register concatenation:
OUT_X_H & OUT_X_L: FD60h
Apply sensitivity (for example, 14-bit resolution, 0.244 at full scale ±2 g):
X: -672 / 4 * 0.244 = -41 mg
Y: +120 / 4 * 0.244 = +7 mg
In order to generate an interrupt, the LIS2DW12 device has to be set in an active operating mode (not in power-
down) because generation of the interrupt is based on accelerometer data.
The interrupt generator can be configured to detect:
• Free-fall
• Wake-up
• 6D/4D orientation detection
• Single-tap and double-tap sensing
• Activity/inactivity detection
All these interrupt signals, together with the FIFO interrupt signals and sensor data-ready, can be driven to the
INT1 and/or INT2 interrupt pins or checked by reading the dedicated source register bits.
The H_LACTIVE bit of the CTRL3 register must be used to select the polarity of the interrupt pins. If this bit is set
to 0 (default value), the interrupt pins are active high and they change from low to high level when the related
interrupt condition is verified. Otherwise, if the H_LACTIVE bit is set to 1 (active low), the interrupt pins are
normally at high level and they change from high to low when the interrupt condition is reached.
The PP_OD bit of CTRL3 allows changing the behavior of the interrupt pins also when the DRDY signal is routed
to them from push-pull to open drain. If the PP_OD bit is set to 0, the interrupt pins are in push-pull configuration
(low-impedance output for both high and low level). When the PP_OD bit is set to 1, only the interrupt active state
is a low-impedance output.
The LIR bit of CTRL3 allows applying latched mode to the interrupt signals (not affecting the DRDY signal). When
the LIR bit is set to 1, once the interrupt pin is asserted, it must be reset by reading the related interrupt source
register. If the LIR bit is set to 0, the interrupt signal is automatically reset when the interrupt condition is no longer
verified or after a certain amount of time in function of the type of interrupt.
Note: If latched mode is enabled (LIR = 1), it is not recommended to continuously poll ALL_INT_SRC or the dedicated
source registers because by reading them the embedded functions are internally reset; a synchronous (with
interrupt event) read of the source registers is recommended in this case.
The description of the interrupt control registers appears below; the default value of their bits is equal to 0, which
corresponds to "disable". In order to enable routing a specific interrupt signal to the pin, the corresponding bit has
to be set to 1.
b7 b6 b5 b4 b3 b2 b1 b0
INT1_
INT1_6D INT1_WU INT1_FF INT1_TAP INT1_DIFF5 INT1_FTH INT1_DRDY
SINGLE_TAP
b7 b6 b5 b4 b3 b2 b1 b0
INT2_ INT2_
INT2_BOOT INT2_DRDY_T INT2_ OVR INT2_DIFF5 INT2_FTH INT2_DRDY
SLEEP_STATE SLEEP_CHG
The free-fall event signal can be routed to the INT1 pin by setting the INT1_FF bit of the
CTRL4_INT1_PAD_CTRL register to 1; it can also be checked by reading the FF_IA bit of the STATUS register.
If latched mode is disabled (LIR bit of CTRL3 is set to 0), the interrupt signal is automatically reset when the free-
fall condition is no longer verified. If latched mode is enabled and the free-fall interrupt signal is driven to the
interrupt pins, once a free-fall event has occurred and the interrupt pin is asserted, it must be reset by reading the
WAKE_UP_SRC or ALL_INT_SRC register. If latched mode is enabled, but the interrupt signal is not driven to the
interrupt pins, the latch feature does not take effect (the FF_IA bit in STATUS is reset when the free-fall condition
is no longer verified).
The free-fall detection parameters can be modified by configuring the FREE_FALL (contains bits FF_THS[2:0]
and FF_DUR[4:0]) and WAKE_UP_DUR (contains MSB of duration parameter - FF_DUR5) registers. The
threshold value can be set through the FF_THS[2:0] bits and is described in Table 18. Free-fall threshold value.
The values given in this table are valid for any accelerometer full-scale configuration.
000 ~156 mg
001 ~219 mg
010 ~250 mg
011 ~312 mg
100 ~344 mg
101 ~406 mg
110 ~469 mg
111 ~500 mg
Duration time is measured in N/ODR, where N is the content of the FF_DUR[5:0] field of the FREE_FALL /
WAKE_UP_DUR registers and ODR is the accelerometer data rate.
The sample code exploits a threshold set to ~312 mg for free-fall recognition and the event is notified by hardware
through the INT1 pin. The FF_DUR[5:0] field of the FREE_FALL / WAKE_UP_DUR registers is configured to
ignore events that are shorter than 6/ODR = 6/200 Hz = 30 ms in order to avoid false detections.
WK Duration
HIGH-PASS FILTER OUTPUTS
+ WK Threshold
- WK Threshold
WK Interrupt
The example code that implements the software routine for wake-up event recognition using the HP filter is given
below.
Since the duration time is set to zero, the wake-up interrupt signal is generated for each X,Y,Z data from HP filter
exceeding the configured threshold. The WU_THS field of the WAKE_UP_THS register is set to 000010,
therefore the wake-up threshold is 62.5 mg (= 2 * FS / 64).
The example code that implements the software routine for the wake-up event using USER OFFSET recognition
is given below.
Since the duration time is set to zero, the wake-up interrupt signal is generated for each X,Y,Z data from the
difference between the data measured and the X_OFS_USR, Y_OFS_USR, Z_OFS_USR registers exceeding
the configured threshold. The WU_THS field of the WAKE_UP_THS register is set to 000010, therefore the wake-
up threshold is 62.5 mg (= 2 * FS / 64).
b7 b6 b5 b4 b3 b2 b1 b0
0 6D_IA ZH ZL YH YL XH XL
• 6D_IA is set high when the device switches from one orientation to another.
• ZH (YH, XH) is set high when the face perpendicular to the Z (Y,X) axis is almost flat and the acceleration
measured on the Z (Y,X) axis is positive and in the absolute value bigger than the threshold.
• ZL (YL, XL) is set high when the face perpendicular to the Z (Y,X) axis is almost flat and the acceleration
measured on the Z (Y,X) axis is negative and in the absolute value bigger than the threshold.
The 6D_THS[1:0] bits of the TAP_THS_X register are used to select the threshold value used to detect the
change in device orientation. The threshold values given in Table 20. Threshold for 4D/6D function are valid for
each accelerometer full-scale value.
00 80
01 70
10 60
11 50
This interrupt signal can be driven to the INT1 interrupt pin by setting the INT1_6D bit of the
CTRL4_INT1_PAD_CTRL register to 1; it can also be checked by reading the 6D_IA bit of the SIXD_SRC
register.
If latched mode is disabled (LIR bit of CTRL3 is set to 0), the interrupt signal is active only for 1/ODR[s] then it is
automatically deasserted (ODR is the accelerometer output data rate). If latched mode is enabled and the 6D
interrupt signal is driven to the interrupt pins, once an orientation change has occurred and the interrupt pin is
asserted, a read of the SIXD_SRC or ALL_INT_SRC register clears the request and the device is ready to
recognize a different orientation. The XL, XH, YL, YH, ZL, ZH bits are not affected by the LIR configuration: they
correspond to the current state of the device when the D6D_SRC register is read. If latched mode is enabled but
the interrupt signal is not driven to the interrupt pins, the latch feature does not take effect.
Referring to the six possible cases illustrated in Figure 10. 6D recognized orientations, the content of the
SIXD_SRC register for each position is shown in Table 21. SIXD_SRC register for 6D positions.
Case 6D_IA ZH ZL YH YL XH XL
(a) 1 0 0 0 0 0 1
(b) 1 0 0 0 1 0 0
(c) 1 0 0 1 0 0 0
(d) 1 0 0 0 0 1 0
(e) 1 1 0 0 0 0 0
(f) 1 0 1 0 0 0 0
5.6.1 Single-tap
If the device is configured for single-tap event detection, an interrupt is generated when the high-pass filtered data
exceeds the programmed threshold and returns below it within the shock time window.
In the single-tap case, if the LIR bit of the CTRL3 register is set to 0, the interrupt is kept high for the duration of
the quiet window.
In order to enable the latch feature on the single-tap interrupt signal, the LIR bit of CTRL3 has to be set to 1: the
interrupt is kept high until the TAP_SRC or ALL_INT_SRC register is read.
The SINGLE_DOUBLE_TAP bit of WAKE_UP_THS has to be set to 0 in order to enable single-tap recognition
only.
In case (a) of Figure 11. Single-tap event recognition the single-tap event has been recognized, while in case (b)
the tap has not been recognized because the signal falls below the threshold after the shock time window has
expired.
The tap interrupt signals can also be checked by reading the TAP_SRC register, described in Table 22. TAP_SRC
register.
b7 b6 b5 b4 b3 b2 b1 b0
• TAP_IA is set high when a single-tap or double-tap event has been detected.
• SINGLE_TAP is set high when a single tap has been detected.
• DOUBLE_TAP is set high when a double tap has been detected.
• TAP_SIGN indicates the acceleration sign when the tap event is detected. It is set low in case of positive
sign and it is set high in case of negative sign.
• X_TAP (Y_TAP, Z_TAP) is set high when the tap event has been detected on the X (Y, Z) axis
Single and double-tap recognition works independently. Setting the SINGLE_DOUBLE_TAP bit of
WAKE_UP_THS to 0, only single-tap recognition is enabled: double-tap recognition is disabled and cannot be
detected. When the SINGLE_DOUBLE_TAP bit is set to 1, both single and double-tap recognition are enabled,
and the single-tap event is always recognized first, followed by the double-tap event.
If latched mode is enabled and the interrupt signal is driven to the interrupt pins, the value assigned to
SINGLE_DOUBLE_TAP also affects the behavior of the interrupt signal: when it is set to 0, latched mode is
applied to the single-tap interrupt signal; when it is set to 1, latched mode is applied to the double-tap interrupt
signal only. The latched interrupt signal is kept high until the TAP_SRC or ALL_INT_SRC register is read. The
TAP_SIGN, X_TAP, Y_TAP, Z_TAP bits are maintained at the state in which the interrupt was generated until the
read is performed, and released at the next ODR cycle. In case the TAP_SIGN, X_TAP, Y_TAP, Z_TAP bits have
to be evaluated (in addition to the TAP_IA bit), it is recommended to directly read the TAP_SRC register (do not
use ALL_INT_SRC register for this specific case). If latched mode is enabled but the interrupt signal is not driven
to the interrupt pins, the latch feature does not take effect.
In this example the threshold for each axis is set to 01001, therefore the tap threshold is 562.5 mg (= 9 * FS / 32).
The SHOCK field of the INT_DUR register is set to 10: an interrupt is generated when the high-pass filtered data
exceeds the programmed threshold and returns below it within 40 ms (= 2 * 8 / ODR) corresponding to the shock
time window.
The QUIET field of the INT_DUR register is set to 01: since latched mode is disabled, the interrupt is kept high for
the duration of the quiet window, therefore 10 ms (= 1 * 4 / ODR).
In this example the threshold for each axis is set to 01100, therefore the tap threshold is 750 mg (= 12 * FS / 32).
For interrupt generation, during the first and the second tap the high-pass filtered data must return below the
threshold before the shock window has expired. The SHOCK field of the INT_DUR register is set to 11, therefore
the shock time is 60 ms (= 3 * 8 / ODR).
For interrupt generation, after the first tap recognition there must not be any high-pass filtered data overthreshold
during the quiet time window. Furthermore, since latched mode is disabled, the interrupt is kept high for the
duration of the quiet window. The QUIET field of the INT_DUR register is set to 11, therefore the quiet time is 30
ms (= 3 * 4 / ODR).
For the maximum time between two consecutive detected taps, the LAT field of the INT_DUR register is set to
0111, therefore the duration time is 560 ms (= 7 * 32 / ODR).
During the inactivity status of the device, the SLEEP_STATE bit in STATUS is set high. This bit can be routed to
the INT2 pin, setting both the INT2_SLEEP_STATE and INT2_SLEEP_STATE_CHG bits to 1 in
CTRL5_INT2_PAD_CTRL. Note that this signal is not compatible with "latched notification mode", the LIR bit of
CTRL3 should be set to 0.
Every time the device status changes from activity to inactivity or vice versa, the SLEEP_CHANGE_IA bit in
ALL_INT_SRC is set for about 1.2 ms. This bit can be routed to the INT2 pin using the INT2_SLEEP_CHG bit in
CTRL5_INT2_PAD_CTRL. The typical duration of the sleep change event pulse on the interrupt pin depends on
the selected power mode and activity/inactivity transition (when using high-performance mode).
Power mode Activity to inactivity pulse duration Inactivity to activity pulse duration
When a single sample of high-pass filtered data on one axis becomes bigger than the threshold, the CTRL1
register settings are immediately restored (activity). The wake-up interrupt event can be delayed in function of the
value of the WU_DUR[1:0] bits of the WAKE_UP_DUR register: 1 LSB corresponds to 1/ODR time, where ODR is
the accelerometer output data rate. In order to generate the interrupt at the same time as the inactivity/activity
event, WU_DUR[1:0] have to be set to 0.
When the wake-up event is detected, the interrupt is set high for 1/ODR period, then it is automatically deasserted
(the WU_IA event on the pin must be routed by setting the INT1_WU bit of CTRL4_INT1_PAD_CTRL register
to 1).
The code provided below is a basic routine for activity/inactivity detection implementation.
In this example the WU_THS field of the WAKE_UP_THS register is set to 000010, therefore the activity/inactivity
threshold is 62.5 mg (= 2 * FS / 64).
Before inactivity detection, the X,Y,Z high-pass filtered data must be smaller than the configured threshold for a
period of time defined by the SLEEP_DUR field of the WAKE_UP_DUR register: this field is set to 0010,
corresponding to 5.12 s (= 2 * 512 / ODR). After this period of time has elapsed, the accelerometer ODR is
internally set to 12.5 Hz.
The activity status is detected and the CTRL1 register settings immediately restored if the high-pass filtered data
of (at least) one axis is bigger than the threshold and the wake-up interrupt was notified after an interval defined
by the WU_DUR field of the WAKE_UP_DUR register: this field is set to 10, corresponding to 10 ms
(= 2 * 1 / ODR).
The following routine describes how to route the sleep change event to the INT2 pin.
This example is similar to the previous one but the "sleep change" event is routed to the INT2 pin.
In order to limit intervention by the host processor and facilitate postprocessing data for recognition of events, the
LIS2DW12 embeds a first-in, first-out buffer (FIFO) for each of the three output channels, X, Y, and Z.
FIFO use allows consistent power saving for the system, it can wake up only when needed and burst the
significant data out from the FIFO.
The FIFO buffer can work according to five different modes that guarantee a high level of flexibility during
application development: bypass mode, FIFO mode, continuous mode, bypass-to-continuous and continuous-to-
FIFO mode.
A programmable watermark level and the FIFO full event can be enabled to generate dedicated interrupts on the
INT1 or INT2 pins.
Table 24. FIFO buffer full representation (32nd sample set stored)
Table 25. FIFO buffer full representation (33rd sample set stored and 1st sample discarded)
Table 24. FIFO buffer full representation (32nd sample set stored) represents the FIFO full status when 32
samples are stored in the buffer while Table 25. FIFO buffer full representation (33rd sample set stored and 1st
sample discarded) represents the next step when the 33rd sample is inserted into FIFO and the 1st sample is
overwritten. The new oldest sample set is made available in the output registers.
When FIFO is enabled and the mode is different from bypass, the LIS2DW12 output registers (28h to 2Dh)
always contain the oldest FIFO sample set.
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
• FIFO_FTH bit is set high when the FIFO content is greater than or equal to the watermark level. This flag
can be routed to the INT1 or INT2 pin (see Section 6.3 FIFO interrupts).
• FIFO_OVR bit is set high when the first sample is overwritten after the FIFO buffer is full. This means that
the FIFO buffer contains 32 unread samples. The FIFO_OVR bit is reset when the first sample set has
been read.
• Diff5 bit is used together with bits Diff[4:0] to provide information of how many FIFO entries are used
(000000 means FIFO empty, 100000 means FIFO full). This flag can be routed to the INT1 or INT2 pin (see
Section 6.3 FIFO interrupts).
The update of the register content is synchronous with the FIFO write and read operation.
Diff5
FIFO_FTH FIFO_OVR Diff[4:0] Unread FIFO samples Timing
(FIFO_FULL)
0 0 0 00000 0 t0
0 0 0 00001 1 t0 + 1/ODR
0 0 0 00010 2 t0 + 2/ODR
... ... ... ... ... ...
0 0 0 01110 14 t0 + 14/ODR
1 0 0 01111 15 t0 + 15/ODR
... ... ... ... ... ...
1 0 0 11111 31 t0 + 31/ODR
1 1 0 00000 32 t0 + 32/ODR
1 1 1 00000 32 t0 + 33/ODR
F0 F1 F2 F3 F4 F5 … … F31 … F0 F1 …
0 1 2 3 4 5 … … 31 … 32 33 …
FIFO Reading
FIFO_OVR
FIFO_FULL interrupt
t
FIFO mode FIFO FIFO FIFO Mode
enabled stops Bypass enabled
As indicated in Figure 15. FIFO mode behavior, when FIFO mode is enabled, the buffer starts to collect data and
fills all 32 slots (from F0 to F31) at the selected output data rate. When the buffer is full, as the next sample
comes in and overrides the buffer, the FIFO_OVR bit goes high and data collection is permanently stopped; the
user can decide to read FIFO content at any time because it is maintained unchanged until bypass mode is
selected. The read procedure may be performed inside an interrupt handler triggered by a FIFO FULL condition
(Diff5) and it is composed of a 32 sample set of 6 bytes for a total of 192 bytes and retrieves data starting from the
oldest sample stored in FIFO (F0). The FIFO_OVR bit is reset when the first sample set has been read. The
bypass mode setting resets FIFO and allows the user to enable FIFO mode again.
F0 F1 F2 F3 F4 F5 … … F31 F0 F1 … F31 F0 F1 … …
0 1 2 3 4 5 … … 31 32 33 … 63 64 65 … …
FIFO Reading
FIFO_FTH
FTH interrupt
t
Continuous mode Start FIFO Start FIFO
enabled Reading Reading
As indicated in Figure 16. Continuous mode with interrupt trigger, when continuous mode is enabled, the FIFO
buffer continuously fills (from F0 to F31) at the selected output data rate. When the buffer is full, the FTH interrupt
(as well as the FIFO_FULL condition indicated by the Diff5 bit in FIFO_SAMPLES (2Fh), which might also be
used to trigger an interrupt) goes high, and the application processor may read all FIFO samples (32 * 6 bytes) as
soon as possible to avoid loss of data and to limit intervention by the host processor, which increases system
efficiency. See Section 6.5 Retrieving data from FIFO for more details on FIFO reading speed.
When a read command is sent to the device, the content of the output registers is moved to the SPI/I²C register
and the current oldest FIFO value is shifted into the output registers in order to allow the next read operation.
F0 F1 F2 F31
0 1 2 3 4 5 … … 33 34 35
FIFO Reading
FIFO_OVR
Interrupt Event
t
Continuous-to-FIFO FIFO switches FIFO Start FIFO
mode enabled to FIFO mode stops Reading
F0 F1 F2 … … F31 F0 F1 … F31 F0 F1 … …
0 1 2 3 4 5 … … 34 35 36 … 66 67 68 … …
FIFO Reading
FTH interrupt
Interrupt Event
t
Bypass-to-Continuous FIFO switches to Start FIFO Start FIFO FIFO switches to
mode enabled Continuous mode Reading Reading Bypass mode
As indicated in Figure 18. Bypass-to-continuous mode the FIFO is initially in bypass mode, so no samples enter in
the FIFO buffer. As soon as an event occurs (for example, a wake-up or a free-fall event) the FIFO switches to
continuous mode and starts to store the samples at the configured data rate. When the programmed threshold is
reached, the FTH interrupt goes high, and the application processor may start reading all FIFO samples (32 * 6
bytes) as soon as possible to avoid loss of data.
If the FIFO_OVR flag was set, it goes to 0 as soon as the first FIFO set is read, creating space for new data.
Since the FIFO is still in continuous mode, the FIFO eventually reaches the threshold again and the situation
repeats.
Finally, either the interrupt event is cleared or the FIFO directly enters bypass mode and then it stops collecting
data.
50 32 32 32
100 17 32 32
200 8 32 32
400 4 17 32
800 1 8 32
1600 - 4 25
7 Temperature sensor
The LIS2DW12 is provided with an internal temperature sensor that is suitable for ambient temperature
measurement.
If the sensor is in power-down mode, the temperature sensor is off and shows the last value measured.
Bit DRDY_T in STATUS_DUP (37h) is set high when a new set of data is available and is reset when one of the
temperature data outputs (OUT_T_H or OUT_T) is read. The DRDY_T bit can be routed to the INT2 pin through
bit INT2_DRDY_T of the CTRL5_INT2_PAD_CTRL register.
The temperature DRDY interrupt can be pulsed using the DRDY_PULSED bit of the CTRL7 register: the pulse
duration is 78 μs (typical). Pulsed mode is not applied to the DRDY_T bit, which is always latched.
The temperature data is represented as a number of 12 bits in two’s complement format, left-aligned in the
OUT_T_L and OUT_T_H registers. A duplicated value of OUT_T_H in register OUT_T is also available in order to
provide 8 bits in two’s complement format, temperature sequentially readable with the sensor outputs. See table
below for temperature sensor details.
1(2)
TsDr Temperature sensor output change vs. temperature LSB/°C
16(3)
Temperature refresh rate in high-performance mode for all ODRs or in low-power
50
modes for ODRs equal to 200/100/50 Hz
8 Self-test
The embedded self-test functions allow checking device functionality without moving it.
When the accelerometer self-test is enabled, an actuation force is applied to the sensor, leading to a deflection of
the moveable part of the sensor. In this case, the sensor outputs exhibit a change in their DC levels that are
related to the selected full scale through the sensitivity value.
The accelerometer self-test function is off when the ST[2:1] bits of the CTRL3 register are programmed to 00; it is
enabled when the ST[2:1] bits are set to 01 (positive sign self-test) or 10 (negative sign self-test).
When the accelerometer self-test is activated, the sensor output level is given by the algebraic sum of the data
produced by the electrostatic test-force and gravity.
The procedure consists of:
1. Enabling the accelerometer
2. Averaging five samples before enabling the self-test
3. Averaging five samples after enabling the self-test
4. Computing the difference in absolute value for each axis and verifying that it falls within a given range. The
min and max values are provided in the datasheet.
The complete accelerometer self-test procedure is indicated in Figure 19. Accelerometer self-test procedure.
Notes:
1. Keep the device still during the self-test procedure.
2. The full scale and data rate used in the self-test procedure are not mandatory but recommended.
3. Refer to the datasheet for minimum and maximum values.
Write 0Ch to CTRL2 (21h) Check DRDY in STATUS (27h) – data-ready bit
Write 00h to CTRL3 (22h)
Write 00h to CTRL4_INT1_PAD_CTRL (23h) Reading OUTX/OUTY/OUTZ clears DRDY, wait for the first sample
Write 00h to CTRL5_INT2_PAD_CTRL (24h) Read OUT_X_L(28h), OUT_X_H(29h), OUT_Y_L(2Ah),
Write 10h to CTRL6 (25h) OUT_Y_H(2Bh), OUT_Z_L(2Ch), OUT_Z_H(2Dh) Discard data
Write 44h to CTRL1 (20h)
Read the output registers after checking DRDY bit *5 times AND
Read OUT_X_L (28h), OUT_X_H (29h): Store data in OUTX_NOST |Min(ST_Y) ≤ |OUTY_ST-OUTY_NOST| ≤ |Max(ST_Y)|
Read OUT_Z_L (2Ch), OUT_Z_H (2Dh): Store data in OUTZ_NOST |Min(ST_Z)| ≤ |OUTZ_ST-OUTZ_NOST| ≤ |Max (ST_Z)|
Write 40h to CTRL3(22h) Enable self-test Write 00h to CTRL1 (20h): Disable sensor
Wait 100 ms for stable output Write 00h to CTRL3 (22h): Disable self-test
AN5038
page 46/52
Self-test
Note: The wait time of 100 ms is not mandatory but recommended. In any case, the settling time should be taken into account.
AN5038
Revision history
Table 32. Document revision history
Contents
1 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
3 Operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1 Power mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Continuous conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 Single data conversion (on-demand mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.4 Accelerometer bandwidth. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.5 High-pass filter configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4 Reading output data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
4.1 Startup sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.2 Using the status register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
4.3 Using the data-ready signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.4 Using the block data update (BDU) feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.5 Understanding output data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.5.1 Example of output data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5 Interrupt generation and embedded functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
5.1 Interrupt pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
5.2 Event status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
5.3 Free-fall interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
5.4 Wake-up interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5.5 6D/4D orientation detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.5.1 6D orientation detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.5.2 4D orientation detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6 Single-tap and double-tap recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6.1 Single-tap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.6.2 Double tap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.6.3 Single-tap and double-tap recognition configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.6.4 Single-tap example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.6.5 Double-tap example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.7 Activity/inactivity recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.8 Stationary/motion detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
5.9 Boot status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
6 First-in first-out (FIFO) buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35
6.1 FIFO description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
List of tables
Table 1. Internal pin status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Table 2. Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Table 3. Accelerometer resolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Table 4. CTRL1 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Table 5. Mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Table 6. Low-power mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Table 7. Power consumption at 1.8 V [μA] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 8. High-performance mode: noise density [μg/√Hz] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 9. Low-power mode: RMS noise [mg(RMS)] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Table 10. Output data rate selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Table 11. Low-power mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 12. Low-pass filter 1 bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 13. Bandwidth: low-pass path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 14. Bandwidth: high-pass path . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table 15. Sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Table 16. CTRL4_INT1_PAD_CTRL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 17. CTRL5_INT2_PAD_CTRL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 18. Free-fall threshold value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 19. SIXD_SRC register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 20. Threshold for 4D/6D function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 21. SIXD_SRC register for 6D positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 22. TAP_SRC register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Table 23. Pulse duration on interrupt pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Table 24. FIFO buffer full representation (32nd sample set stored) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Table 25. FIFO buffer full representation (33rd sample set stored and 1st sample discarded) . . . . . . . . . . . . . . . . . . . . . . 35
Table 26. FIFO_CTRL register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Table 27. FIFO_SAMPLES register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 28. FIFO_SAMPLES behavior assuming FTH[4:0] = 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 29. Example: threshold function of ODR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table 30. Temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Table 31. Content of output data registers vs. temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Table 32. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
List of figures
Figure 1. Pin connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Figure 2. Single data conversion using INT2 as external trigger (SLP_MODE_SEL = 0) . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 3. Accelerometer filtering chain diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 4. High-pass filter in normal and reference mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Figure 5. Data-ready signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Figure 6. Embedded functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 7. Interrupt pin configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 8. Free-fall interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Figure 9. Wake-up event recognition (using the HP filter). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Figure 10. 6D recognized orientations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Figure 11. Single-tap event recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
Figure 12. Double-tap event recognition (LIR bit = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 13. Single and double-tap recognition (LIR bit = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Figure 14. Activity/Inactivity recognition (using the HP filter). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 15. FIFO mode behavior . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Figure 16. Continuous mode with interrupt trigger. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 17. Continuous-to-FIFO mode: interrupt latched and nonlatched . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Figure 18. Bypass-to-continuous mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Figure 19. Accelerometer self-test procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46