An5125 Ism330dlc 3d Accelerometer and 3d Gyroscope With Digital Output For Industrial Applications Stmicroelectronics
An5125 Ism330dlc 3d Accelerometer and 3d Gyroscope With Digital Output For Industrial Applications Stmicroelectronics
Application note
Introduction
This document is intended to provide usage information and application hints related to ST’s ISM330DLC iNEMO inertial
module.
The ISM330DLC is a 3D digital accelerometer and 3D digital gyroscope system-in-package with a digital I2C/SPI serial interface
standard output, performing at 0.75 mA in combo High-Performance mode.
The device has a dynamic user-selectable full-scale acceleration range of ±2/±4/±8/±16 g and an angular rate range of
±125/±250/±500/±1000/±2000 dps.
It embeds smart features which simplify and optimize the application design and allow the usage of complex motion-sensing
information also in power-constrained applications.
The ISM330DLC 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 availability of different connection modes to external sensors allows implementing additional functionalities such as a
sensor hub, auxiliary SPI, etc.
The integrated smart first-in first-out (FIFO) buffer of up to 4 kbyte size allows dynamic batching of significant data (i.e.
accelerometer and gyroscope data, external sensor data, timestamp and temperature data).
The ISM330DLC is available in a small plastic land grid array package (LGA-14L) and it is guaranteed to operate over an
extended temperature range from -40 °C to +85 °C.
1 Pin description
SPI 4-wire interface serial data SPI 4-wire interface serial data SPI 4-wire interface serial data
SDO output (SDO) output (SDO) output (SDO) Default: input without pull-up. Pull-up Default: input without pull-up. Pull-up Default: input without pull-up. Pull-up
1 is enabled if bit SIM = 1 (SPI 3-wire) is enabled if bit SIM = 1 (SPI 3-wire) is enabled if bit SIM = 1 (SPI 3-wire)
SA0 I2C least significant bit of the I2C least significant bit of the I2C least significant bit of the in reg 12h. in reg 12h. in reg 12h.
device address (SA0) device address (SA0) device address (SA0)
Auxiliary SPI 3/4-wire interface Default: input without pull-up. Pull-up Default: input without pull-up. Pull-up Default: input without pull-up. Pull-up
2 SDx Connect to VDDIO or GND I2C serial data master (MSDA) serial data input (SDI) and SPI is enabled if bit PULL_UP_EN = 1 is enabled if bit PULL_UP_EN = 1 is enabled if bit PULL_UP_EN = 1
3-wire serial data output (SDO) in reg 1Ah. in reg 1Ah. in|reg 1Ah.
Default: input without pull-up. Pull-up Default: input without pull-up. Pull-up Default: input without pull-up. Pull-up
Auxiliary SPI 3/4-wire interface
3 SCx Connect to VDDIO or GND I2C serial clock master (MSCL) is enabled if bit PULL_UP_EN = 1 is enabled if bit PULL_UP_EN = 1 is enabled if bit PULL_UP_EN = 1
serial port clock (SPC_Aux)
in reg 1Ah. in reg 1Ah. in reg 1Ah.
4 INT1 Programmable interrupt 1 Programmable interrupt 1 Programmable interrupt 1 Default: output forced to ground Default: output forced to ground Default: output forced to ground
5 Vdd_IO Power supply for I/O pins Power supply for I/O pins Power supply for I/O pins
Programmable interrupt 2
Programmable interrupt 2 (INT2) / Data enabled (DEN) / Programmable interrupt 2
9 INT2 Default: output forced to ground Default: output forced to ground Default: output forced to ground
(INT2) / Data enabled (DEN) I2C master external (INT2) / Data enabled (DEN)
synchronization signal (MDRDY)
Auxiliary SPI 3/4-wire interface Default: input with pull-up. Default: input with pull-up.
10 OCS Leave unconnected Leave unconnected Input without pull-up
enable (See note below to disable pull-up) (See note below to disable pull-up)
I2C/SPI mode selection (1:SPI I2C/SPI mode selection (1:SPI I2C/SPI mode selection (1:SPI
Default: input with pull-up. Pull-up is Default: input with pull-up. Pull-up is Default: input with pull-up. Pull-up is
idle mode / I2C communication idle mode / I2C communication idle mode / I2C communication
12 CS disabled if bit I2C_disable = 1 disabled if bit I2C_disable = 1 disabled if bit I2C_disable = 1
enabled; 0: SPI communication enabled; 0: SPI communication enabled; 0: SPI communication
in reg 13h. in reg 13h. in reg 13h.
mode / I2C disabled) mode / I2C disabled) mode / I2C disabled
I2C serial clock (SCL) / SPI I2C serial clock (SCL) / SPI I2C serial clock (SCL) / SPI
13 SCL Input without pull-up Input without pull-up Input without pull-up
serial port clock (SPC) serial port clock (SPC) serial port clock (SPC)
I2C serial data (SDA) / SPI I2C serial data (SDA) / SPI serial I2C serial data (SDA) / SPI
serial data input (SDI) / 3-wire data input (SDI) / 3-wire serial data input (SDI) / 3-wire
14 SDA Input without pull-up Input without pull-up Input without pull-up
interface serial data output interface serial data output interface serial data output
(SDO) (SDO) (SDO)
AN5125
1. From primary I²C/SPI interface: write 80h in register at address 00h
page 3/116
2. From primary I²C/SPI interface: write 01h in register at address 05h (disable the pull-up on pins 10 & 11)
3. From primary I²C/SPI interface: write 00h in register at address 00h
2 Registers
AN5125 - Rev 2
Table 2. Registers
Register name Address Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
SENSOR_SYNC_
04h 0 0 0 0 TPH_3 TPH_2 TPH_1 TPH_0
TIME_FRAME
SENSOR_SYNC_
05h 0 0 0 0 0 0 RR_1 RR_0
RES_RATIO
FIFO_CTRL1 06h FTH_7 FTH_6 FTH_5 FTH_4 FTH_3 FTH_2 FTH_1 FTH_0
FIFO_CTRL4 09h STOP_ON_FTH ONLY_HIGH _DATA DEC_DS4 _FIFO2 DEC_DS4 _FIFO1 DEC_DS4 _FIFO0 DEC_DS3 _FIFO2 DEC_DS3 _FIFO1 DEC_DS3 _FIFO0
INT2_CTRL 0Eh 0 0 INT2_FULL_FLAG INT2_FIFO_OVR INT2_FTH INT2_DRDY _TEMP INT2_DRDY _G INT2_DRDY _XL
WHO_AM_I 0Fh 0 1 1 0 1 0 1 0
CTRL1_XL 10h ODR_XL3 ODR_XL2 ODR_XL1 ODR_XL0 FS_XL1 FS_XL0 LPF1_BW _SEL BW0_XL
CTRL3_C 12h BOOT BDU H_LACTIVE PP_OD SIM IF_INC BLE SW_RESET
CTRL4_C 13h DEN_XL_EN SLEEP INT2_on_INT1 DEN_DRDY _INT1 DRDY _MASK I2C_disable LPF1_SEL _G 0
CTRL5_C 14h ROUNDING2 ROUNDING1 ROUNDING0 DEN_LH ST1_G ST0_G ST1_XL ST0_XL
ROUNDING
CTRL7_G 16h G_HM_MODE HP_G_EN HPM1_G HPM0_G 0 0 0
_STATUS
AN5125
Registers
page 4/116
Register name Address Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
TDA
STATUS_REG GDA XLDA
1Eh 0 0 0 0 0 / GYRO_
/ STATUS_SPIAux / GDA / XLDA
SETTLING
OUT_TEMP_L 20h Temp7 Temp6 Temp5 Temp4 Temp3 Temp2 Temp1 Temp0
OUT_TEMP_H 21h Temp15 Temp14 Temp13 Temp12 Temp11 Temp10 Temp9 Temp8
OUTX_L_G 22h D7 D6 D5 D4 D3 D2 D1 D0
OUTY_L_G 24h D7 D6 D5 D4 D3 D2 D1 D0
OUTZ_L_G 26h D7 D6 D5 D4 D3 D2 D1 D0
OUTX_L_XL 28h D7 D6 D5 D4 D3 D2 D1 D0
OUTY_L_XL 2Ah D7 D6 D5 D4 D3 D2 D1 D0
OUTZ_L_XL 2Ch D7 D6 D5 D4 D3 D2 D1 D0
SENSORHUB1_REG 2Eh SHub1_7 SHub1_6 SHub1_5 SHub1_4 SHub1_3 SHub1_2 SHub1_1 SHub1_0
SENSORHUB2_REG 2Fh SHub2_7 SHub2_6 SHub2_5 SHub2_4 SHub2_3 SHub2_2 SHub2_1 SHub2_0
SENSORHUB3_REG 30h SHub3_7 SHub3_6 SHub3_5 SHub3_4 SHub3_3 SHub3_2 SHub3_1 SHub3_0
SENSORHUB4_REG 31h SHub4_7 SHub4_6 SHub4_5 SHub4_4 SHub4_3 SHub4_2 SHub4_1 SHub4_0
SENSORHUB5_REG 32h SHub5_7 SHub5_6 SHub5_5 SHub5_4 SHub5_3 SHub5_2 SHub5_1 SHub5_0
SENSORHUB6_REG 33h SHub6_7 SHub6_6 SHub6_5 SHub6_4 SHub6_3 SHub6_2 SHub6_1 SHub6_0
SENSORHUB7_REG 34h SHub7_7 SHub7_6 SHub7_5 SHub7_4 SHub7_3 SHub7_2 SHub7_1 SHub7_0
SENSORHUB8_REG 35h SHub8_7 SHub8_6 SHub8_5 SHub8_4 SHub8_3 SHub8_2 SHub8_1 SHub8_0
SENSORHUB9_REG 36h SHub9_7 SHub9_6 SHub9_5 SHub9_4 SHub9_3 SHub9_2 SHub9_1 SHub9_0
SENSORHUB10_REG 37h SHub10_7 SHub10_6 SHub10_5 SHub10_4 SHub10_3 SHub10_2 SHub10_1 SHub10_0
SENSORHUB11_REG 38h SHub11_7 SHub11_6 SHub11_5 SHub11_4 SHub11_3 SHub11_2 SHub11_1 SHub11_0
SENSORHUB12_REG 39h SHub12_7 SHub12_6 SHub12_5 SHub12_4 SHub12_3 SHub12_2 SHub12_1 SHub12_0
FIFO_STATUS1 3Ah DIFF_FIFO_7 DIFF_FIFO_6 DIFF_FIFO_5 DIFF_FIFO_4 DIFF_FIFO_3 DIFF_FIFO_2 DIFF_FIFO_1 DIFF_FIFO_0
FIFO_FULL
FIFO_STATUS2 3Bh WaterM OVER_RUN FIFO _EMPTY 0 DIFF_FIFO_10 DIFF_FIFO_9 DIFF_FIFO_8
_SMART
FIFO_STATUS3 3Ch FIFO_ PATTERN_7 FIFO_ PATTERN_6 FIFO_ PATTERN_5 FIFO_ PATTERN_4 FIFO_ PATTERN_3 FIFO_ PATTERN_2 FIFO_ PATTERN_1 FIFO_ PATTERN_0
AN5125
FIFO_STATUS4 3Dh 0 0 0 0 0 0 FIFO_ PATTERN_9 FIFO_ PATTERN_8
Registers
page 5/116
Register name Address Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
TIMESTAMP0_REG 40h TIMESTAMP0_7 TIMESTAMP0_6 TIMESTAMP0_5 TIMESTAMP0_4 TIMESTAMP0_3 TIMESTAMP0_2 TIMESTAMP0_1 TIMESTAMP0_0
TIMESTAMP1_REG 41h TIMESTAMP1_7 TIMESTAMP1_6 TIMESTAMP1_5 TIMESTAMP1_4 TIMESTAMP1_3 TIMESTAMP1_2 TIMESTAMP1_1 TIMESTAMP1_0
TIMESTAMP2_REG 42h TIMESTAMP2_7 TIMESTAMP2_6 TIMESTAMP2_5 TIMESTAMP2_4 TIMESTAMP2_3 TIMESTAMP2_2 TIMESTAMP2_1 TIMESTAMP2_0
SENSORHUB13_REG 4Dh SHub13_7 SHub13_6 SHub13_5 SHub13_4 SHub13_3 SHub13_2 SHub13_1 SHub13_0
SENSORHUB14_REG 4Eh SHub14_7 SHub14_6 SHub14_5 SHub14_4 SHub14_3 SHub14_2 SHub14_1 SHub14_0
SENSORHUB15_REG 4Fh SHub15_7 SHub15_6 SHub15_5 SHub15_4 SHub15_3 SHub15_2 SHub15_1 SHub15_0
SENSORHUB16_REG 50h SHub16_7 SHub16_6 SHub16_5 SHub16_4 SHub16_3 SHub16_2 SHub16_1 SHub16_0
SENSORHUB17_REG 51h SHub17_7 SHub17_6 SHub17_5 SHub17_4 SHub17_3 SHub17_2 SHub17_1 SHub17_0
SENSORHUB18_REG 52h SHub18_7 SHub18_6 SHub18_5 SHub18_4 SHub18_3 SHub18_2 SHub18_1 SHub18_0
SENSORHUB_
FUNC_SRC1 53h 0 0 TILT_IA 0 0 HI_FAIL SI_END_OP
END_OP
INTERRUPTS_
TAP_CFG 58h INACT_EN1 INACT_EN0 SLOPE_FDS TAP_X_EN TAP_Y_EN TAP_Z_EN LIR
ENABLE
TAP_THS_6D 59h D4D_EN SIXD_THS1 SIXD_THS0 TAP_THS4 TAP_THS3 TAP_THS2 TAP_THS1 TAP_THS0
INT_DUR2 5Ah DUR3 DUR2 DUR1 DUR0 QUIET1 QUIET0 SHOCK1 SHOCK0
SINGLE_
WAKE_UP_THS 5Bh 0 WK_THS5 WK_THS4 WK_THS3 WK_THS2 WK_THS1 WK_THS0
DOUBLE_TAP
WAKE_UP_DUR 5Ch FF_DUR5 WAKE_DUR1 WAKE_DUR0 TIMER_HR SLEEP _DUR3 SLEEP _DUR2 SLEEP _DUR1 SLEEP _DUR0
FREE_FALL 5Dh FF_DUR4 FF_DUR3 FF_DUR2 FF_DUR1 FF_DUR0 FF_THS2 FF_THS1 FF_THS0
INT1_INACT INT1_
MD1_CFG 5Eh INT1_SINGLE_TAP INT1_WU INT1_FF INT1_6D INT1_TILT INT1 _TIMER
_STATE DOUBLE_TAP
INT2_INACT INT2_
MD2_CFG 5Fh INT2_SINGLE_TAP INT2_WU INT2_FF INT2_6D INT2_TILT INT2 _IRON
_STATE DOUBLE_TAP
SENS_SYNC_SPI_
61h ERROR_CODE7 ERROR_CODE6 ERROR_CODE5 ERROR_CODE4 ERROR_CODE3 ERROR_CODE2 ERROR_CODE1 ERROR_CODE0
ERROR_CODE
OUT_MAG_RAW_X_L 66h D7 D6 D5 D4 D3 D2 D1 D0
OUT_MAG_RAW_Y_L 68h D7 D6 D5 D4 D3 D2 D1 D0
AN5125
Registers
page 6/116
OUT_MAG_RAW_Z_L 6Ah D7 D6 D5 D4 D3 D2 D1 D0
Register name Address Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
CTRL1_OIS 70h BLE_OIS LVL1_OIS SIM_OIS MODE4_EN FS1_G_OIS FS0_G_OIS FS_125_OIS OIS_EN_SPI2
X_OFS_USR 73h 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 74h 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 75h 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
AN5125
Registers
page 7/116
AN5125 - Rev 2
Register name Address Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
SLV0_ADD 02h Slave0_add6 Slave0_add5 Slave0_add4 Slave0_add3 Slave0_add2 Slave0_add1 Slave0_add0 rw_0
SLV0_SUBADD 03h Slave0_reg7 Slave0_reg6 Slave0_reg5 Slave0_reg4 Slave0_reg3 Slave0_reg2 Slave0_reg1 Slave0_reg0
SLAVE0_CONFIG 04h Slave0_rate1 Slave0_rate0 Aux_sens_on1 Aux_sens_on0 Src_mode Slave0 _numop2 Slave0 _numop1 Slave0 _numop0
SLV1_ADD 05h Slave1_add6 Slave1_add5 Slave1_add4 Slave1_add3 Slave1_add2 Slave1_add1 Slave1_add0 r_1
SLV1_SUBADD 06h Slave1_reg7 Slave1_reg6 Slave1_reg5 Slave1_reg4 Slave1_reg3 Slave1_reg2 Slave1_reg1 Slave1_reg0
SLAVE1_CONFIG 07h Slave1_rate1 Slave1_rate0 write_once 0 0 Slave1 _numop2 Slave1 _numop1 Slave1 _numop0
SLV2_ADD 08h Slave2_add6 Slave2_add5 Slave2_add4 Slave2_add3 Slave2_add2 Slave2_add1 Slave2_add0 r_2
SLV2_SUBADD 09h Slave2_reg7 Slave2_reg6 Slave2_reg5 Slave2_reg4 Slave2_reg3 Slave2_reg2 Slave2_reg1 Slave2_reg0
SLAVE2_CONFIG 0Ah Slave2_rate1 Slave2_rate0 0 0 0 Slave2 _numop2 Slave2 _numop1 Slave2 _numop0
SLV3_ADD 0Bh Slave3_add6 Slave3_add5 Slave3_add4 Slave3_add3 Slave3_add2 Slave3_add1 Slave3_add0 r_3
SLV3_SUBADD 0Ch Slave3_reg7 Slave3_reg6 Slave3_reg5 Slave3_reg4 Slave3_reg3 Slave3_reg2 Slave3_reg1 Slave3_reg0
SLAVE3_CONFIG 0Dh Slave3_rate1 Slave3_rate0 0 0 0 Slave3 _numop2 Slave3 _numop1 Slave3 _numop0
DATAWRITE_SRC
0Eh Slave_dataw7 Slave_dataw6 Slave_dataw5 Slave_dataw4 Slave_dataw3 Slave_dataw2 Slave_dataw1 Slave_dataw0
_MODE_SUB_SLV0
MAG_SI_XX 24h MAG_SI _XX_7 MAG_SI _XX_6 MAG_SI _XX_5 MAG_SI _XX_4 MAG_SI _XX_3 MAG_SI _XX_2 MAG_SI _XX_1 MAG_SI _XX_0
MAG_SI_XY 25h MAG_SI _XY_7 MAG_SI _XY_6 MAG_SI _XY_5 MAG_SI _XY_4 MAG_SI _XY_3 MAG_SI _XY_2 MAG_SI _XY_1 MAG_SI _XY_0
MAG_SI_XZ 26h MAG_SI _XZ_7 MAG_SI _XZ_6 MAG_SI _XZ_5 MAG_SI _XZ_4 MAG_SI _XZ_3 MAG_SI _XZ_2 MAG_SI _XZ_1 MAG_SI _XZ_0
MAG_SI_YY 28h MAG_SI _YY_7 MAG_SI _YY_6 MAG_SI _YY_5 MAG_SI _YY_4 MAG_SI _YY_3 MAG_SI _YY_2 MAG_SI _YY_1 MAG_SI _YY_0
MAG_SI_YZ 29h MAG_SI _YZ_7 MAG_SI _YZ_6 MAG_SI _YZ_5 MAG_SI _YZ_4 MAG_SI _YZ_3 MAG_SI _YZ_2 MAG_SI _YZ_1 MAG_SI _YZ_0
MAG_SI_ZX 2Ah MAG_SI _ZX_7 MAG_SI _ZX_6 MAG_SI _ZX_5 MAG_SI _ZX_4 MAG_SI _ZX_3 MAG_SI _ZX_2 MAG_SI _ZX_1 MAG_SI _ZX_0
MAG_SI_ZY 2Bh MAG_SI _ZY_7 MAG_SI _ZY_6 MAG_SI _ZY_5 MAG_SI _ZY_4 MAG_SI _ZY_3 MAG_SI _ZY_2 MAG_SI _ZY_1 MAG_SI _ZY_0
AN5125
MAG_SI_ZZ 2Ch MAG_SI _ZZ_7 MAG_SI _ZZ_6 MAG_SI _ZZ_5 MAG_SI _ZZ_4 MAG_SI _ZZ_3 MAG_SI _ZZ_2 MAG_SI _ZZ_1 MAG_SI _ZZ_0
page 8/116
MAG_OFFX_L 2Dh MAG_OFFX _L_7 MAG_OFFX _L_6 MAG_OFFX _L_5 MAG_OFFX _L_4 MAG_OFFX _L_3 MAG_OFFX _L_2 MAG_OFFX _L_1 MAG_OFFX _L_0
AN5125 - Rev 2
Register name Address Bit7 Bit6 Bit5 Bit4 Bit3 Bit2 Bit1 Bit0
MAG_OFFX_H 2Eh MAG_OFFX _H_7 MAG_OFFX _H_6 MAG_OFFX _H_5 MAG_OFFX _H_4 MAG_OFFX _H_3 MAG_OFFX _H_2 MAG_OFFX _H_1 MAG_OFFX _H_0
MAG_OFFY_L 2Fh MAG_OFFY _L_7 MAG_OFFY _L_6 MAG_OFFY _L_5 MAG_OFFY _L_4 MAG_OFFY _L_3 MAG_OFFY _L_2 MAG_OFFY _L_1 MAG_OFFY _L_0
MAG_OFFY_H 30h MAG_OFFY _H_7 MAG_OFFY _H_6 MAG_OFFY _H_5 MAG_OFFY _H_4 MAG_OFFY _H_3 MAG_OFFY _H_2 MAG_OFFY _H_1 MAG_OFFY _H_0
MAG_OFFZ_L 31h MAG_OFFZ _L_7 MAG_OFFZ _L_6 MAG_OFFZ _L_5 MAG_OFFZ _L_4 MAG_OFFZ _L_3 MAG_OFFZ _L_2 MAG_OFFZ _L_1 MAG_OFFZ _L_0
MAG_OFFZ_H 32h MAG_OFFZ _H_7 MAG_OFFZ _H_6 MAG_OFFZ _H_5 MAG_OFFZ _H_4 MAG_OFFZ _H_3 MAG_OFFZ _H_2 MAG_OFFZ _H_1 MAG_OFFZ _H_0
3 Operating modes
The output data rate (ODR_G) bits of the CTRL2_G register and the High-Performance disable (G_HM_MODE)
bit of the CTRL7_G register are used to select the power mode and output data rate of the gyroscope sensor
(Table 5. Gyroscope ODR and power mode selection).
Table 6. Power consumption shows the typical values of power consumption for the different operating modes.
Power Down - - 10 μA
1.6 Hz (Low Power) 4.5 μA - -
12.5 Hz (Low Power) 9 μA 255 μA 280 μA
26 Hz (Low Power) 14 μA 270 μA 300 μA
52 Hz (Low Power) 25 μA 300 μA 350 μA
104 Hz (Normal mode) 44 μA 350 μA 440 μA
208 Hz (Normal mode) 85 μA 460 μA 550 μA
12.5 Hz (High Perf.) 180 μA 620 μA 750 μA
26 Hz (High Perf.) 180 μA 620 μA 750 μA
52 Hz (High Perf.) 180 μA 620 μA 750 μA
104 Hz (High Perf.) 180 μA 620 μA 750 μA
208 Hz (High Perf.) 180 μA 620 μA 750 μA
416 Hz (High Perf.) 180 μA 620 μA 750 μA
833 Hz (High Perf.) 180 μA 620 μA 750 μA
1.66 kHz (High Perf.) 190 μA 620 μA 750 μA
3.33 kHz (High Perf.) 190 μA 620 μA 750 μA
6.66 kHz (High Perf.) 190 μA 620 μA 750 μA
≥ 1666 1500
< 1666 400
The analog filter bandwidth can be set to 400 Hz also for accelerometer ODR ≥ 1666 Hz by setting the BW0_XL
bit to 1 in the CTRL1_XL register.
The digital LPF1 filter provides two outputs having different cutoff frequencies from each other; the desired LPF1
output can be selected through the LPF1_BW_SEL bit in the CTRL1_XL register and the INPUT_COMPOSITE bit
in the CTRL8_XL register.
Free-fall LOW_PASS_ON_6D
0
6D / 4D
Tilt 1
LPF2_XL_EN
0
0 HP_SLOPE_XL_EN
1 Digital
LPF1_BW_SEL LP Filter 0
LPF2
Analog
1
Anti-aliasing Digital
LP Filter LP Filter ODR/2
SLOPE_FDS FIFO
LPF1 HPCF_XL[1:0] Wake-up
ADC 1
ODR/4
Activity /
ODR_XL[3:0] 0
Inactivity
Digital HPCF_XL[1:0]
HP Filter SPI/
0 01 I2C
10
1 11
INPUT_COMPOSITE HPCF_XL[1:0] 1
SLOPE
00
FILTER
S/D Tap
Referring to Figure 2. Accelerometer filtering chain (Mode 1/2/3) and Figure 3. Accelerometer filtering chain
(Mode 4), the cutoff frequency of the “ODR/2” output of the LPF1 filter is equal to ODR/2 in High-Performance
mode and it is equal to 740 Hz in Low Power / Normal modes. The cutoff frequency of the “ODR/4” output is
always equal to ODR/4, regardless of the selected power mode.
Finally, the composite group of filters composed of a low-pass digital filter (LPF2), a high-pass digital filter and a
slope filter processes the digital signal.
When the ISM330DLC is configured in Mode 1/2/3, the CTRL8_XL register can be used to configure the
composite filter group and the overall bandwidth of the accelerometer filtering chain, as shown in Table
8. Accelerometer bandwidth selection in Mode 1/2/3. Referring to this table, on the low-pass path side, the
Bandwidth column refers to the LPF1 bandwidth if LPF2_XL_EN = 0; it refers to the LPF2 bandwidth if
LPF2_XL_EN = 1. On the high-pass path side, the Bandwidth column refers to the Slope filter bandwidth if
HPCF_XL[1:0] = 00b; it refers to the HP filter bandwidth if HPCF_XL[1:0] = 01b / 10b / 11b.
Table 8. Accelerometer bandwidth selection in Mode 1/2/3 also provides the maximum (worst case) settling time
in terms of samples to be discarded for the various configurations of the accelerometer filtering chain. Further
details are described in Section 3.9 Accelerometer and gyroscope turn-on/off time.
0 - - ODR/2 14
0
1 - - ODR/4 14
0 00 ODR/50 40
(Low-Pass path) 01 1 (low noise) ODR/100 80
1 -
10 0 (low latency) ODR/9 15
11 ODR/400 320
00 ODR/4 14
1 01 ODR/100 80
- - 0
(High-Pass path) 10 ODR/9 15
11 ODR/400 320
Setting the HP_SLOPE_XL_EN bit to 0, the low-pass path of the composite filter block is selected. If the
LPF2_XL_EN bit is set to 0, no additional filter is applied; if the LPF2_XL_EN bit is set to 1, the LPF2 filter is
applied in addition to LPF1 and the overall bandwidth of the accelerometer chain can be set by configuring the
HPCF_XL[1:0] field of the CTRL8_XL register.
The LPF2 low-pass filter can also be used in the 6D/4D functionality by setting the LOW_PASS_ON_6D bit of the
CTRL8_XL register to 1.
Setting the HP_SLOPE_XL_EN bit to 1, the high-pass path of the composite filter block is selected: the
HPCF_XL[1:0] field is used in order to enable, in addition to the LPF1 filter, either the Slope filter usage (when
HPCF_XL[1:0] = 00b) or the digital high-pass filter (other HPCF_XL[1:0] configurations). The HPCF_XL[1:0] field
is also used to select the cutoff frequencies of the HP filter.
The reference mode feature is available for the accelerometer sensor: when this feature is enabled, the current X,
Y, Z accelerometer sample is internally stored and subtracted from all subsequent output values. In order to
enable the reference mode, both the HP_REF_MODE bit and the HP_SLOPE_XL_EN bit of the CTRL8_XL
register have to be set to 1, and the value of the HPCF_XL[1:0] field has to be different than 00b. When the
reference mode feature is enabled, both the LPF2 filter and the HP filter are not available. The first accelerometer
output data after enabling the reference mode has to be discarded.
Free-fall
6D / 4D
Tilt
HP_SLOPE_XL_EN
0
0
FIFO
1
LPF1_BW_SEL
Analog
Anti-aliasing Digital
LP Filter LP Filter ODR/2
SLOPE 1
LPF1 SPI/I2C
FILTER
ADC ODR/4
ODR_XL[3:0]
S/D Tap
Wake-up
Activity /
Inactivity
Digital ODR XL
LP Filter @6.6 kHz
LPF_OIS
SPI_Aux
FILTER_XL_CONF_OIS[1:0]
When the ISM330DLC is configured in Mode 4, the accelerometer filtering chain becomes the one shown in
Figure 3. Accelerometer filtering chain (Mode 4). In this configuration, two different data chains are available:
• The GP (General Purpose) chain, where the accelerometer data are provided to the primary I2C/SPI with an
ODR selectable from 1.6 Hz up to 6.66 kHz.
• The OIS chain, for control loop stability, where the accelerometer data are provided to the auxiliary SPI with
an ODR fixed at 6.66 kHz.
Note: When the ISM330DLC is configured in Mode 4, only the Slope filter is available on the accelerometer GP
chain side, whereas LPF2 and HP filters are not available: it is recommended to avoid using reference mode,
LPF2 and HP filters in Mode 1/2/3 when Mode 4 is intended to be used.
The FILTER_XL_CONF_OIS_[1:0] bits of the CTRL3_OIS register can be used to select the overall
accelerometer OIS chain bandwidth: its value also depends on the value of accelerometer ODR on the GP side
(defined through the ODR_XL[3:0] bits in CTRL1_XL register), as described in the following table.
Table 9. OIS chain (XL ODR = 6.66 kHz) - Accelerometer bandwidth selection in Mode 4
A detailed description of Mode 4 connection mode is provided in Section 7 Mode 3 and Mode 4 - Auxiliary SPI
modes.
acc(tn)
ACCELERATION
acc(tn-1)
HP_EN_G Digital
LPF1_SEL_G
FIFO
LP Filter
ADC 0
LPF2
Digital 0
HP Filter 1 Digital
LP Filter 1
LPF1
ODR_G[3:0]
SPI/I2C
FTYPE[1:0]
The digital HP filter can be enabled by setting the HP_EN_G bit of the CTRL7_G register to 1. The digital HP filter
cutoff frequency can be selected through the field HPM_G[1:0] of the CTRL7_G register, according to the table
below.
Note: The embedded HP filter is available in High-Performance mode only. If the gyroscope is configured in Low-
Power / Normal mode, the high-pass filter is bypassed regardless of the configuration of the HP_G_EN bit of
CTRL7_G register.
00 0.016
01 0.065
10 0.260
11 1.040
The digital LPF1 filter can be enabled by setting the LPF1_SEL_G bit of CTRL4_C register to 1 and its bandwidth
can be selected through the field FTYPE_[1:0] of the CTRL6_C register.
Note: The digital LPF1 filter is available in High-Performance mode only. If the gyroscope is configured in Low-
Power / Normal mode, the LPF1 filter is bypassed regardless of the configuration of the LPF1_SEL_G bit of
CTRL4_C register.
The digital LPF2 filter cannot be configured by the user (regardless of the selected power mode) and its cutoff
frequency depends on the selected gyroscope ODR. When the gyroscope ODR is equal to 6.66 kHz, the LPF2
filter is bypassed.
The overall gyroscope bandwidth for different configurations of the LPF1_SEL_G bit of the CTRL4_C register and
FTYPE_[1:0] of the CTRL6_C register is summarized in the following table.
Gyroscope ODR [Hz] LPF1_SEL_G FTYPE[1:0] Cutoff [Hz] (Phase delay @ 20 Hz)
0 - 4
1 00 4
12.5 1 01 4
1 10 4
1 11 4
0 - 8
1 00 8
26 1 01 8
1 10 8
1 11 8
0 - 17
1 00 17 (144°)
52 1 01 17 (146°)
1 10 17 (149°)
1 11 17 (142°)
0 - 33
1 00 33 (75°)
104 1 01 33 (77°)
1 10 33 (79°)
1 11 33 (73°)
0 - 67
1 00 67 (40°)
208 1 01 67 (42°)
1 10 67 (45°)
1 11 67 (39°)
0 - 137
1 00 138 (23°)
1 10 121 (28°)
1 11 138 (21°)
0 - 312
1 00 245 (14°)
1 10 155 (19°)
1 11 293 (13°)
0 - 988
1 00 315 (10°)
1 10 168 (15°)
1 11 505 (8°)
Gyroscope ODR [Hz] LPF1_SEL_G FTYPE[1:0] Cutoff [Hz] (Phase delay @ 20 Hz)
0 - 1161
1 00 343 (8°)
1 10 172 (12°)
1 11 925 (6°)
0 - 1250
1 00 351 (7°)
1 10 173 (11°)
1 11 937 (5°)
If Mode 3 or Mode 4 is enabled, the gyroscope digital chain becomes the one shown in Figure 6. Gyroscope
digital chain - Mode 3 and Mode 4. In this configuration, two different data chains are available:
• The GP (General Purpose) chain, where the gyroscope data are provided to the primary I2C /SPI with an
ODR selectable from 12.5 Hz up to 6.66 kHz.
• The OIS chain, for control loop stability, where the gyroscope data are provided to the auxiliary SPI with an
ODR fixed at 6.66 kHz.
In Mode 3/4, the LPF2 filter is dedicated to the GP chain only; the total bandwidth on the GP side depends on the
gyroscope ODR value, as shown in Table 12. GP chain - Gyroscope overall bandwidth selection in Mode 3/4.
12.5 4
26 8
52 17
104 33
208 67
416 137
833 312
1666 988
3333 1161
6666 1250
Digital FIFO
HP_EN_G
LP Filter
ADC 0 LPF2
Digital
HP Filter 1
ODR_G[3:0]
SPI/I2C
Digital
HP_EN_OIS
LP Filter
1 LPF1
ODR Gyro
SPI_Aux @6.6 kHz
0
FTYPE[1:0]_OIS
The digital HP filter is shared between the GP and OIS chains but it can be applied to only one chain at a time:
• If bit HP_EN_G of the CTRL7_G register is set to 1, the HP filter is applied to the GP chain only, regardless
of the value of the HP_EN_OIS bit of the CTRL2_OIS register;
• If bit HP_EN_G is set to 0 and bit HP_EN_OIS is set to 1, the HP filter is applied to the OIS chain.
The digital HPF cutoff frequency on the OIS chain can be selected through the field HPM_[1:0]_OIS of
CTRL2_OIS, according to the table below.
Table 13. OIS chain - Gyroscope digital HP filter cutoff selection in Mode 3/4
00 0.016
01 0.065
10 0.260
11 1.040
When the auxiliary SPI is enabled, the LPF1 digital low-pass filter is available on the OIS chain only. In this case,
the OIS chain overall bandwidth can be selected through the FTYPE_[1:0]_OIS field of the CTRL2_OIS register,
as shown in Table 14. OIS chain (Gyro ODR = 6.66 kHz) - Gyroscope overall bandwidth selection (Mode 3/4).
Table 14. OIS chain (Gyro ODR = 6.66 kHz) - Gyroscope overall bandwidth selection (Mode 3/4)
00 351 Hz (7°)
01 237 Hz (9°)
10 173 Hz (11°)
11 937 Hz (5°)
Note: The digital LPF1 filter is not available on the gyroscope GP chain when Mode 3/4 is enabled. The
recommendation is to avoid using the LPF1 filter when Mode 3/4 is intended to be used.
A detailed description of Mode 3 connection mode is provided in Section 7 Mode 3 and Mode 4 - Auxiliary SPI
modes.
Table 15. Accelerometer turn-on/off time in Mode 1/2/3 (LPF2 and HP disabled)
52 (High-Performance) 1 1
104 (High-Performance) 1 2
208 (High-Performance) 1 2
416 (High-Performance) 1 2
833 (High-Performance) 1 2
1666 (High-Performance) 2 2
3333 (High-Performance) 3 4
6666 (High-Performance) 13 13
When the ISM330DLC is configured in Mode 4, the maximum overall settling time in order to switch
accelerometer power modes or accelerometer ODR on the GP chain is still the one shown in Table
15. Accelerometer turn-on/off time in Mode 1/2/3 (LPF2 and HP disabled); the maximum settling time for the OIS
chain is shown in the right column of Table 9. OIS chain (XL ODR = 6.66 kHz) - Accelerometer bandwidth
selection in Mode 4.
Turn-on/off time has to be considered also for the gyroscope sensor when switching its modes or when the
gyroscope ODR is changed.
When the ISM330DLC is configured in Mode 1/2, the maximum overall turn-on/off time (with HP filter disabled) in
order to switch gyroscope power modes or gyroscope ODR is shown in Table 17. Gyroscope turn-on/off time in
Mode 1/2 (HP disabled).
Note: The gyroscope ODR timing is not impacted by power mode changes (a new configuration is effective after
the completion of the current period).
Power-Down Sleep 70 ms
12.5 Hz 2
26 Hz 3
52 Hz 3
104 Hz 3
208 Hz 3
416 Hz 3
833 Hz 3
1.66 kHz 135
3.33 kHz 270
6.66 kHz 540
Table 19. Gyroscope samples to be discarded in Mode 1/2 (LPF1 enabled) for all ODRs
00 2
01 2
12.5 Hz
10 2
11 2
00 3
01 3
26 Hz
10 3
11 3
00 3
01 3
52 Hz
10 3
11 3
00 4
01 4
104 Hz
10 4
11 4
00 4
01 4
208 Hz
10 5
11 4
00 5
01 6
416 Hz
10 6
11 5
00 7
01 8
833 Hz
10 9
11 6
00 135
01 135
1.66 kHz
10 135
11 135
00 270
01 270
3.33 kHz
10 270
11 270
00 540
01 540
6.66 kHz
10 540
11 540
When the ISM330DLC is configured in Mode 3/4, the maximum overall turn-on time in order to switch gyroscope
power modes or gyroscope ODR on the GP chain is still the one shown in Table 17. Gyroscope turn-on/off time in
Mode 1/2 (HP disabled) and Table 18. Gyroscope samples to be discarded in Mode 1/2 (LPF1 disabled) (HP and
LPF1 disabled case); the maximum turn-on time for the OIS chain is given in Table 20. OIS chain (Gyro ODR =
6.66 kHz) - Gyroscope turn-on/off time in Mode 3/4.
Table 20. OIS chain (Gyro ODR = 6.66 kHz) - Gyroscope turn-on/off time in Mode 3/4
00 27
01 36
10 48
11 19
Note: The GYRO_SETTLING bit in the STATUS_REG/STATUS_SPIAux register is equal to 1 when the gyroscope
OIS chain is in settling phase. The data read during this settling data are not valid: the recommendation is to
check the status of this bit to understand when valid data are available in order to minimize the turn-on time.
Enable and then disable First sample correct First sample correct
Gyroscope
Mode 3/4, without ODR Gyroscope (Gyroscope switches to (Gyroscope switches to
Low-Power / Normal change on GP side High-Performance) Low-Power / Normal)
See Table 15.: High
See Table 15.: Low Performance to Low-
Enable and then disable Power / Normal mode to Power / Normal mode
Accelerometer
Mode 4, without ODR Accelerometer High-Performance case case
Low-Power / Normal change on GP side (Accelerometer switches (Accelerometer comes
to High-Performance) back to Low-Power /
Normal)
Note: When Mode 3 is enabled, only the gyroscope OIS chain is turned-on: since the accelerometer OIS chain is
not considered, the accelerometer GP chain is not impacted by Mode 3 enable.
The gyroscope GP and the accelerometer GP settling time are independent of each other. An ODR or power
mode change of one sensor does not affect the settling of the other one.
Each enable/disable of an OIS chain event can be detected from the GP side by reading the OIS_EN_SPI2 bit in
the CTRL1_OIS register. This register is read-only when accessed from the GP side.
To turn on the gyroscope and gather angular rate data through the primary I2C / SPI interface, it is necessary to
select one of the operating modes through the CTRL2_G.
The following general-purpose sequence can be used to configure the gyroscope:
DATA
DRDY
DATA READ
BLE = 0 BLE = 1
Table 24. Output data registers content vs. angular rate (FS_G = ±250 dps)
BLE = 0 BLE = 1
000 No rounding
001 Accelerometer only
010 Gyroscope only
011 Gyroscope + Accelerometer
Edge-sensitive trigger mode, when enabled, acts only on the gyroscope output registers. The DRDY_G is related
only to downsampled data, while the accelerometer output registers and DRDY_XL are updated according to
ODR_XL. If the DEN_XL_EN bit is set to 1, the accelerometer sensor is downsampled too. In this case, the
gyroscope and accelerometer have to be set in combo mode at the same ODR. The accelerometer standalone
mode could be used by setting the gyroscope in Power-Down. In this case, DRDY_XL relates to downsampled
data only.
Please note that the DEN trigger is internally latched before the update of the data registers: if a trigger occurs
after this event, DEN will be acknowledged in the next ODR.
There are three possible configurations for the edge-sensitive trigger in FIFO, described below:
1. Only gyroscope in trigger mode but not saved in FIFO: in this case, FIFO is related only to the
accelerometer and works as usual.
2. Only gyroscope in trigger mode and saved in FIFO: in this case the gyroscope decimation bits
DEC_FIFO_GYRO [2:0] of the FIFO_CTRL3 register have to be set to 001 (gyroscope sensor in FIFO
without decimation). Doing this, FIFO is driven by an external trigger. With this configuration, since also
accelerometer data is written when the trigger occurs, possible repetition or loss of data for the
accelerometer may occur.
3. Gyroscope and accelerometer in trigger mode and saved in FIFO: this configuration can be used by
setting DEN_XL_EN to 1 and the gyroscope and accelerometer decimation bits DEC_FIFO_GYRO [2:0] and
DEC_FIFO_XL [2:0] of the FIFO_CTRL3 register to 001 (gyroscope and accelerometers in FIFO without
decimation). In this case, data of both sensors are written in FIFO when trigger occurs.
In the example shown below, the FIFO has been configured to store both the gyroscope data and the
accelerometer data in the FIFO buffer; when the DEN signal toggles, the data are written to FIFO on the rising
edge.
1. Write 09h to FIFO_CTRL3 // Enable gyroscope and accelerometer in FIFO (no decimation)
2. Write 26h to FIFO_CTRL5 // Set FIFO in Continuous mode, FIFO ODR = 104 Hz
// Enable the edge-sensitive trigger
3. Write 80h to CTRL6_C
// INT2 pin is switched to input mode (DEN signal)
4. Write 80h to CTRL4_C // Extend DEN functionality to accelerometer sensor
5. Write 40h to CTRL1_XL // Turn on the accelerometer: ODR_XL = 104 Hz, FS_XL = ±2 g
// Turn on the gyroscope
6. Write 4Ch to CTRL2_G
// ODR_G = 104 Hz, FS_G = ±2000 dps
When the level-sensitive trigger mode is enabled, the DEN signal can also be used to filter the data-ready signal
on the INT1 pin. INT1 will show data-ready information only when the DEN pin is in the active state. To do this,
the bit DEN_DRDY_INT1 of the CTRL4_C register must be set to 1. The interrupt signal can be latched or pulsed
according to the DRDY_PULSED bit of the DRDY_PULSE_CFG register.
Figure 10. Level-sensitive trigger mode, DEN active low, DEN_DRDY on INT1 shows an example of data-ready
on INT1 when the DEN level is low (active state).
Figure 10. Level-sensitive trigger mode, DEN active low, DEN_DRDY on INT1
When the level-sensitive latched mode is enabled and the bit DEN_DRDY_INT1 of the CTRL4_C register is set to
1, a pulse is generated on INT1 pin in corresponding to the availability of the first sample generated after the DEN
pulse occurrence (see Figure 12. Level-sensitive latched mode, DEN active low, DEN_DRDY on INT1).
Figure 12. Level-sensitive latched mode, DEN active low, DEN_DRDY on INT1
5 Interrupt generation
In the ISM330DLC device the interrupt generation is based on accelerometer data only, so, for interrupt-
generation purposes, the accelerometer sensor has to be set in an active operating mode (not in Power-Down);
the gyroscope sensor can be configured in Power-Down mode since it’s not involved in interrupt generation.
The interrupt generator can be configured to detect:
• Free-fall;
• Wake-up;
• 6D/4D orientation detection;
• Single-tap and double-tap sensing;
• Activity/Inactivity recognition;
• Relative tilt;
• Timestamp.
All these interrupt signals, together with the FIFO interrupt signals, can be independently driven to the INT1 and
INT2 interrupt pins or checked by reading the dedicated source register bits.
The H_LACTIVE bit of the CTRL3_C 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 interrupt condition is reached.
The PP_OD bit of CTR3_C allows changing the behavior of the interrupt pins 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 TAP_CFG allows applying the latched mode to the interrupt signals. 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.
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
If multiple interrupt signals are routed on the same pin (INTx), the logic level of this pin is the “OR” combination of
the selected interrupt signals. In order to know which event has generated the interrupt condition, the related
source registers have to be read: WAKE_UP_SRC, D6D_SRC, TAP_SRC, FUNC_SRC1 and FUNC_SRC2.
The INT2_on_INT1 pin of CTRL4_C register allows driving all the enabled interrupt signals in logic “OR” on the
INT1 pin (by setting this bit to 1). When this bit is set to 0, the interrupt signals are divided between the INT1 and
INT2 pins.
The basic interrupts (6D/4D, free-fall, wake-up, tap, inactivity) have to be enabled by setting the
INTERRUPTS_ENABLE bit in the TAP_CFG register.
FF Duration
Z
Y + FF Threshold
0g FREE-FALL
ZONE
- FF Threshold
X
FF Interrupt
The free-fall interrupt signal can be enabled by setting the INTERRUPTS_ENABLE bit in the TAP_CFG register to
1 and can be driven to the two interrupt pins by setting the INT1_FF bit of the MD1_CFG register to 1 or the
INT2_FF bit of the MD2_CFG register to 1; it can also be checked by reading the FF_IA bit of the
WAKE_UP_SRC register.
If latched mode is disabled (LIR bit of TAP_CFG 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 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 FREE_FALL register used to configure the threshold parameter; the unsigned threshold value is related to
the value of the FF_THS[2:0] field value as indicated in Table 31. Free-fall threshold LSB value. The values given
in this table are valid for each accelerometer full-scale value.
000 156
001 219
010 250
011 312
100 344
101 406
110 469
111 500
Duration time is measured in N/ODR_XL, where N is the content of the FF_DUR[5:0] field of the FREE_FALL /
WAKE_UP_DUR registers and ODR_XL is the accelerometer data rate.
A basic SW routine for free-fall event recognition is given below.
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 like this
to ignore events that are shorter than 6/ODR_XL = 6/412 Hz ~= 15 msec in order to avoid false detections.
acc(tn)
ACCELERATION
acc(tn-1)
+ WK Threshold
- WK Threshold
WK Interrupt
If latch mode is disabled (LIR bit of TAP_CFG is set to 0), the interrupt signal is automatically reset when the
filtered data falls below the threshold. If latch mode is enabled and the wake-up interrupt signal is driven to the
interrupt pins, once a wake-up event has occurred and the interrupt pin is asserted, it must be reset by reading
the WAKE_UP_SRC register. If the latch mode is enabled but the interrupt signal is not driven to the interrupt
pins, the latch feature does not take effect.
A basic SW routine for wake-up event recognition using the high-pass digital filter is given below.
Since the duration time is set to zero, the wake-up interrupt signal is generated for each X,Y,Z filtered data
exceeding the configured threshold. The WK_THS field of the WAKE_UP_THS register is set to 000010b,
therefore the wake-up threshold is 62.5 mg (= 2 * FS_XL / 26).
Since the wake-up functionality is implemented using the slope/high-pass digital filter, it is necessary to consider
the settling time of the filter just after this functionality is enabled. For example, when using the slope filter (but a
similar consideration can be done for the high-pass digital filter usage) the wake-up functionality is based on the
comparison of the threshold value with half of the difference of the acceleration of the current (x,y,z) sample and
the previous one (refer to Section 3.7.1 Accelerometer slope filter).
At the very first sample, the slope filter output is calculated as half of the difference of the current sample [e.g.
(x,y,z) = (0,0,1g)] with the previous one which is (x,y,z) = (0,0,0) since it doesn't exist. For this reason, on the z-
axis the first output value of the slope filter is (1g - 0)/2 = 500 mg and it could be higher than the threshold value in
which case a spurious interrupt event is generated. The interrupt signal is kept high for 1 ODR then it goes low.
In order to avoid this spurious interrupt generation, multiple solutions are possible. Hereafter are three alternative
solutions (for the slope filter case):
a. Ignore the first generated wake-up signal;
b. Add a wait time higher than 1 ODR before driving the interrupt signal to the INT1/2 pin;
c. Initially set a higher ODR (833 Hz) so the first 2 samples are generated in a shorter period of time, reducing the
slope filter latency time, then set the desired ODR (e.g. 12.5 Hz) and drive the interrupt signal on the pin, as
indicated in the procedure below:
b7 b6 b5 b4 b3 b2 b1 b0
DEN_
D6D_IA ZH ZL YH YL XH XL
DRDY
• D6D_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 SIXD_THS[1:0] bits of the TAP_THS_6D register are used to select the threshold value used to detect the
change in device orientation. The threshold values given in Table 33. Threshold for 4D/6D function are valid for
each accelerometer full-scale value.
00 80
01 70
10 60
11 50
The low-pass filter LPF2 can also be used in 6D functionality by setting the LOW_PASS_ON_6D bit of the
CTRL8_XL register to 1. If Mode 4 is enabled, the LFP2 is not applied to the 6D feature, regardless of the value of
the LOW_PASS_ON_6D bit.
This interrupt signal can be enabled by setting the INTERRUPTS_ENABLE bit in the TAP_CFG register to 1 and
can be driven to the two interrupt pins by setting to 1 the INT1_6D bit of the MD1_CFG register or the INT2_6D bit
of the MD2_CFG register; it can also be checked by reading the D6D_IA bit of the D6D_SRC register.
If latched mode is disabled (LIR bit of TAP_CFG is set to 0), the interrupt signal is active only for 1/ODR_XL[s]
then it is automatically disserted (ODR_XL 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 reading of the D6D_SRC register clears the request and the device is ready to recognize a
different orientation. 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 16. 6D recognized orientations, the content of the
D6D_SRC register for each position is shown in Table 34. D6D_SRC register in 6D positions.
Z Z
Y Y
X X
(a) (b)
Z Z
Y Y
X X
(c) (d)
Z Z
Y Y
X X
(e) (f)
Case D6D_IA ZH ZH YH YL XH XL
(a) 1 0 0 1 0 0 0
(b) 1 0 0 0 0 0 1
(c) 1 0 0 0 0 1 0
(d) 1 0 0 0 1 0 0
(e) 1 1 0 0 0 0 0
(f) 1 0 1 0 0 0 0
This function can be fully programmed by the user in terms of expected amplitude and timing of the slope data by
means of a dedicated set of registers.
Single and double-tap recognition work independently of the selected output data rate. Recommended
accelerometer ODRs for these functions are 416 Hz and 833 Hz.
In order to enable the single-tap and double-tap recognition functions it is necessary to set the
INTERRUPTS_ENABLE bit in TAP_CFG register to 1.
Slope
SHOCK SHOCK
+ Tap Threshold
- Tap Threshold
Interrupt
(a) (b)
Slope
+ Tap Threshold
- Tap Threshold
SHOCK SHOCK
QUIET DURATION
QUIET
(a)
Interrupt
SHOCK
Interrupt
Slope
+ Tap Threshold
- Tap Threshold
SHOCK SHOCK
QUIET QUIET
(a)
SINGLE
TAP
Interrupt
SHOCK SHOCK
QUIET DURATION
QUIET
(b)
DOUBLE
TAP Interrupt
Tap interrupt signals can also be checked by reading the TAP_SRC (1Ch) register, described in Table
35. 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 the
WAKE_UP_THS register to 0, only the single-tap recognition is enabled: double-tap recognition is disabled and
cannot be detected. When the SINGLE_DOUBLE_TAP is set to 1, both single and double-tap recognition are
enabled.
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, the latched mode is
applied to the single-tap interrupt signal; when it is set to 1, the latched mode is applied to the double-tap interrupt
signal only. The latched interrupt signal is kept active until the TAP_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.
In this example the TAP_THS field of the TAP_THS_6D register is set to 01001b, therefore the tap threshold is
562.5 mg (= 9 * FS_XL / 25).
The SHOCK field of the INT_DUR2 register is set to 10b: an interrupt is generated when the slope data exceeds
the programmed threshold, and returns below it within 38.5 ms (= 2 * 8 / ODR_XL) corresponding to the Shock
time window.
The QUIET field of the INT_DUR2 register is set to 01b: since latched mode is disabled, the interrupt is kept high
for the duration of the Quiet window, therefore 9.6 ms (= 1 * 4 / ODR_XL).
In this example the TAP_THS field of the TAP_THS_6D register is set to 01100b, therefore the tap threshold is
750 mg (= 12 * FS_XL / 25).
For interrupt generation, during the first and the second tap the slope data must return below the threshold before
the Shock window has expired. The SHOCK field of the INT_DUR2 register is set to 11b, therefore the Shock time
is 57.7 ms (= 3 * 8 / ODR_XL).
For interrupt generation, after the first tap recognition there must not be any slope 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_DUR2 register is set to 11b, therefore the Quiet time is 28.8 ms
(= 3 * 4 / ODR_XL).
For the maximum time between two consecutive detected taps, the DUR field of the INT_DUR2 register is set to
0111b, therefore the Duration time is 538.5 ms (= 7 * 32 / ODR_XL).
In the ISM330DLC device the Activity/Inactivity recognition function can be implemented using either the slope
filter (see Section 3.7.1 Accelerometer slope filter for more details) or the high-pass digital filter, as illustrated in
Figure 2. Accelerometer filtering chain (Mode 1/2/3). The filter to be applied can be selected using the
SLOPE_FDS bit of the TAP_CFG register: if this bit is set to 0 (default value), the slope filter is used; if it is set to
1, the high-pass digital filter is used. If Mode 4 is enabled, the Activity/Inactivity recognition feature is implemented
using the slope filter, regardless of the value of SLOPE_FDS bit.
This function can be fully programmed by the user in terms of expected amplitude and timing of the filtered data
by means of a dedicated set of registers (Figure 20. Activity/Inactivity recognition (using the slope filter)).
The unsigned threshold value is defined using the WK_THS[5:0] bits of the WAKE_UP_THS register; the value of
1 LSB of these 6 bits depends on the selected accelerometer full scale: 1 LSB = (FS_XL)/(26). The threshold is
applied to both positive and negative filtered data.
When a certain number of consecutive X,Y,Z filtered data is smaller than the configured threshold, the ODR_XL
[3:0] bits of the CTRL1_XL register are bypassed (Inactivity) and the accelerometer is internally set to 12.5 Hz
although the content of CTRL1_XL is left untouched. The gyroscope behavior varies according to the
configuration of the INACT_EN bits of the TAP_CFG register. The duration of the Inactivity status to be
recognized is defined by the SLEEP_DUR[3:0] bits of the WAKE_UP_DUR register: 1 LSB corresponds to 512/
ODR_XL time, where ODR_XL is the accelerometer output data rate.
When the Inactivity status is detected, the interrupt is set high for 1/ODR_XL[s] period then it is automatically
deasserted.
When a single sample of X,Y,Z filtered data on one axis becomes bigger than the threshold, the CTRL1_XL
register settings are immediately restored (Activity) and the gyroscope is restored to the previous state.
When the Activity status is detected, the interrupt is set high for 1/ODR_XL[s] period then it is automatically
deasserted.
Once the Activity/Inactivity detection function is enabled, the status can be driven to the two interrupt pins by
setting to 1 the INT1_INACT_STATE bit of the MD1_CFG register or the INT2_INACT_STATE bit of the
MD2_CFG register; it can also be checked by reading the SLEEP_STATE_IA bit of the WAKE_UP_SRC register.
Slope
+ WK Threshold
- WK Threshold
SLEEP_DUR
Interrupt
In this example the WK_THS field of the WAKE_UP_THS register is set to 000010b, therefore the Activity/
Inactivity threshold is 62.5 mg (= 2 * FS_XL / 26).
Before Inactivity detection, the X,Y,Z slope 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 0010b, corresponding to
4.92 s (= 2 * 512 / ODR_XL). After this period of time has elapsed, the accelerometer ODR is internally set to
12.5 Hz and the gyroscope is internally set to Power-Down mode.
The Activity status is detected and the CTRL1_XL register settings immediately restored and the gyroscope is
turned on if the slope data of (at least) one axis are bigger than the threshold.
START
POSITION FINAL START
#0 POSITION POSITION
#0 #1
35º 35º
35º
35º
TILT
DETECTION
INTERRUPT
This interrupt signal can be driven to the two interrupt pins by setting to 1 the INT1_TILT bit of the MD1_CFG
register or the INT2_TILT bit of the MD2_CFG register; it can also be checked by reading the TILT_IA bit of the
FUNC_SRC1 register.
If latched mode is disabled (LIR bit of TAP_CFG is set to 0), the interrupt signal generated by the tilt function is
pulsed: the duration of the pulse observed on the interrupt pins is about 150 µs; the duration of the pulse
observed on the TILT_IA bit of FUNC_SRC1 register is 1/26 Hz.
If latched mode is enabled (LIR bit of TAP_CFG is set to 1) and the interrupt signal is driven to the interrupt pins,
once a tilt is detected, a reading of the FUNC_SRC1 register clears the request on both the pins and the TILT_IA
bit of FUNC_SRC1 register, and the device is ready to recognize the next tilt event. If latched mode is enabled but
the interrupt signal is not driven to the interrupt pins, the interrupt signal observed on the TILT_IA bit of the
FUNC_SRC1 register is pulsed, with a fixed duration of 1/26 Hz.
The tilt function works at 26 Hz, so the accelerometer ODR must be set at a value of 26 Hz or higher.
Hereafter a basic SW routine which shows how to enable the tilt detection function:
5.9 Timestamp
Together with sensor data the ISM330DLC device can provide timestamp information.
If both the accelerometer and the gyroscope are in Power-Down mode, the timestamp counter does not work.
To enable this functionality the TIMER_EN bit of the CTRL10_C register has to be set to 1: the time step count is
given by the concatenation of the TIMESTAMP_REG2 & TIMESTAMP_REG1 & TIMESTAMP_REG0 registers
and is represented as a 24-bit unsigned number.
The timestamp resolution can be configured using the TIMER_HR bit of the WAKE_UP_DUR register: when this
bit is set to 0, 1 LSB of the time step count corresponds to 6.4 ms (low-resolution mode); when this bit is set to 1,
1 LSB of the time step count corresponds to 25 µs (high-resolution mode).
When the maximum value 16777215 LSB (corresponding to FFFFFFh) is reached, the counter is automatically
reset to 000000h and continues to count. The timer count can be reset to zero at any time by writing the reset
value AAh in the TIMESTAMP_REG2 register.
An interrupt is generated around 1.638 seconds before timer saturation in both high-resolution mode (when the
timer step count reaches the value FF0000h) and low-resolution mode (when the timer step count reaches the
value FFFF00h). This interrupt signal can be driven to the INT1 pin by setting the INT1_TIMER bit of the
MD1_CFG register to 1. Once the interrupt pin is asserted, it must be reset to 0 by writing AAh in the
TIMESTAMP_REG2 register (the timer step count will also be reset).
The timestamp count can be stored in FIFO as a fourth data set (see Section 8.8 Timestamp data in FIFO for
details).
The timestamp resolution has to be set before enabling the timestamp functionality; a basic SW routine is as
follows:
When switching from a low timestamp resolution to a high resolution, the timer count must be reset as indicated in
the example below:
The hardware flexibility of the ISM330DLC allows connecting the pins with different mode connections to external
sensors to expand functionalities such as adding a sensor hub. When sensor hub mode (Mode 2) is enabled, both
the primary I2C/SPI (3- and 4-wire) slave interface and the I2C master interface for the connection of external
sensors are available. Mode 2 connection mode is described in detail in the following paragraphs.
SDx SDA
Vdd_IO
R 1.5 kOhm
SCx SCL
I 2C MASTER I 2C SLAVE
External trigger is optional
b7 b6 b5 b4 b3 b2 b1 b0
FUNC
X 0 X X X X X
_EN
• FUNC_EN must be set to 1 in order to enable the embedded functionalities of the ISM330DLC (tilt, ironing).
b7 b6 b5 b4 b3 b2 b1 b0
PASS_
DRDY_ START _ PULL_ MASTER
X 0 THROUGH X
ON_INT1 CONFIG UP_EN _ON
_MODE
• DRDY_ON_INT1 bit has to be set to 1 to drive the I2C master Data-Ready signal on the INT1 pin
(corresponding to the behavior of the SENSORHUB_END_OP bit of the FUNC_SRC1 register). Please refer
to Section 6.2.3 FUNC_SRC1 (53h) for more details about the SENSORHUB_END_OP bit. If the
DRDY_PULSED bit of the DRDY_PULSE_CFG register is set to 1, the I2C master data-ready signal is
pulsed with a duration of 150 µs.
The START_CONFIG bit selects the sensor hub trigger signal.
• When this bit is set to 0, the accelerometer sensor has to be active (not in Power-Down mode) and the
sensor hub trigger signal is the accelerometer data-ready signal, with a frequency corresponding to the
accelerometer ODR up to 104 Hz.
• When this bit is set to 1, at least one sensor between the accelerometer and the gyroscope has to be active
and the sensor hub trigger signal is the INT2 pin; in fact, when both the MASTER_ON bit and
START_CONFIG bit are set to 1, the INT2 pin is configured as an input signal. In this case, the INT2 pin has
to be connected to the data-ready pin of the external sensor (Figure 22. External sensor connections in
Mode 2) in order to trigger the reading/writing operations on the external sensor registers. The sensor hub
interrupt from INT2 is ‘high-level triggered’ (not programmable).
Note: In case of external trigger signal usage (START_CONFIG=1), if the INT2 pin is connected to the Data-
Ready pin of the external sensor (Figure 22. External sensor connections in Mode 2) and the latter is in Power-
Down mode, then no data-ready signal can be generated by the external sensor. For this reason, the initial
configuration of the external sensor’s register has to be performed using the internal trigger signal
(START_CONFIG=0). After the external sensor is activated and the data-ready signal is available, the external
trigger signal can be used by switching the START_CONFIG bit to 1.
• PULL_UP_EN bit enables/disables the internal pull-up on the auxiliary I2C line. When this bit is set to 0, the
internal pull-up is disabled and the external pull-up resistors on the SDx/SCx pins are required, as shown in
Figure 22. External sensor connections in Mode 2. When this bit is set to 1, the internal pull-up is enabled
and the external pull-up resistors on the SDx/SCx pins are not required.
• PASS_THROUGH_MODE bit is used to enable/disable the I2C interface pass-through. When this bit is set
to 1, the main I2C line (e.g. connected to an external microcontroller) is short-circuited with the auxiliary one
in order to implement a direct access to the external sensor registers. See Section 6.3 Sensor hub pass-
through feature for details.
• MASTER_ON bit has to be set to 1 to enable the auxiliary I2C master of the ISM330DLC device (sensor hub
mode).
b7 b6 b5 b4 b3 b2 b1 b0
SENSOR
X X X X X X X HUB_
END_OP
• SENSORHUB_END_OP bit reports the status of the I²C master: during the idle state of the I²C master, this
bit is equal to 1; it goes to 0 during I²C master read/write operations.
When a sensor hub routine is completed, this bit automatically goes to 1 and the external sensor data are
available to be read from the SENSORHUBx_REG registers (depending on the configuration of the
SLVx_ADD, SLVx_SUBADD, SLAVEx_CONFIG registers).
Note: The SENSORHUB_END_OP bit is cleared by reading the FUNC_SRC1 register if the LIR bit in
TAP_CFG register is set to 1, otherwise it is cleared only during an I²C master read or write operation.
Information about the status of the I²C master can be driven to the INT1 interrupt pin by setting the
DRDY_ON_INT1 bit of the MASTER_CONFIG register to 1: if the LIR bit of the TAP_CFG register is set to
0, a pulsed interrupt signal (with typical pulse duration of about 150 µs) is generated at the rising edge of the
SENSORHUB_END_OP signal. If latched mode is enabled (LIR bit is set to 1) and the interrupt signal is
driven to the interrupt pin INT1, this interrupt signal is cleared by reading the FUNC_SRC1 register.
b7 b6 b5 b4 b3 b2 b1 b0
• SLAVEx_NACK bits are set to 1 if a “not acknowledge” event happens during the communication with the
corresponding slave x.
b7 b6 b5 b4 b3 b2 b1 b0
Slave0 _add6 Slave0 _add5 Slave0 _add4 Slave0 _add3 Slave0 _add2 Slave0 _add1 Slave0 _add0 rw_0
• Slave0_add[6:0] bits are used to indicate the I2C slave address of the first external sensor.
• rw_0 bit configures the read/write operation to be performed on the first external sensor (0: write operation;
1: read operation). The read/write operation is executed when the next sensor hub trigger event occurs.
When the rw_0 bit is set to 0 (write operation selected), the content of the SENSORHUBx_REG registers is
not updated.
b7 b6 b5 b4 b3 b2 b1 b0
Slave0 _reg7 Slave0 _reg6 Slave0 _reg5 Slave0 _reg4 Slave0 _reg3 Slave0 _reg2 Slave0 _reg1 Slave0 _reg0
• Slave0_reg[7:0] bits are used to indicate the address of the register of the first external sensor to be written
(if the rw_0 bit of the SLV0_ADD register is set to 0) or the address of the first register to be read (if the rw_0
bit is set to 1).
b7 b6 b5 b4 b3 b2 b1 b0
• Slave0_rate[1:0] bits are used to define the decimation factor applied to read operations on the first external
sensor starting from the sensor hub trigger:
– 00: no decimation
– 01: update every 2 sensor hub trigger events
– 10: update every 4 sensor hub trigger events
– 11: update every 8 sensor hub trigger events
• Aux_sens_on[1:0] bits have to be used to indicate the number of external sensors to be managed by the
sensor hub:
– 00: one external sensor
– 01: two external sensors
– 10: three external sensors
– 11: four external sensors
• Src_mode bit enables/disables source mode conditioned reading. When this bit is set to 1, source mode
conditioned reading is enabled; before proceeding with the reading of the register address indicated in the
SLV0_SUBADD register, the content of the register at the address specified in
b7 b6 b5 b4 b3 b2 b1 b0
Slave1 _add6 Slave1 _add5 Slave1 _add4 Slave1 _add3 Slave1 _add2 Slave1 _add1 Slave1 _add0 r_1
• Slave1_add[6:0] bits are used to indicate the I2C slave address of the second external sensor.
• r_1 bit enables/disables the read operation to be performed on the second external sensor (0: read
operation disabled; 1: read operation enabled). The read operation is executed when the next sensor hub
trigger event occurs.
b7 b6 b5 b4 b3 b2 b1 b0
Slave1 _reg7 Slave1 _reg6 Slave1 _reg5 Slave1 _reg4 Slave1 _reg3 Slave1 _reg2 Slave1 _reg1 Slave1 _reg0
• Slave1_reg[7:0] bits are used to indicate the address of the register of the second external sensor to be read
when the r_1 bit of SLV1_ADD register is set to 1.
b7 b6 b5 b4 b3 b2 b1 b0
• Slave1_rate[1:0] bits are used to define the decimation factor applied to read operations on the second
external sensor starting from the sensor hub trigger:
– 00: no decimation
– 01: update every 2 sensor hub trigger events
– 10: update every 4 sensor hub trigger events
– 11: update every 8 sensor hub trigger events
• write_once bit is used to limit the write operations on slave 0 to only one occurrence (avoiding to repeat the
same write operation multiple times). If this bit is not asserted, a write operation is triggered at each ODR.
Note: In order to enable the write_once feature, the field Aux_sens_on in the SLAVE0_CONFIG register must be
different than 00b (even if only slave 0 is used).
• Slave1_numop[2:0] bits are dedicated to define the number of consecutive read operations to be performed
on the second external sensor starting from the register address indicated in the SLV1_SUBADD register.
b7 b6 b5 b4 b3 b2 b1 b0
Slave2 _add6 Slave2 _add5 Slave2 _add4 Slave2 _add3 Slave2 _add2 Slave2 _add1 Slave2 _add0 r_2
• Slave2_add[6:0] bits are used to indicate the I2C slave address of the third external sensor.
• r_2 bit enables/disables the read operation to be performed on the third external sensor (0: read operation
disabled; 1: read operation enabled). The read operation is executed when the next sensor hub trigger event
occurs.
b7 b6 b5 b4 b3 b2 b1 b0
Slave2 _reg7 Slave2 _reg6 Slave2 _reg5 Slave2 _reg4 Slave2 _reg3 Slave2 _reg2 Slave2 _reg1 Slave2 _reg0
• Slave2_reg[7:0] bits are used to indicate the address of the register of the third external sensor to be read
when the r_2 bit of the SLV2_ADD register is set to 1.
b7 b6 b5 b4 b3 b2 b1 b0
• Slave2_rate[1:0] bits are used to define the decimation factor applied to read operations on the third external
sensor starting from the sensor hub trigger:
– 00: no decimation
– 01: update every 2 sensor hub trigger events
– 10: update every 4 sensor hub trigger events
– 11: update every 8 sensor hub trigger events
• Slave2_numop[2:0] bits are dedicated to define the number of consecutive read operations to be performed
on the third external sensor starting from the register address indicated in the SLV2_SUBADD register.
b7 b6 b5 b4 b3 b2 b1 b0
Slave3 _add6 Slave3 _add5 Slave3 _add4 Slave3 _add3 Slave3 _add2 Slave3 _add1 Slave3 _add0 r_3
• Slave3_add[6:0] bits are used to indicate the I2C slave address of the fourth external sensor.
• r_3 bit enables/disables the read operation to be performed on the fourth external sensor (0: read operation
disabled; 1: read operation enabled). The read operation is executed when the next sensor hub trigger event
occurs.
b7 b6 b5 b4 b3 b2 b1 b0
Slave3 _reg7 Slave3 _reg6 Slave3 _reg5 Slave3 _reg4 Slave3 _reg3 Slave3 _reg2 Slave3 _reg1 Slave3 _reg0
• Slave3_reg[7:0] bits are used to indicate the address of the register of the fourth external sensor to be read
when the r_3 bit of the SLV3_ADD register is set to 1.
b7 b6 b5 b4 b3 b2 b1 b0
• Slave3_rate[1:0] bits are used to define the decimation factor applied to the read operations on the fourth
external sensor starting from the sensor hub trigger:
– 00: no decimation
– 01: update every 2 sensor hub trigger events
– 10: update every 4 sensor hub trigger events
– 11: update every 8 sensor hub trigger events
• Slave3_numop[2:0] bits are dedicated to define the number of consecutive read operations to be performed
on the fourth external sensor starting from the register address indicated in the SLV3_SUBADD register.
b7 b6 b5 b4 b3 b2 b1 b0
• Slave_dataw[7:0] bits are dedicated, when the rw_0 bit of SLV0_ADD register is set to 0 (write operation), to
indicate the data to be written to the first external sensor at the address specified in the SLV0_SUBADD
register. During read operations (rw_0 = 1), this register is used if the source mode conditioned reading is
enabled (Src_mode bit = 1 in the SLAVE0_CONFIG register) and it indicates the address of the external
sensor register to be checked before proceeding with the read operation.
PASS_THROUGH_MODE bit
INT2
Some limitations must be considered when using the sensor hub and the pass-through feature. Three different
scenarios are possible:
1. The sensor hub is used with the START_CONFIG bit of the MASTER_CONFIG register set to 0 (internal
trigger) and the pass-through feature is not used: there is no limitation on INT2 pin usage.
2. The sensor hub is used with the START_CONFIG bit of the MASTER_CONFIG register set to 0 (internal
trigger) and the pass-through feature is used: the INT2 pin must be connected to GND; it is not possible to
switch to external trigger configuration (by setting the START_CONFIG bit to 1) and the INT2 pin cannot be
used for the digital interrupts. Specific procedures have to be applied to enable/disable the pass-through
feature: they are described in Section 6.3.1 Pass-through feature enable and in Section 6.3.2 Pass-through
feature disable.
3. The sensor hub is used with the START_CONFIG bit of the MASTER_CONFIG register set to 1 (external
trigger): the pass-through feature cannot be used; the INT2 pin has to be connected to the data-ready pin of
the external sensor (trigger signal) and the procedure below has to be executed to avoid conflicts with the
INT2 line:
a. Set either the TRIG_EN or LVL1_EN or LVL2_EN bit of the CTRL6_C register to 1 (to configure the
INT2 pin as input pin);
b. Configure the external sensors (do not use the pass-through);
c. Configure the sensor hub SLAVEx registers;
d. Set the START_CONFIG bit of the MASTER_CONFIG register to 1;
e. Set the MASTER_ON bit of the MASTER_CONFIG register to 1;
f. Reset to 0 the bit in the CTRL6_C register asserted in step a.
Examples of external sensor configurations without using the pass-through are given in Section 6.4 Sensor hub
mode example and Section 6.5.4 Ironing example.
0 0 No correction applied
0 1 Hard-iron only
X
No Distortion
Hard-Iron Distortion
In the ISM330DLC device, the 3x1 hard-iron vector containing the X, Y, Z magnetic offset values calculated by the
user have to be indicated in dedicated registers: the MAG_OFFX_L and MAG_OFFX_H registers are dedicated to
the X-axis offset, the MAG_OFFY_L and MAG_OFFY_H registers are dedicated to the Y-axis offset, the
MAG_OFFZ_L and MAG_OFFZ_H registers are dedicated to the Z-axis offset. These registers values are
expressed as a 16-bit word in two’s complement; the sensitivity [LSB/Gauss] to be applied to calculate the hard-
iron register values corresponds to that of the external magnetometer.
The hard-iron registers are accessible when the FUNC_CFG_EN bit of the FUNC_CFG_ACCESS register is set
to 1. In order to enable the hard-iron correction algorithm, it is necessary to set to 1 both the FUNC_EN bit of the
CTRL10_C register and the IRON_EN bit of the MASTER_CONFIG register (Table 54. Ironing configuration).
No Distortion
Soft-Iron Distortion
Y
In the ISM330DLC device, the 3x3 soft-iron transformation matrix calculated by the user has to be indicated in 9
dedicated registers: MAG_SI_XX, MAG_SI_XY, MAG_SI_XZ, MAG_SI_YX, MAG_SI_YY, MAG_SI_YZ,
MAG_SI_ZX, MAG_SI_ZY, MAG_SI_ZZ. These register values are expressed as an 8-bit word in sign-magnitude
format; for these registers 1 LSB corresponds to 1/8, so the matrix parameters calculated by the user must be
multiplied by 8 before writing them in the soft-iron registers.
The soft-iron registers are accessible when the FUNC_CFG_EN bit of the FUNC_CFG_ACCESS register is set to
1. In order to enable the soft-iron correction algorithm it is necessary to set to 1 the FUNC_EN bit of the
CTRL10_C register, the IRON_EN bit of the MASTER_CONFIG register and the SOFT_EN bit of the CTRL9_XL
register (Table 54. Ironing configuration).
If the soft-iron correction is enabled and the soft-iron registers still have the default zero value, then the
magnetometer calibrated data and the magnetometer uncalibrated data will also be equal to zero. As a
consequence, when the soft-iron correction is enabled, the soft-iron transformation matrix must be at least
initialized to the identity matrix multiplied by 8, setting the value of the MAG_SI_XX, MAG_SI_YY and
MAG_SI_ZZ registers to 08h.
Soft-iron
MAG UNCALIBRATED DATA:
SI(3x3) correction
(from reg 4Dh to reg 52h)
algorithm
SI(3x3) * [ M_raw(3x1) – HI(3x1) ]
CTRL9_XL SOFT_EN + HI(3x1)
−0.335605
HI 3x1 = 0.126487
−0.114722
These three offset values must be divided by the LIS2MDL sensitivity value (0.0015 gauss / LSB) in order the get
the LSB values to be written in the hard-iron correction registers (Table 55. Hard-iron register values).
MAG_OFFX_H = FFh
X -224 (FF20h)
MAG_OFFX_L = 20h
MAG_OFFY_H = 00h
Y 84 (0054h)
MAG_OFFY_L = 54h
MAG_OFFZ_H = FFh
Z -76 (FFB4h)
MAG_OFFZ_L = B4h
The code provided below gives a basic routine to configure the LIS2MDL external magnetometer sensor (refer to
the datasheet for additional details) in continuous mode, initialize the hard-iron and soft-iron correction registers
and read the magnetometer output registers. In this case, the pass-through feature is not used for the
magnetometer configuration.
The acquired magnetometer raw data are available in registers from address 66h (OUT_MAG_RAW_X_L) to 6Bh
(OUT_MAG_RAW_Z_L).
The magnetometer uncalibrated data (with soft-iron only applied) are available in registers from address 4Dh
(SENSORHUB13_REG) to 52h (SENSORHUB18_REG).
The magnetometer calibrated data, with both hard-iron and soft-iron correction, are available in registers from
address 2Eh (SENSORHUB1_REG) to 33h (SENSORHUB6_REG).
The Auxiliary SPI modes (Mode 3 and Mode 4) allow accessing the ISM330DLC from multiple external devices:
when one of these modes is enabled, both an I2C/SPI (3/4-wire) slave interface and an Auxiliary SPI (3/4-wire)
slave interface are available for connecting external devices.
When Mode 3 is enabled, the gyroscope OIS chain is activated; when Mode 4 is enabled, both the accelerometer
OIS chain and the gyroscope OIS chain are activated.
They can be used, for example, in applications requiring closed control loop. The device, through the dedicated
auxiliary SPI interface and a configurable signal processing path (with low latency and low noise) can provide
data for the control loop, while, at the same time, a second fully independent path can output data for other
application purposes.
I2C least significant bit of the device address (SA0) / SPI 4-wire interface serial data
SDO/SA0
output (SDO)
SCL I2C serial clock (SCL) / SPI serial port clock (SPC)
I2C slave interface
I2C serial data(SDA) / SPI serial data input (SDI), 3-wire interface serial data output
SDA
(SDO)
The external devices have to be connected to the ISM330DLC as illustrated in Figure 28. External controller
connection in Mode 3/4 (SPI 3-wire), if using the SPI 3-wire interface (SIM_OIS bit in CTRL1_OIS = 1). The setup
has to be changed accordingly when using the SPI 4-wire interface (connect SDO_Aux pin too).
ISM330DLC
SDx SDI/SDO
External
Application Controller
Processor (Camera
SCx SPC Module)
OCS CS
I2C/SPI SPI
MASTER AUXILIARY MASTER
I2C /
SPI (3/4-WIRE) SPI 3-WIRE
SLAVE SLAVE
INTERFACE INTERFACE
Note: When the Auxiliary SPI interface is enabled, the following rules must be observed:
• The SLEEP bit of the CTRL4_C register has to be set to 0 (default value);
• The ST_XL[1:0] bits and the ST_G[1:0] bits of the CTRL5_C register have to be set to 0 (default value).
The accelerometer/gyroscope data stored in FIFO can be accessed through the primary I2C/SPI interface only.
b7 b6 b5 b4 b3 b2 b1 b0
INT2
LVL2
_DRDY - - - - - -
_OIS
_OIS
• INT2_DRDY_OIS bit can be used to drive the DRDY signal of the OIS chain to the INT2 pin. The DRDY
signal of the OIS chain is pulsed; latched mode is not available.
• LVL2_OIS enables, in combination with the LVL1_OIS bit of the CTRL1_OIS register, level-sensitive trigger/
latched mode on the OIS chain; refer to Section 7.2.2 CTRL1_OIS (70h) for details.
b7 b6 b5 b4 b3 b2 b1 b0
• BLE_OIS bit can be used to define big/little endian selection: it allows swapping the content of the lower and
the upper part of the accelerometer/gyroscope output data registers on the OIS chain, similarly to the BLE
bit of the CTRL3_C register from the primary interface (refer to Section 4.5.1 Big-little endian selection for
details).
• LVL1_OIS can be used, in combination with the LVL2_OIS bit of the INT_OIS register, to enable level-
sensitive trigger mode on OIS (Table 59. CTRL1_OIS register).
• SIM_OIS bit has to be set to 1 in order to enable the 3-wire Auxiliary SPI interface, otherwise 4-wire Auxiliary
SPI interface is used.
• MODE4_EN bit enables the accelerometer OIS chain (Mode 4); OIS_EN_SPI2 bit must also to be set to 1 to
properly enable Mode 4.
• FS[1:0]_G_OIS bits can be used to select the gyroscope OIS full-scale (when FS_125_OIS bit is set to 0),
similarly to the FS_G[1:0] bits of the CTRL2_G register.
• FS_125_OIS bit enables ±125 dps full-scale on the gyroscope OIS chain. If it is equal to 0, full-scale is
selected through the FS[1:0]_G_OIS bits.
• OIS_EN_SPI2 bit must to be set to 1 in order to enable OIS chain data processing for gyroscope and
accelerometer data in Mode 3 and Mode 4.
DEN mode on OIS side can be enabled using the LVL1_OIS bit of the CTRL1_OIS register and the LVL2_OIS bit
of register INT_OIS.
DEN mode on the OIS path is active on the gyroscope sensor only. Further details about level-sensitive trigger/
latched mode are provided in Section 4.8 Edge-sensitive and level-sensitive data enable (DEN).
b7 b6 b5 b4 b3 b2 b1 b0
• HPM[1:0]_OIS bits can be used to select the digital HP filter cutoff on the OIS side. The table below shows
the available configurations.
00 0.016
01 0.065
10 0.260
11 1.04
• FTYPE_[1:0]_OIS bits can be used to select the digital LPF1 bandwidth. The table below shows the cutoff
and phase delay values obtained with all configurations.
00 351 Hz 7°
01 237 Hz 9°
10 173 Hz 11°
11 937 Hz 5°
Note: When Mode 3/4 is enabled, the LPF1 filter is not available on the gyroscope GP chain. It is recommended
to avoid using the LPF1 filter in Mode 1 and Mode 2 when Mode 3 or Mode 4 is intended to be used.
• HP_EN_OIS bit can be used to enable the HP filter on the OIS chain.
Note: The HP filter is available on the OIS side only if the HP_EN_OIS bit is set to 1 and the HP_EN_G bit in
CTRL7_G is set to 0.
b7 b6 b5 b4 b3 b2 b1 b0
• DEN_LH_OIS bit can be used to select the polarity of the DEN signal on the gyroscope OIS chain. If the
DEN_LH_OIS bit is set to 0, the DEN pin is active low, otherwise it is active high.
• FS[1:0]_XL_OIS bits can be used in order to select the accelerometer full-scale on the OIS chain. These two
bits act only when the accelerometer GP chain is in Power-Down mode, otherwise the accelerometer full-
scale corresponds to that set on the GP side through the CTRL1_XL register.
• FILTER_XL_CONF_OIS_[1:0] bits set the accelerometer OIS chain bandwidth.
ODR_XL = 0 (Power-Down)
ODR_XL ≤ 800 Hz
ODR_XL ≥ 1600 Hz
FILTER_XL_CONF_OIS[1:0]
Phase delay Phase delay
BW BW
@ 20 Hz @ 20 Hz
Note: If using the ISM330DLC device in Mode 4, the LPF2 and HP filters are not available on the accelerometer
GP chain. It is recommended to avoid using the LPF2 and HP filters in Mode 1/2/3 when Mode 4 is intended to be
used.
• ST[1:0]_OIS bits can be set in order to select the self-test on the gyroscope OIS chain (see Section 10 Self-
test for further details).
• ST_OIS_CLAMPDIS bit can be used to enable/disable the OIS chain clamp in the gyroscope self-test. If the
ST_OIS_CLAMPDIS bit is set to 1, once the gyroscope self-test functionality is enabled, the gyroscope
output values read from the Auxiliary SPI interface show the same variation observed while reading the data
from the primary interface. If the ST_OIS_CLAMPDIS bit is set to 0, when the gyroscope self-test
functionality is enabled, the gyroscope output values read from the Auxiliary SPI interface are always
clamped to 8000h value: for example, this feature allows the host device connected to the Auxiliary interface
to detect when the self-test functionality has been enabled from the GP side. By design, the maximum
gyroscope output value is one LSB lower than 8000h, so if the 8000h is read from the Auxiliary SPI it means
that the self-test feature was enabled from the GP side.
b7 b6 b5 b4 b3 b2 b1 b0
GYRO_
0 0 0 0 0 GDA XLDA
SETTLING
• GYRO_SETTLING bit is set to 1 during the initial settling phase of the gyroscope output. The gyroscope
output data generated when this bit is equal to 1 have to be discarded.
• GDA bit is set to 1 when new gyroscope data is available in register 22h to 27h on the OIS chain. It is reset
when one of the high parts of the output data registers is read.
• XLDA bit is set to 1 when new accelerometer data is available in register 28h to 2Dh on the OIS chain (Mode
3/4). It is reset when one of the high parts of the output data register is read.
// Boot time
1. Wait 15 ms
// Device in Power-Down mode after this time period
// Turn on gyro through Auxiliary SPI 3-wire interface
2. Write 21h to CTRL1_OIS
// (OIS Gyro: FS = ±250 dps / ODR = 6.6 kHz)
3. Wait 80 ms // Gyroscope max turn-on time
4. Read output registers 22h to 27h // Read gyroscope output data through Auxiliary SPI
7.4 Mode 4 - Reading gyroscope and accelerometer output data through the
Auxiliary SPI
The procedure to be applied after device power-up to read the gyroscope and accelerometer output data through
the Auxiliary SPI 3-wire interface is as follows:
// Boot time
1. Wait 15 ms
// Device in Power-Down mode after this time period
// Turn on gyro through Auxiliary SPI 3-wire interface
2. Write 31h to CTRL1_OIS // (OIS Gyro: FS = ±250 dps / ODR = 6.66 kHz)
// Enable Mode 4 (setting MODE4_EN)
// Set XL through Auxiliary SPI 3-wire interface
3. Write 00h to CTRL3_OIS
// (OIS XL: FS = ±2 g / ODR = 6.66 kHz)
4. Wait 80 ms // Gyroscope max turn-on time
5. Read output registers 22h to 27h // Read gyroscope output data through Auxiliary SPI
6. Read output registers 28h to 2Dh // Read accelerometer output data through Auxiliary SPI
In order to limit intervention by the host processor and facilitate post-processing data for event recognition, the
ISM330DLC embeds a 4 kbyte first-in first-out buffer (FIFO).
The FIFO can be configured to store the following data:
• gyroscope sensor data;
• accelerometer sensor data;
• external sensor (connected to sensor hub interface) data;
• timestamp data;
• temperature sensor data.
Saving data in the FIFO buffer is based on four ‘FIFO data sets’ consisting of 6 bytes each:
• The 1st FIFO data set is reserved for gyroscope data;
• The 2nd FIFO data set is reserved for accelerometer data;
• The 3rd FIFO data set is reserved for the external sensor data stored in the registers from
SENSORHUB1_REG to SENSORHUB6_REG (see Section 6.2.10 SENSORHUBx_REG registersfor details
on the SENSORHUBx_REG);
• The 4th FIFO data set can be alternately associated to the external sensor data stored in the registers from
SENSORHUB7_REG to SENSORHUB12_REG, to the timestamp info, or to the temperature sensor data.
All these data sets can be stored in FIFO at different ODRs, by setting the decimation factors in the FIFO_CTRL3
and FIFO_CTRL4 registers. Decimation factors are also used to select which FIFO data sets have to be stored in
FIFO.
Five different FIFO operating modes can be chosen through the FIFO_MODE_[2:0] bits of the FIFO_CTRL5
register:
• Bypass mode;
• FIFO mode;
• Continuous mode;
• Continuous-to-FIFO mode;
• Bypass-to-Continuous mode.
Note: When the FIFO is used, the IF_INC and BDU bits of the CTRL3_C register must be equal to 1.
Data are retrieved from the FIFO through two dedicated registers: FIFO_DATA_OUT_L and FIFO_DATA_OUT_H.
In this way, data can be read either from the FIFO (at a slower ODR) or from the device output registers (at the
normal ODR).
To monitor the FIFO status (full, empty, number of samples stored, etc.), four dedicated registers are available:
FIFO_STATUS1, FIFO_STATUS2, FIFO_STATUS3, FIFO_STATUS4.
Programmable FIFO thresholds can be set in FIFO_CTRL1 and FIFO_CTRL2 using the FTH_[10:0] bits.
FIFO full, FIFO threshold and FIFO overrun events can be enabled to generate dedicated interrupts on the two
interrupt pins (INT1 and INT2) through the INT1_FULL_FLAG, INT1_FTH and INT1_FIFO_OVR bits of the
INT1_CTRL register, and through the INT2_FULL_FLAG, INT2_FTH and INT2_FIFO_OVR bits of the
INT2_CTRL register.
In order to increase the number of samples which can be stored in the FIFO, it is also possible to store (as 1st
FIFO data set) only the 8 most significant bits of the accelerometer and gyroscope data by setting the bit
ONLY_HIGH_DATA in the FIFO_CTRL4 register.
Writing data in the FIFO can be triggered by the accelerometer/gyroscope data-ready; it can also be triggered by
the sensor hub data-ready (corresponding to the behavior of the SENSORHUB_END_OP bit of FUNC_SRC1
register): in this case the DATA_VALID_SEL_FIFO bit of the MASTER_CONFIG register must be set to 1.
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
FIFO_ FIFO_
TIMER 0 0 0 TEMP_ FTH_10 FTH_9 FTH_8
_EN EN
• FIFO_TIMER_EN enables timestamp data to be stored as the 4th FIFO data set. The content of the 6 bytes
stored in the FIFO when this bit is set to 1 is described in Section 8.8 Timestamp data in FIFO.
• FIFO_TEMP_EN bit enables temperature data to be stored as the 4th FIFO data set. The content of the 6
bytes stored in the FIFO when this bit is set to 1 is described in Section 8.9 Temperature data in FIFO.
• FTH_[10:8] contains the upper part of the FIFO threshold level. For the complete threshold level
configuration, consider also the FTH_[7:0] bits in the FIFO_CTRL1 register.
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
• WaterM represents the watermark status. This bit is set high when the number of bytes already stored in the
FIFO is equal to or higher than the watermark level (each sample is represented as 16-bit data). The
watermark status can be driven to the two interrupt pins by setting to 1 the INT1_FTH bit of the INT1_CTRL
register or the INT2_FTH bit of the INT2_CTRL register.
• OVER_RUN is set high when the FIFO is completely filled and at least one sample has already been
overwritten to store the new data. This signal can be driven to the two interrupt pins by setting to 1 the
INT1_FIFO_OVR bit of the INT1_CTRL register or the INT2_FIFO_OVR bit of the INT2_CTRL register.
• FIFO_FULL_SMART is set high when the next set of data that will be stored in FIFO will make the FIFO full.
This signal can be driven to the two interrupt pins by setting to 1 the INT1_FULL_FLAG bit of the
INT1_CTRL register or the INT2_FULL_FLAG bit of the INT2_CTRL register.
• FIFO_EMPTY is set high when the FIFO is empty.
• DIFF_FIFO_[10:8] contains the upper part of the number of unread words (16-bit data) stored in the FIFO.
The lower part is represented by the DIFF_FIFO_[7:0] bits in FIFO_STATUS1. The value of
DIFF_FIFO_[10:0] field corresponds to the number of samples in the FIFO (each sample is represented as
16-bit data). When a FIFO overrun event occurs (OVER_RUN bit is set high), the value of the
DIFF_FIFO_[10:0] field is set to 0.
Register content is updated synchronously to the FIFO write and read operations, as illustrated in Table
80. FIFO_STATUS2 behavior (case with one sensor in FIFO, STOP_ON_FTH = 0).
Table 80. FIFO_STATUS2 behavior (case with one sensor in FIFO, STOP_ON_FTH = 0)
DIFF_FIFO_
FIFO_OVER_RUN FIFO_FULL FIFO_EMPTY Number of FIFO samples FIFO trigger timing
[10:0]
0 0 1 0 0 t0
0 0 0 3 3 t1
0 0 0 6 6 t2
2048
1 1 0 0 t_full
(old sample overwritten)
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
FIFO_ FIFO_
0 0 0 0 0 0 PATTERN PATTERN
_9 _8
b7 b6 b5 b4 b3 b2 b1 b0
b7 b6 b5 b4 b3 b2 b1 b0
X-Y-Z data
16-bit data
F0 F1 F2 F3 F4 F5 … … F2045 … F0 F1 …
0 1 2 3 4 5 … … 2045 … 2964 2965 …
FIFO Reading
FIFO_FULL_SMART
t
FIFO mode FIFO FIFO FIFO Mode
enabled stops Bypass enabled
X-Y-Z data
16-bit data
F0 F1 F2 F3 F4 F5 … … F2045 F0 F1 … F2045 F0 F1 … …
0 1 2 3 4 5 … … 2045 2046 2047 … 4091 4092 4093 … …
FIFO Reading
FIFO_FULL_SMART
t
Continuous mode Start FIFO Start FIFO
enabled Reading Reading
16-bit data
F0 F1 F2 F2045
FIFO Reading
FIFO_FULL_SMART
Interrupt Event
t
Continuous-to-FIFO FIFO does FIFO Start FIFO
mode enabled not stop stops Reading
Follow these steps for Continuous-to-FIFO mode configuration (if the accelerometer/gyroscope data-ready is
used as the FIFO trigger):
1. Configure one of the events as previously described;
2. Choose the decimation factor for each sensor through the decimation bits in the FIFO_CTRL3 and
FIFO_CTRL4 registers (see Section 8.3 Setting the FIFO trigger, FIFO ODR and decimation factors for
details);
3. Choose the FIFO ODR through the ODR_FIFO_[3:0] bits in the FIFO_CTRL5 register;
4. Set the FIFO_MODE_[2:0] bits in the FIFO_CTRL5 register to 011b to enable FIFO Continuous-to-FIFO
mode.
In Continuous-to-FIFO mode the FIFO buffer continues filling; when the next stored set of data will make the FIFO
full, the FIFO_FULL_SMART bit is set high.
If the STOP_ON_FTH bit of the FIFO_CTRL4 register is set to 1, the FIFO size is limited to the value of the
FTH_[10:0] bits in the FIFO_CTRL1 and FIFO_CTRL2 registers: in this case, the FIFO_FULL_SMART bit of the
FIFO_STATUS2 register is set high when the number of samples in FIFO will reach or exceed the FTH_[10:0]
value on the next FIFO write operation.
When the trigger event occurs, two different cases can be observed:
1. If the FIFO buffer is already full (FIFO_FULL_SMART = 1), it stops collecting data at the first sample after
the event trigger. The FIFO content is composed of the samples collected before the event.
2. If FIFO buffer is not full yet (initial transient), it continues filling until it becomes full (FIFO_FULL_SMART = 1)
and then, if the trigger is still present, it stops collecting data.
Continuous-to-FIFO can be used in order to analyze the history of the samples which have generated an
interrupt; the standard operation is to read the FIFO content when the FIFO mode is triggered and the FIFO buffer
is full and stopped.
16-bit data
F0 F1 F2 … … F2045 F0 F1 … F2045 F0 F1 … …
0 1 2 3 4 5 … … 2048 2049 2050 … 4094 4095 4096 … …
FIFO Reading
FIFO_FULL_SMART
Interrupt Event
t
Bypass-to-Continuous FIFO switches to Start FIFO Start FIFO FIFO switches to
mode enabled Continuous mode Reading Reading Bypass mode
Once the trigger condition appears and the buffer switches to Continuous mode, the FIFO buffer continues filling.
When the next stored set of data will make the FIFO full, the FIFO_FULL_SMART bit is set high.
Bypass-to-Continuous can be used in order to start the acquisition when the configured interrupt is generated.
8.3 Setting the FIFO trigger, FIFO ODR and decimation factors
Writing data in the FIFO can be configured to be triggered by three different sources.
1st FIFO
DATA SET
DECIMATOR
DEC_FIFO_GYRO[2:0]
ODR_XL
2nd FIFO
ODR_G F(odr) DATA_VALID_SEL_FIFO = 0
DATA SET
FIFO DECIMATOR
ODR_FIFO TRIGGER
SIGNAL DEC_FIFO_XL[2:0] FIFO
3rd FIFO
DATA SET
SENSORHUB_END_OP DATA_VALID_SEL_FIFO = 1
DECIMATOR
DEC_DS3_FIFO[2:0]
4th FIFO
DATA SET
DECIMATOR
DEC_DS4_FIFO[2:0]
As described in Figure 33. FIFO trigger signal selection, the DATA_VALID_SEL_FIFO bit of the
MASTER_CONFIG register is used for this purpose:
• If the DATA_VALID_SEL_FIFO bit is set to 0, writing data in the FIFO is triggered by the accelerometer/
gyroscope data-ready. The ODR_FIFO_[3:0] bits of FIFO_CTRL5 define the maximum data rate at which
data are stored in FIFO; the latter is limited to the maximum value between the accelerometer ODR (defined
by the ODR_XL[3:0] bits of the CTRL1_XL register) and the gyroscope ODR (defined by the ODR_G[3:0]
bits of the CTRL2_G register);
• If the DATA_VALID_SEL_FIFO bit is set to 1, writing data in the FIFO is triggered by the sensor hub
(corresponding to the behavior of the SENSORHUB_END_OP bit of the FUNC_SRC1 register). The data
are stored in FIFO when the sensor hub routine is complete.
Using the FIFO decimation factors, data can be stored in FIFO at a rate lower than the rate of the FIFO trigger
signal. Four decimation factors can be configured, one for each FIFO data set:
• The DEC_FIFO_G[2:0] bits of the FIFO_CTRL3 register define if the gyroscope data (associated to the 1st
FIFO data set) are stored in FIFO and the relative rate;
• The DEC_FIFO_XL[2:0] bits of the FIFO_CTRL3 register define if the accelerometer data (associated to the
2nd FIFO data set) are stored in FIFO and the relative rate;
• The DEC_DS3_FIFO[2:0] bits of the FIFO_CTRL4 register define if the data associated to the 3rd FIFO data
set are stored in FIFO and the relative rate;
• The DEC_DS4_FIFO[2:0] bits of the FIFO_CTRL4 register define if the data associated to the 4th FIFO data
set are stored in FIFO and the relative rate.
8.3.1 Procedure for ODR or FIFO configuration changes when using FIFO
Apply the following procedure when an accelerometer/gyroscope ODR or FIFO configuration change has to be
performed:
1. Read all the data stored in the FIFO to empty it (see Section 8.4 Retrieving data from the FIFOfor details);
2. Set the FIFO in Bypass mode (set the FIFO_MODE bits of the FIFO_CTRL5 register to 000b);
3. Set the target ODR for the accelerometer and gyroscope through the ODR_XL bits of the CTRL1_XL
register and the ODR_G bits of the CTRL2_G register respectively;
4. Set the target ODR for the FIFO through the ODR_FIFO bits of the FIFO_CTRL5 register;
5. Set the gyroscope decimation factor in the DEC_FIFO_G[2:0] bits of the FIFO_CTRL3 register and the
accelerometer decimation factor in the DEC_FIFO_XL[2:0] bits of the FIFO_CTRL3 register (see Table
70. Gyroscope FIFO decimation settingand Table 71. Accelerometer FIFO decimation setting for the values
to be set in the DEC_FIFO_G[2:0] bits and the DEC_FIFO_XL[2:0] bits of FIFO_CTRL3).
6. Set the desired FIFO operating mode (see Section 8.3 Setting the FIFO trigger, FIFO ODR and decimation
factors for details).
8.5.1 Example 1
Supposing the FIFO is storing data from the gyroscope and accelerometer at the same ODR:
• Gyroscope ODR = 104 Hz, Accelerometer ODR = 104 Hz.
If the internal trigger (accelerometer/gyroscope data-ready) is used, it’s recommended to set the ODR_FIFO_[3:0]
bits of the FIFO_CTRL5 register to 0100b in order to set the FIFO trigger ODR to 104 Hz.
Both the DEC_FIFO_GYRO[2:0] and the DEC_FIFO_XL[2:0] fields of the FIFO_CTRL3 register have to be set to
001b (no decimation).
The following data pattern is repeated every 6 samples (each sample is represented as 16-bit data):
• Gx Gy Gz XLx XLy XLz (gyroscope and accelerometer data)
The FIFO_PATTERN_[9:0] bits will contain a number from 0 to 5, as shown in Table 85. Example 1:
FIFO_PATTERN_[9:0] bits and next reading.
t0 0 Gx
t0 1 Gy
t0 2 Gz
t0 3 XLx
t0 4 XLy
t0 5 XLz
8.5.2 Example 2
Supposing the FIFO is storing data from the gyroscope and accelerometer at different ODRs:
• Gyroscope ODR = 208 Hz, Accelerometer ODR = 104 Hz.
If the internal trigger (accelerometer/gyroscope data-ready) is used, it’s recommended to set the ODR_FIFO_[3:0]
bits of the FIFO_CTRL5 register to 0101b in order to set the FIFO trigger ODR to 208 Hz.
The DEC_FIFO_GYRO[2:0] field of the FIFO_CTRL3 register has to be set to 001b (no decimation applied to
gyroscope data) and the DEC_FIFO_XL[2:0] field has to be set to 010b (decimation with factor 2 applied to
accelerometer data).
Since the gyroscope ODR is twice the accelerometer ODR, the following data pattern is repeated every 9
samples (each sample is represented as 16-bit data):
• Gx Gy Gz XLx XLy XLz Gx Gy Gz
The FIFO_PATTERN_[9:0] bits will contain a number from 0 to 8, as shown in Table 86. Example 2:
FIFO_PATTERN_[9:0] bits and next reading.
t0 0 Gx
t0 1 Gy
t0 2 Gz
t0 3 XLx
t0 4 XLy
t0 5 XLz
t1 6 Gx
t1 7 Gy
t1 8 Gz
8.5.3 Example 3
Supposing the FIFO is storing data from the gyroscope, accelerometer and magnetometer at different ODRs:
• Gyroscope ODR = 104 Hz, Accelerometer ODR = 208 Hz, Magnetometer ODR = 52 Hz.
If the internal trigger (accelerometer/gyroscope data-ready) is used, it’s recommended to set the ODR_FIFO_[3:0]
bits of the FIFO_CTRL5 register to 0101b in order to set the FIFO trigger ODR to 208 Hz.
The DEC_FIFO_GYRO[2:0] field of the FIFO_CTRL3 register has to be set to 010b (decimation with factor 2
applied to gyroscope data) and the DEC_FIFO_XL[2:0] field has to be set to 001b (no decimation applied to
accelerometer data). Assuming that the magnetometer is associated to the 3rd FIFO data set, the
DEC_DS3_FIFO[2:0] field of the FIFO_CTRL4 register has to be set to 100b (decimation with factor 4 applied to
magnetometer data).
The following data pattern is repeated every 21 samples:
• Gx Gy Gz XLx XLy XLz Mx My Mz (gyroscope, accelerometer, mag. data - 9 samples)
• XLx XLy XLz (accelerometer data - 3 samples)
• Gx Gy Gz XLx XLy XLz (gyroscope and accelerometer data - 6 samples)
• XLx XLy XLz (accelerometer data - 3 samples)
The FIFO_PATTERN_[9:0] bits will contain a number from 0 to 20, as shown in Table 87. Example 3:
FIFO_PATTERN_[9:0] bits and next reading.
t0 0 Gx
t0 1 Gy
t0 2 Gz
t0 3 XLx
t0 4 XLy
t0 5 XLz
t0 6 Mx
t0 7 My
t0 8 Mz
t1 9 XLx
t1 10 XLy
t1 11 XLz
t2 12 Gx
t2 13 Gy
t2 14 Gz
t2 15 XLx
t2 16 XLy
t2 17 XLz
t3 18 XLx
t3 19 XLy
t3 20 XLz
FTH_[10:0] = 21
STOP_ON_FTH = 0 16-bit data
WaterM
FIFO_FULL_SMART
t
Continuous mode
enabled
Figure 34. FIFO threshold (STOP_ON_FTH = 0) shows an example of FIFO threshold level usage when just
accelerometer (or gyroscope) data are stored. The STOP_ON_FTH bit set to 0 in the FIFO_CTRL4 register. The
threshold level is set to 21 through the FTH_[10:0] bits. The WaterM bit of the FIFO_STATUS2 register rises after
the 21st level has been reached (21 samples in the FIFO). Since the STOP_ON_FTH bit is set to 0, the FIFO will
not stop at the 21st sample, but will keep storing data until the FIFO_FULL_SMART flag is set high.
FTH_[10:0] = 21
STOP_ON_FTH = 1
X-Y-Z data
16-bit data
F0 F1 F2 F3 F4 F5 … … F17 … F0 F1 …
0 1 2 3 4 5 … … 17 … 302 303 …
FIFO Reading
FIFO_FULL_SMART
t
FIFO mode FIFO FIFO FIFO Mode
enabled stops Bypass enabled
Figure 35. FIFO threshold (STOP_ON_FTH = 1) in FIFO mode shows an example of FIFO threshold level usage
in FIFO mode with the STOP_ON_FTH bit set to 1 in the FIFO_CTRL4 register; just accelerometer (or gyroscope)
data are stored in this example. The threshold level is set to 21 through the FTH_[10:0] bits and defines the
current FIFO size. In FIFO mode, data are stored in the FIFO buffer until the FIFO_FULL_SMART signal rises;
the FIFO_FULL_SMART bit of the FIFO_STATUS2 register rises when the next data stored in the FIFO will make
the FIFO full, so in this example it rises after the first 18 data (16-bit each) are stored in FIFO. The WaterM bit of
the FIFO_STATUS2 register cannot go to 1 since the FTH threshold level is never reached (data are no longer
stored in FIFO after the FIFO is full).
FTH_[10:0] = 21
STOP_ON_FTH = 1
16-bit data
0 1 2 … … 17 18 19 20 21 …. … 41 42 … …
WaterM
FIFO_FULL_SMART
t
Continuous mode
enabled
Figure 36. FIFO threshold (STOP_ON_FTH = 1) in Continuous mode shows an example of FIFO threshold level
usage in Continuous mode with the STOP_ON_FTH bit set to 1 in the FIFO_CTRL4 register; just accelerometer
(or gyroscope) data are stored in this example. The threshold level is set to 21 through the FTH_[10:0] bits. The
FIFO_FULL_SMART bit of the FIFO_STATUS2 register rises when the next data stored in the FIFO will make the
FIFO full, so in this example it rises after the first 18 data (16-bit each) are stored in FIFO. The WaterM bit of the
FIFO_STATUS2 register rises after the 21st level has been reached (21 samples in the FIFO).
When this feature is enabled, the 6 bytes containing the high part (8 bits) of the gyroscope and accelerometer
data are associated to the 1st FIFO data set and the 2nd FIFO data set is not used.
The DEC_FIFO_G[2:0] field of the FIFO_CTRL3 register has to be set to a value different from 000b (1st FIFO
data set stored in FIFO).
The DEC_FIFO_XL[2:0] field of the FIFO_CTRL3 register has to be set to 000b (2nd FIFO data set not in FIFO).
To enable this feature, the FIFO_TIMER_EN bit must be set to 1 in the FIFO_CTRL2 register.
When this feature is enabled, the timestamp data is associated to the 4th FIFO data set: the DEC_DS4_FIFO[2:0]
field of the FIFO_CTRL4 register has to be used to define the decimation factor.
Follow these steps to store timestamp data in the FIFO using the internal trigger (accelerometer/gyroscope data-
ready):
1. Turn on the accelerometer;
2. Enable the timestamp (see Section 5.9 Timestamp);
3. Choose the decimation factor for the 4th FIFO data set through the DEC_DS4_FIFO[2:0] bits of the
FIFO_CTRL4 register;
4. Set the FIFO_TIMER_EN bit to 1 in the FIFO_CTRL2 register;
5. Choose the FIFO ODR through the ODR_FIFO_[3:0] bits of the FIFO_CTRL5 register;
6. Configure the FIFO operating mode through the FIFO_MODE_[2:0] field of the FIFO_CTRL5 register.
Follow these steps to store 16-bit temperature data in the FIFO using the internal trigger (accelerometer/
gyroscope data-ready):
1. Turn on the accelerometer or the gyroscope;
2. Choose the decimation factor (different from 000b) for the 4th FIFO data set through the
DEC_DS4_FIFO[2:0] bits in the FIFO_CTRL4 register;
3. Set to 1 the FIFO_TEMP_EN bit in the FIFO_CTRL2 register and to 0 the bit FIFO_TIMER_EN of the
FIFO_CTRL2 register;
4. Choose the FIFO ODR through the ODR_FIFO_[3:0] bits of the FIFO_CTRL5 register;
5. Configure the FIFO operating mode through the FIFO_MODE_[2:0] field of the FIFO_CTRL5 register.
9 Temperature sensor
The ISM330DLC is provided with an internal temperature sensor that is suitable for ambient temperature
measurement.
If both the accelerometer and the gyroscope sensors are in Power-Down mode, the temperature sensor is off.
The maximum output data rate of the temperature sensor is 52 Hz and its value depends on how the
accelerometer and gyroscope sensors are configured:
• If the gyroscope is in Power-Down mode:
– the temperature data rate is equal to 12.5 Hz if the accelerometer ODR is equal to 12.5 Hz Low-Power
mode;
– the temperature data rate is equal to 26 Hz if the accelerometer configuration is 26 Hz Low-Power
mode ;
– the temperature data rate is equal to 52 Hz for all other accelerometer configurations.
• If the gyroscope is not in Power-Down mode, the temperature data rate is equal to 52 Hz, regardless of the
accelerometer and gyroscope configuration.
For the temperature sensor, the data-ready signal is represented by the TDA bit of the STATUS_REG register.
The signal can be driven to the INT2 pin by setting the INT2_DRDY_TEMP bit of the INT2_CTRL register to 1.
The temperature data is given by the concatenation of the OUT_TEMP_H and OUT_TEMP_L registers and it is
represented as a number of 16 bits in two’s complement format with a sensitivity of 256 LSB/°C. The output zero
level corresponds to 25 °C.
The ISM330DLC allows swapping, by setting the BLE bit of the CTRL3_C register to 1, the content of the lower
and the upper part of the temperature output data registers (i.e. OUT_TEMP_H with OUT_TEMP_L).
Temperature sensor data can also be stored in FIFO with a configurable decimation factor (see Section
8.9 Temperature data in FIFO for details).
BLE = 0 BLE = 1
Register address
Temperature values
OUT_TEMP_H OUT_TEMP_L OUT_TEMP_H OUT_TEMP_L
(21h) (20h) (21h) (20h)
10 Self-test
The embedded self-test functions allows checking the device functionality without moving it.
AN5125
page 101/116
AN5125
Gyroscope self-test (GP) – Mode 1 / 2
AN5125
page 103/116
AN5125
Gyroscope self-test (OIS) with GP chain off – Mode 3 / 4
Notes:
• All the read/write operations in this procedure have to be
Write 03hto CTRL3_OIS (72h) Enable Gyro Self Test
performed through the Auxiliary SPI interface
• This procedure can be performed only if the GP readout Wait for 50 ms
chain is off (ODR_XL[3:0] = 0000b in CTRL1_XL and
ODR_G[3:0] = 0000b in CTRL2_G ) Check GDA in STATUS_SPIAux (1Eh) – Gyro Data Ready Bit
Write 0Dh to CTRL1_OIS (70h) for Aux SPI 4-wire (2Dh for Aux SPI 3-w) Reading OUTX/OUTY/OUTZ clears GDA, Wait for the first sample
Write 00h to CTRL2_OIS (71h) Read OUTX_G(22h/23h), OUTY_G(24h/25h), OUTZ_G(26h/27h)
Write 00h to CTRL3_OIS (72h) Discard data
AN5125
page 105/116
AN5125
Gyroscope self-test (OIS) with GP chain on – Mode 3 / 4
AN5125
page 107/116
AN5125
Revision history
Contents
1 Pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
2 Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
2.1 Embedded functions registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
8.3 Setting the FIFO trigger, FIFO ODR and decimation factors . . . . . . . . . . . . . . . . . . . . . . . . . . 89
8.3.1 Procedure for ODR or FIFO configuration changes when using FIFO . . . . . . . . . . . 91
8.5.2 Example 2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
8.5.3 Example 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
10 Self-test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
10.1 Accelerometer self-test – Mode 1 / 2 / 3 / 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
10.2 Gyroscope self-test (GP) – Mode 1 / 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
10.3 Gyroscope self-test (OIS) with GP chain off – Mode 3 / 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
10.4 Gyroscope self-test (OIS) with GP chain on – Mode 3 / 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
List of tables
Table 1. Pin status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Table 2. Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Table 3. Embedded functions registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Table 4. Accelerometer ODR and power mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Table 5. Gyroscope ODR and power mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table 6. Power consumption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Table 7. Accelerometer analog filter bandwidth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Table 8. Accelerometer bandwidth selection in Mode 1/2/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Table 9. OIS chain (XL ODR = 6.66 kHz) - Accelerometer bandwidth selection in Mode 4 . . . . . . . . . . . . . . . . . . . . . . . 15
Table 10. Gyroscope digital HP filter cutoff selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Table 11. Gyroscope overall bandwidth selection in Mode 1/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Table 12. GP chain - Gyroscope overall bandwidth selection in Mode 3/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Table 13. OIS chain - Gyroscope digital HP filter cutoff selection in Mode 3/4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Table 14. OIS chain (Gyro ODR = 6.66 kHz) - Gyroscope overall bandwidth selection (Mode 3/4) . . . . . . . . . . . . . . . . . . 20
Table 15. Accelerometer turn-on/off time in Mode 1/2/3 (LPF2 and HP disabled) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 16. Accelerometer samples to be discarded in Mode 1/2/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Table 17. Gyroscope turn-on/off time in Mode 1/2 (HP disabled) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Table 18. Gyroscope samples to be discarded in Mode 1/2 (LPF1 disabled) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 19. Gyroscope samples to be discarded in Mode 1/2 (LPF1 enabled) for all ODRs . . . . . . . . . . . . . . . . . . . . . . . . 23
Table 20. OIS chain (Gyro ODR = 6.66 kHz) - Gyroscope turn-on/off time in Mode 3/4 . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 21. Gyroscope samples to be discarded in Mode 3/4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Table 22. GP chains settling time on OIS enable/disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Table 23. Output data registers content vs. acceleration (FS_XL = ±2 g) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Table 24. Output data registers content vs. angular rate (FS_G = ±250 dps) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Table 25. Output registers rounding pattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
Table 26. DEN configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Table 27. INT1_CTRL register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Table 28. MD1_CFG register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 29. INT2_CTRL register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 30. MD2_CFG register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Table 31. Free-fall threshold LSB value. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Table 32. D6D_SRC register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Table 33. Threshold for 4D/6D function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Table 34. D6D_SRC register in 6D positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Table 35. TAP_SRC register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Table 36. Inactivity event configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Table 37. CTRL10_C register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Table 38. MASTER_CONFIG register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Table 39. FUNC_SRC1 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Table 40. FUNC_SRC2 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Table 41. SLV0_ADD register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Table 42. SLV0_SUBADD register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Table 43. SLAVE0_CONFIG register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Table 44. SLV1_ADD register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Table 45. SLV1_SUBADD register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Table 46. SLAVE1_CONFIG register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Table 47. SLV2_ADD register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Table 48. SLV2_SUBADD register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Table 49. SLAVE2_CONFIG register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Table 50. SLV3_ADD register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Table 51. SLV3_SUBADD register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Table 52. SLAVE3_CONFIG register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
List of figures
Figure 1. Pin connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 2
Figure 2. Accelerometer filtering chain (Mode 1/2/3) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Figure 3. Accelerometer filtering chain (Mode 4) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Figure 4. Accelerometer slope filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Figure 5. Gyroscope digital chain - Mode 1 and Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Figure 6. Gyroscope digital chain - Mode 3 and Mode 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
Figure 7. Data-ready signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
Figure 8. Edge-sensitive trigger mode, DEN active low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Figure 9. Level-sensitive trigger mode, DEN active low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 10. Level-sensitive trigger mode, DEN active low, DEN_DRDY on INT1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Figure 11. Level-sensitive latched mode, DEN active low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 12. Level-sensitive latched mode, DEN active low, DEN_DRDY on INT1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 13. Level-sensitive FIFO enable mode, DEN active low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Figure 14. Free-fall interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Figure 15. Wake-up interrupt (using the slope filter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Figure 16. 6D recognized orientations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Figure 17. Single-tap event recognition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Figure 18. Double-tap event recognition (LIR bit = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
Figure 19. Single and double-tap recognition (LIR bit = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Figure 20. Activity/Inactivity recognition (using the slope filter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Figure 21. Tilt example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Figure 22. External sensor connections in Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Figure 23. SENSORHUBx_REG allocation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
Figure 24. Pass-through feature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Figure 25. Hard-iron effect (X-Y 2D scatter plot) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Figure 26. Soft-iron effect (X-Y 2D scatter plot) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Figure 27. Hard-iron / soft-iron correction block scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Figure 28. External controller connection in Mode 3/4 (SPI 3-wire) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Figure 29. FIFO mode (STOP_ON_FTH = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Figure 30. Continuous mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
Figure 31. Continuous-to-FIFO mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Figure 32. Bypass-to-Continuous mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
Figure 33. FIFO trigger signal selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
Figure 34. FIFO threshold (STOP_ON_FTH = 0) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Figure 35. FIFO threshold (STOP_ON_FTH = 1) in FIFO mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Figure 36. FIFO threshold (STOP_ON_FTH = 1) in Continuous mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Figure 37. Accelerometer self-test procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Figure 38. Gyroscope self-test procedure in Mode 1/2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Figure 39. Gyroscope self-test procedure (OIS) with GP chain off. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Figure 40. Gyroscope self-test procedure (OIS) with GP chain on. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107