ISM330DHCX: always-on 3D accelerometer and 3D gyroscope with digital output
for industrial applications
Introduction
This document is intended to provide usage information and application hints related to ST’s ISM330DHCX iNEMO inertial
module.
The ISM330DHCX is a system-in-package featuring a high-accuracy and high-performance 3D digital accelerometer and 3D
digital gyroscope tailored for Industry 4.0 applications.
All the design aspects and the testing and calibration of the ISM330DHCX have been optimized to reach superior accuracy,
stability, and extremely low noise.
The ISM330DHCX has a 3D accelerometer capable of wide bandwidth, ultra-low noise and a selectable full-scale range of
±2/±4/±8/±16 g. The 3D gyroscope has an angular rate range of ±125/±250/±500/±1000/±2000/±4000 dps and offers superior
stability over temperature and time along with ultra-low noise.
The unique set of embedded features facilitates the implementation of smart and complex sensor nodes which deliver high
performance at very low power:
•its capability to support up to 16 embedded finite state machines that can be programmed and run independently to detect
and classify complex motion sequences.
•the embedded Machine Learning Core logic allows identifying if a data pattern matches a user-defined set of classes. A
typical example of an application is the identification and detection of multiple complex motion patterns.
•the integrated smart first-in first-out (FIFO) buffer of up to 9 kbyte size allows dynamic batching of significant data (i.e.
internal and external sensors, timestamp and temperature).
The ISM330DHCX is available in a small plastic land grid array (LGA) package of 2.5 x 3.0 x 0.83 mm.
AN5398 - Rev 3 - January 2021
For further information contact your local STMicroelectronics sales office.
www.st.com
1Pin description
AN5398
Pin description
Figure 1. Pin connections
AN5398 - Rev 3
page 2/132
AN5398
- Rev 3
page 3/132
Table 1. Pin status
Pin #Name
SDO
1
SA0
2SDxConnect to VDDIO or GND
3SCxConnect to VDDIO or GND
INT1
INT2
(2)
(3)
4
5Vdd_IOPower supply for I/O pinsPower supply for I/O pinsPower supply for I/O pins
6GND0 V supply0 V supply0 V supply
7GND0 V supply0 V supply0 V supply
8VddPower supplyPower supplyPower supply
9
10OCS_Aux
11SDO_Aux
12CS
13SCL
14SDA
Mode 1 function
SPI 4-wire interface serial data
output (SDO)
I²C least significant bit of the device
address (SA0)
Programmable interrupt 1Programmable interrupt 1Programmable interrupt 1Default: input with pull-down.Default: input with pull-down.Default: input with pull-down.
Programmable interrupt 2 (INT2) /
Data enabled (DEN)
Connect to VDDIO or leave
unconnected
Connect to VDDIO or leave
unconnected
I²C/SPI mode selection (1:SPI idle
mode / I²C communication enabled;
0: SPI communication mode / I²C
disabled)
I²C serial clock (SCL) / SPI serial port
I²C serial data (SDA) / SPI serial data
clock (SPC)
input (SDI) / 3-wire interface serial
data output (SDO)
(1)
Mode 2 function
SPI 4-wire interface serial data
output (SDO)
I²C least significant bit of the device
address (SA0)
I²C serial data master
I²C serial clock master
Programmable interrupt 2 (INT2) /
Data enabled (DEN) / I²C master
external synchronization signal
(MDRDY)
Connect to VDDIO or leave
unconnected
Connect to VDDIO or leave
unconnected
I²C/SPI mode selection (1:SPI idle
mode / I²C communication enabled;
0: SPI communication mode / I²C
disabled)
I²C serial clock (SCL) / SPI serial port
I²C serial data (SDA) / SPI serial data
clock (SPC)
input (SDI) / 3-wire interface serial
data output (SDO)
1. Refer to description in Section 3.6 Connection modes.
2. INT1 must be set to '0' or left unconnected during power-on. If no interrupt signal is needed on INT1, this pin can be left unconnected.
3. If no interrupt signal is needed on INT2, this pin can be left unconnected.
(MSDA)
(MSCL)
(1)
Mode 3/4 function
SPI 4-wire interface serial data
output (SDO)
I²C least significant bit of the device
address (SA0)
Auxiliary SPI 3/4-wire interface serial
data input (SDI) and SPI 3-wire serial
data output (SDO)
Auxiliary SPI 3/4-wire interface serial
port clock (SPC_Aux)
Programmable interrupt 2 (INT2) /
Data enabled (DEN)
Auxiliary SPI 3/4-wire interface
Auxiliary SPI 3-wire interface: leave
unconnected
Auxiliary SPI 4-wire interface: serial
data output (SDO_Aux)
I²C/SPI mode selection (1:SPI idle
mode / I²C communication enabled;
0: SPI communication mode / I²C
disabled)
I²C serial clock (SCL) / SPI serial port
I²C serial data (SDA) / SPI serial data
clock (SPC)
input (SDI) / 3-wire interface serial
data output (SDO)
enable
(1)
Pin status Mode 1Pin status Mode 2Pin status Mode 3/4
Default: input without pull-up.
Pull-up is enabled if bit SDO_PU_EN = 1
in PIN_CTRL register.
Default: input without pull-up.
Pull-up is enabled if bit SHUB_UP_EN =
1 in MASTER_CONFIG register.
Default: input without pull-up.
Pull-up is enabled if bit SHUB_UP_EN =
1 in MASTER_CONFIG register.
Default: output forced to ground.Default: output forced to ground.Default: output forced to ground.
Default: input with pull-up.
Pull-up is disabled if bit OIS_PU_DIS = 1
in PIN_CTRL register.
Default: input with pull-up.
Pull-up is disabled if bit OIS_PU_DIS = 1
in PIN_CTRL register.
Default: input with pull-up.
Pull-up is disabled if bit
I2C_disable = 1 in CTRL4_C register
and bit DEVICE_CONF = 1 in
CTRL9_XL register.
Default: input without pull-up.Default: input without pull-up.Default: input without pull-up.
Default: input without pull-up.Default: input without pull-up.Default: input without pull-up.
Pull-up is enabled if bit SDO_PU_EN = 1
Pull-up is enabled if bit SHUB_UP_EN =
Pull-up is enabled if bit SHUB_UP_EN =
Pull-up is disabled if bit OIS_PU_DIS = 1
Pull-up is disabled if bit OIS_PU_DIS = 1
Internal pull-up value is from 30 kΩ to 50 kΩ, depending on VDDIO.
The table given below provides a list of the registers for the embedded functions available in the device and the corresponding addresses.
Embedded functions registers are accessible when FUNC_CFG_ACCESS is set to 1 in FUNC_CFG_ACCESS register.
The table given below provides a list of the registers for the embedded advanced features page 0. These registers are accessible when
PAGE_SEL[3:0] are set to 0000b in the PAGE_SEL register.
Table 4. Embedded advanced features registers - page 0
The following table provides a list of the registers for the embedded advanced features page 1. These registers are accessible when
PAGE_SEL[3:0] are set to 0001b in the PAGE_SEL register.
Table 5. Embedded advanced features registers - page 1
The table given below provides a list of the registers for the sensor hub functions available in the device and the corresponding addresses. The
sensor hub registers are accessible when bit SHUB_REG_ACCESS is set to 1 in the FUNC_CFG_ACCESS register.
The ISM330DHCX provides three possible operating configurations:
•only accelerometer active and gyroscope in Power-Down or Sleep mode;
•only gyroscope active and accelerometer in Power-Down;
•both accelerometer and gyroscope active with independent ODR.
The device offers a wide VDD voltage range from 1.71 V to 3.6 V and a VDDIO range from 1.62 V to 3.6 V. The
power-on sequence is not restricted: VDD/VDDIO pins can be either set to power supply level or to ground level
(they must not be left floating) and no specific sequence is required for powering them on.
In order to avoid potential conflicts, during the power-on sequence it is recommended to set the lines (on the
host side) connected to the device IO pins floating or connected to ground, until VDDIO is set. After VDDIO
is set, the lines connected to the IO pins have to be configured according to their default status described in
Table 1. Pin status. In order to avoid an unexpected increase in current consumption, the input pins which are not
pulled-up/pulled-down must the polarized by the host.
When the VDD power supply is applied, the device performs a 10 ms (maximum) boot procedure to load the
trimming parameters. After the boot is completed, both the accelerometer and the gyroscope are automatically
configured in Power-Down mode. To guarantee proper power-off of the device it is recommended to maintain the
duration of the VDD line to GND for at least 100 μs.
The accelerometer and the gyroscope can be configured independently. The accelerometer can be configured
in four different power modes: Power-Down, Low-Power, Normal and High-Performance mode. The gyroscope
can be configured in four different power modes: Power-Down, Low-Power, Normal and High-Performance mode.
They are allowed to have different data rates without any limit. The gyroscope sensor can also be set to Sleep
mode to reduce its power consumption.
When both the accelerometer and gyroscope are on, the accelerometer is synchronized with the gyroscope, and
the data rates of the two sensors are integer multiples of each other.
Referring to the datasheet, the output data rate (ODR_XL) bits of CTRL1_XL register and the High-Performance
disable (XL_HM_MODE) bit of CTRL6_C register are used to select the power mode and the output data rate of
the accelerometer (Table 7. Accelerometer ODR and power mode selection).
AN5398
Operating modes
Table 7. Accelerometer ODR and power mode selection
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 8. Gyroscope ODR and power mode selection).
The following table shows the typical values of power consumption for the different operating modes.
Table 9. Power consumption
ODR [Hz]
Power-Down--3 μA
Sleep-420 µA-
1.6 Hz (Low Power)5.5 μA--
12.5 Hz (Low Power)11 μA440 μA0.47 mA
26 Hz (Low Power)17 μA455 μA0.49 mA
52 Hz (Low Power)32 μA490 μA0.52 mA
104 Hz (Low Power)56 μA550 μA0.6 mA
208 Hz (Low Power)105 μA670 μA0.7 mA
12.5 Hz (High Perf.)360 μA960 μA1.2 mA
26 Hz (High Perf.)360 μA960 μA1.2 mA
52 Hz (High Perf.)360 μA960 μA1.2 mA
104 Hz (High Perf.)360 μA960 μA1.2 mA
208 Hz (High Perf.)360 μA960 µA1.2 mA
417 Hz (High Perf.)360 μA960 μA1.2 mA
833 Hz (High Perf.)360 μA960 μA1.2 mA
1.66 kHz (High Perf.)360 μA960 μA1.2 mA
3.33 kHz (High Perf.)360 μA960 μA1.2 mA
6.66 kHz (High Perf.)360 μA960 μA1.2 mA
Accelerometer only
(at Vdd = 1.8 V)
Gyroscope only
(at Vdd = 1.8 V)
Combo [Acc + Gyro]
(at Vdd = 1.8 V)
AN5398 - Rev 3
page 14/132
3.1Power-Down mode
When the accelerometer/gyroscope is in Power-Down mode, almost all internal blocks of the device are switched
off to minimize power consumption. Digital interfaces (I²C and SPI) are still active to allow communication with
the device. The content of the configuration registers is preserved and the output data registers are not updated,
keeping the last data sampled in memory before going into Power-Down mode.
3.2High-Performance mode
In High-Performance mode, all accelerometer/gyroscope circuitry is always on and data are generated at the data
rate selected through the ODR_XL/ODR_G bits.
Data interrupt generation is active.
3.3Normal mode
While High-Performance mode guarantees the best performance in terms of noise, Normal mode further reduces
the current consumption. The accelerometer/gyroscope data reading chain is automatically turned on and off to
save power. In the gyroscope device, only the driving circuitry is always on.
Data interrupt generation is active.
AN5398
Power-Down mode
3.4Low-Power mode
Low-Power mode differs from Normal mode in the available output data rates. In Low-Power mode low-speed
ODRs are enabled. Four low-speed ODRs can be chosen for the accelerometer through the ODR_XL bits: 1.6
Hz, 12.5 Hz, 26 Hz and 52 Hz. Three low-speed ODRs can be chosen for the gyroscope thorough the ODR_G
bits: 12.5 Hz, 26 Hz and 52 Hz.
Data interrupt generation is active.
3.5Gyroscope Sleep mode
While the gyroscope is in Sleep mode the circuitry that drives the oscillation of the gyroscope mass is kept active.
Compared to gyroscope Power-Down, turn-on time from Sleep mode to Low-Power/Normal/High-Performance
mode is drastically reduced.
If the gyroscope is not configured in Power-Down mode, it enters in Sleep mode when the Sleep mode enable
(SLEEP_G) bit of CTRL4_C register is set to 1, regardless of the selected gyroscope ODR.
3.6Connection modes
The device offers four different connection modes, described in detail in this document:
•Mode 1: it is the connection mode enabled by default; I²C slave interface or SPI (3- / 4-wire) serial interface
is available.
•Mode 2: it is the sensor hub mode; I²C slave interface or SPI (3- / 4-wire) serial interface and I²C interface
master for external sensor connections are available. This connection mode is described in Section 7 Mode
2 - Sensor hub mode.
•Mode 3: in addition to the primary I²C slave interface or SPI (3- / 4-wire) serial interface, an auxiliary
SPI (3- / 4-wire) serial interface for external device connections (i.e. camera module) is available for the
gyroscope only. This connection mode is described in Section 8 Mode 3 and Mode 4 - Auxiliary SPI modes.
•Mode 4: in addition to the primary I²C slave interface or SPI (3- / 4-wire) serial interface, an auxiliary
SPI (3- / 4-wire) serial interface for external device connections is available for both gyroscope and
accelerometer. This connection mode is described in Section 8 Mode 3 and Mode 4 - Auxiliary SPI modes.
AN5398 - Rev 3
page 15/132
3.7Accelerometer bandwidth
SLOPE
FILTER
HPCF_XL[2:0]
000
001
010
…
111
SPI
I2C
1
0
HP_SLOPE_XL_EN
LPF2_XL_EN
0
1
Digital
HP Filter
HPCF_XL[2:0]
Digital
LP Filter
LPF2
HPCF_XL[2:0]
S/D Tap
6D / 4D
0
1
LOW_PASS_ON_6D
1
0
SLOPE_FDS
Wake-up
Activity /
Inactivity
Free-fall
Advanced
functions
FIFO
ADC
Digital
LP Filter
ODR_XL[3:0]
LPF1
ODR/2
(1)
(1)
The cut-off value of this LPF1 output is:
• ODR/2 in High -Performance mode
• 780 Hz in Low-Power / Normal mode
USER
OFFSET
0
1
USR_OFF_ON_OUT
USR_OFF_W
OFS_USR[7:0]
1
0
USR_OFF_ON_WU
The accelerometer sampling chain is represented by a cascade of three main blocks: an ADC converter, a digital
low-pass filter (LPF1) and the composite group of digital filters.
Figure 2. Accelerometer filtering chain (UI path) shows the accelerometer sampling chain on the UI path;
the accelerometer sampling chain active on the OIS path (when using Mode 4 configuration) is described in
The analog signal coming from the mechanical parts is converted by the ADC; then, the digital LPF1 filter
provides different cutoff values based on the accelerometer mode selected:
•ODR / 2 when the accelerometer is configured in High-Performance mode;
•780 Hz when the accelerometer is configured in Low-Power/Normal mode;
Figure 2. Accelerometer filtering chain (UI path)
AN5398
Accelerometer bandwidth
AN5398 - Rev 3
The “Advanced functions” block in the figure above refers to Pedometer, Step Detector and Step Counter,
Significant Motion and Tilt functions, described in Section 6 Embedded functions, and also includes the Finite
State Machine and the Machine Learning Core.
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.
The LPF2_XL_EN bit of CTRL1_XL register and 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 10. Accelerometer
bandwidth selection in Mode 1/2/3. Referring to this table, on the low-pass path side, the Bandwidth columns
refer to the LPF1 bandwidth if LPF2_XL_EN = 0; they refer to the LPF2 bandwidth if LPF2_XL_EN = 1. On the
high-pass path side, the Bandwidth columns refer to the Slope filter bandwidth if HPCF_XL[2:0] = 000b; they refer
to the HP filter bandwidth for all the other configurations.
Table 10. 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.
page 16/132
Table 10. Accelerometer bandwidth selection in Mode 1/2/3
AN5398
Accelerometer bandwidth
HP_SLOPE_XL_ENLPF2_XL_ENHPCF_XL[2:0]
0-ODR / 2780 HzSee Table 12
000ODR / 4See Table 12
001ODR / 1010
0
(Low-pass path)
1
(High-pass path)
1. Settling time @ 99% of the final value, taking into account all output data rates and all operating mode switches
1
-
010ODR / 2019
011ODR / 4538
100ODR / 10075
101ODR / 200150
110ODR / 400296
111ODR / 800595
000ODR / 4 (slope filter)See Table 12
001ODR / 1014
010ODR / 2019
011ODR / 4538
100ODR / 10075
101ODR / 200150
110ODR / 400296
111ODR / 800595
BandwidthHPBandwidth
LP
Max overall settling time
(samples to be discarded)
(1)
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[2: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[2:0] field is used in order to enable, in addition to the LPF1 filter, either the Slope filter usage (when
HPCF_XL[2:0] = 000b) or the digital High-Pass filter (other HPCF_XL[2:0] configurations). The HPCF_XL[2:0]
field is also used to select the cutoff frequencies of the HP filter.
The high-pass filter 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_XL 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[2:0] field must be equal to 111b.
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.
The FASTSETTL_MODE_XL bit of CTRL8_XL register enables the accelerometer LPF2 or HPF fast-settling
mode: the selected filter sets the second sample after writing this bit. This feature applies only upon device exit
from Power-Down mode.
AN5398 - Rev 3
page 17/132
3.7.1Accelerometer slope filter
ACCE
LERATION
SLOPE
Slope(tn) = [ acc(tn) - acc(t
n-1
) ] / 2
acc(tn)
acc(t
n-1
)
As shown in Figure 3. Accelerometer slope filter, the device embeds a digital slope filter, which can also be used
for some embedded features such as single/double-tap recognition, wake-up detection and activity/inactivity.
The slope filter output data is computed using the following formula:
AN5398
Accelerometer turn-on/off time
slope(tn) = [ acc(tn) - acc(t
n-1
An example of a slope data signal is illustrated in the following figure.
Figure 3. Accelerometer slope filter
) ] / 2
3.8Accelerometer turn-on/off time
The accelerometer reading chain contains low-pass filtering to improve signal-to-noise performance and to reduce
aliasing effects. For this reason, it is necessary to take into account the settling time of the filters when the
accelerometer power mode is switched or when the accelerometer ODR is changed.
Accelerometer chain settling time is dependent on the power mode and output data rate selected for the following
configurations:
•LPF2 and HP filters disabled;
•LPF2 or HP filter enabled with ODR/4 bandwidth selection.
For these two possible configurations, the maximum overall turn-on/off in order to switch accelerometer power
modes or accelerometer ODR is the one shown below in Table 11. Accelerometer turn-on/off time (LPF2 and HP
disabled) and Table 12. Accelerometer samples to be discarded
Note: accelerometer ODR timing is not impacted by power mode changes (the new configuration is effective after
the completion of the current period).
AN5398 - Rev 3
page 18/132
Table 11. Accelerometer turn-on/off time (LPF2 and HP disabled)
Low-Power / Normal / High-PerformancePower-Down1 µs
1. Settling time @ 99% of the final value
Max turn-on/off time
Discard 3 samples
Discard 3 samples
Table 12. Accelerometer samples to be discarded
AN5398
Accelerometer turn-on/off time
(1)
Target mode
Accelerometer ODR [Hz]
1.6 (Low-Power)12
12.5 (Low-Power)12
26 (Low-Power)12
52 (Low-Power)12
104 (Normal)12
208 (Normal)12
12.5 (High-Performance)23
26 (High-Performance)23
52 (High-Performance)23
104 (High-Performance)23
208 (High-Performance)23
417 (High-Performance)23
833 (High-Performance)23
1667 (High-Performance)33
3333 (High-Performance)55
6667 (High-Performance)1111
Number of samples to be discarded
(LPF2 and HP filters disabled)
Number of samples to be discarded
(LPF2 or HP filter enabled @ODR/4 bandwidth)
Overall settling time if LPF2 or HP digital filters are enabled with bandwidth different from ODR/4 has been
already indicated in Table 10. Accelerometer bandwidth selection in Mode 1/2/3.
When the device is configured in Mode 4, the accelerometer UI path filtering chain is not impacted by the enable/
disable of the accelerometer/gyroscope OIS path filtering chain.
AN5398 - Rev 3
page 19/132
3.9Gyroscope bandwidth
ADC
Digital
HP Filter
HP_EN_G
0
1
LPF1_SEL_G
Digital
LP Filter
FTYPE[2:0]
LPF1
0
1
SPI
I2C
FIFO
Digital
LP Filter
ODR_G[3:0]
LPF2
HPM[1:0]_G
The gyroscope filtering chain depends on the connection mode in use.
When Mode 1 or Mode 2 is selected, the gyroscope filtering chain configuration is the one shown in
Figure 4. Gyroscope digital chain - Mode 1 and Mode 2. It is a cascade of three filters: a selectable digital
high-pass filter (HPF), a selectable digital low-pass filter (LPF1) and a digital low-pass filter (LPF2).
Figure 4. Gyroscope digital chain - Mode 1 and Mode 2
In High-Performance mode, the digital HP filter can be enabled by setting the bit HP_EN_G of CTRL7_G register
to 1. The digital HP filter cutoff frequency can be selected through the field HPM_G[1:0] of CTRL7_G register,
according to the following table.
AN5398
Gyroscope bandwidth
AN5398 - Rev 3
Table 13. Gyroscope digital HP filter cutoff selection
HPM_G[1:0]
000.01645
010.06511
100.2603
1. Settling time @ 99% of the final value
111.0400.7
High-pass filter cutoff frequency [Hz]
Overall maximum settling time [s]
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_[2:0] of CTRL6_C register.
The digital LPF2 filter cannot be configured by the user 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 gyroscope ODR values and for different configurations of the
LPF1_SEL_G bit of CTRL4_C register and FTYPE_[2:0] of CTRL6_C register is summarized in the following
table.
If Mode 3 or Mode 4 is enabled, the gyroscope digital chain becomes the one shown in Figure 5. Gyroscope
digital chain - Mode 3 and Mode 4. In this configuration, two different data chains are available:
•The User Interface (UI) chain, where the gyroscope data are provided to the primary I²C / SPI with an ODR
selectable from 12.5 Hz up to 6.66 kHz.
•The Optical Image Stabilization (OIS) chain, where the gyroscope data are provided to the auxiliary SPI with
an ODR fixed at 6.66 kHz.
Figure 5. Gyroscope digital chain - Mode 3 and Mode 4
In Mode 3/4, the LPF1 filter is dedicated to the OIS chain only; on the UI side, if the gyroscope is configured in
High-Performance mode, the total bandwidth depends on the gyroscope ODR value, as shown in Table 15. UI
chain - gyroscope overall bandwidth selection in Mode 3/4.
The digital HP filter is shared between the UI and OIS chains, but it can be applied to only one chain at a time:
•if the HP_EN_G bit of CTRL7_G register is set to 1, the HP filter is applied to the UI chain only, regardless of
the value of the HP_EN_OIS bit of CTRL2_OIS register;
•if the HP_EN_G bit is set to 0 and the HP_EN_OIS bit is set to 1, the HP filter is applied to the OIS chain.
Note: The digital LPF1 filter is not available on the gyroscope UI 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/4 connection modes and the gyroscope OIS chain is provided in
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 device 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 the one shown in Table 16. Gyroscope turn-on/off time in
Mode 1/2 (HP disabled).
Note: The gyroscope ODR timing is not impacted by power mode changes (the new configuration is effective after
the completion of the current period).
Table 16. Gyroscope turn-on/off time in Mode 1/2 (HP disabled)
Starting modeTarget mode
Power-DownSleep70 ms
Power-DownLow-Power / Normal70 ms + discard 1 sample
Power-DownHigh-Performance70 ms + see Table 17 or Table 18
Table 17. Gyroscope samples to be discarded in Mode 1/2 (LPF1 disabled)
Gyroscope ODR [Hz]
12.5 Hz2
26 Hz3
52 Hz3
104 Hz3
208 Hz3
417 Hz3
833 Hz3
1.66 kHz4
3.33 kHz5
1. Settling time @ 99% of the final value
6.66 kHz6
Table 18. Gyroscope chain settling time in Mode 1/2 (LPF1 enabled)
FTYPE[2:0]
0003.5
0014.8
0106.9
0112.1
10011
10122
11030
1. Settling time @ 99% of the final value
11160
Number of samples to be discarded
Maximum settling time @ each ODR [ms]
AN5398
Gyroscope turn-on/off time
(1)
(1)
When there is a mode change to High-Performance mode and the HP filter is enabled, or the HP filter is turned
on, the HP filter settling time must be added to Table 16. Gyroscope turn-on/off time in Mode 1/2 (HP disabled).
The HP filter settling time is independent from the ODR and is shown in Table 13. Gyroscope digital HP filter
cutoff selection.
When the device is configured in Mode 3 or 4, the gyroscope UI path filtering chain is not impacted by the
enable/disable of the gyroscope OIS path filtering chain.
AN5398 - Rev 3
page 24/132
4Mode 1 - Reading output data
4.1Startup sequence
Once the device is powered up, it automatically downloads the calibration coefficients from the embedded flash
to the internal registers. When the boot procedure is completed, i.e. after approximately 10 milliseconds, the
accelerometer and gyroscope automatically enter Power-Down mode.
To turn on the accelerometer and gather acceleration data through the primary I²C / SPI interface, it is necessary
to select one of the operating modes through the CTRL1_XL register.
The following general-purpose sequence can be used to configure the accelerorometer:
1.Write INT1_CTRL = 01h// Acc data-ready interrupt on INT1
To turn on the gyroscope and gather angular rate data through the primary I²C / SPI interface, it is necessary to
select one of the operating modes through CTRL2_G.
The following general-purpose sequence can be used to configure the gyroscope:
AN5398
Mode 1 - Reading output data
1.Write INT1_CTRL = 02h// Gyro data-ready interrupt on INT1
The device is provided with a STATUS_REG register which should be polled to check when a new set of data is
available. The XLDA bit is set to 1 when a new set of data is available at the accelerometer output; the GDA bit is
set to 1 when a new set of data is available at the gyroscope output.
For the accelerometer (the gyroscope is similar), the read of the output registers should be performed as follows:
1.Read STATUS_REG
2.If XLDA = 0, then go to 1
3.Read OUTX_L_A
4.Read OUTX_H_A
5.Read OUTY_L_A
6.Read OUTY_H_A
7.Read OUTZ_L_A
8.Read OUTZ_H_A
9.Data processing
10. Go to 1
AN5398 - Rev 3
page 25/132
4.3Using the data-ready signal
DATA
DRDY
DATA READ
The device can be configured to have one hardware signal to determine when a new set of measurement data is
available to be read.
For the accelerometer sensor, the data-ready signal is represented by the XLDA bit of the STATUS_REG register.
The signal can be driven to the INT1 pin by setting the INT1_DRDY_XL bit of the INT1_CTRL register to 1 and to
the INT2 pin by setting the INT2_DRDY_XL bit of the INT2_CTRL register to 1.
For the gyroscope sensor, the data-ready signal is represented by the GDA bit of the STATUS_REG register. The
signal can be driven to the INT1 pin by setting the INT1_DRDY_G bit of the INT1_CTRL register to 1 and to the
INT2 pin by setting the INT2_DRDY_G bit of the INT2_CTRL register to 1.
The data-ready signal rises to 1 when a new set of data has been generated and it is available to be read.
The data-ready signal can be either latched or pulsed: if the dataready_pulsed bit of the COUNTER_BDR_REG1
register is set to 0 (default value), then the data-ready signal is latched and the interrupt is reset when the
higher part of one of the enabled channels is read (29h, 2Bh, 2Dh for the accelerometer; 23h, 25h, 27h for the
gyroscope). If the dataready_pulsed bit of the COUNTER_BDR_REG1 register is set to 1, then the data-ready is
pulsed and the duration of the pulse observed on the interrupt pins is 75 μs. Pulsed mode is not applied to the
XLDA and GDA bits which are always latched.
AN5398
Using the data-ready signal
Figure 6. Data-ready signal
4.3.1DRDY mask functionality
Setting the DRDY_MASK bit of the CTRL4_C register to 1, the accelerometer and gyroscope data-ready signals
are masked until the settling of the sensor filters is completed.
When FIFO is active and the DRDY_MASK bit is set to 1, accelerometer/gyroscope invalid samples stored in
FIFO can be equal to 7FFFh, 7FFEh or 7FFDh. In this way, a tag is applied to the invalid samples stored in the
FIFO buffer so that they can be easily identified and discarded during data post-processing.
Note: The DRDY_MASK bit acts only on the accelerometer LPF1 digital filter settling time for every accelerometer
ODR and on the gyroscope LPF2 digital filter settling time for gyroscope ODR ≤ 833 Hz.
4.4Using the block data update (BDU) feature
If reading the accelerometer/gyroscope data is particularly slow and cannot be synchronized (or it is not required)
with either the XLDA/GDA bits in the STATUS_REG register or with the DRDY signal driven to the INT1/INT2
pins, it is strongly recommended to set the BDU (Block Data Update) bit to 1 in the CTRL3_C register.
This feature avoids reading values (most significant and least significant parts of output data) related to different
samples. In particular, when the BDU is activated, the data registers related to each channel always contain the
most recent output data produced by the device, but, in case the read of a given pair (i.e. OUTX_H_A(G) and
OUTX_L_A(G), OUTY_H_A(G) and OUTY_L_A(G), OUTZ_H_A(G) and OUTZ_L_A(G)) is initiated, the refresh
for that pair is blocked until both MSB and LSB parts of the data are read.
Note: BDU only guarantees that the LSB part and MSB part have been sampled at the same moment. For
example, if the reading speed is too slow, X and Y can be read at T1 and Z sampled at T2.
The BDU feature also acts on the FIFO_STATUS1 and FIFO_STATUS2 registers. When the BDU bit is set to 1, it
is mandatory to read FIFO_STATUS1 first and then FIFO_STATUS2.
AN5398 - Rev 3
page 26/132
4.5Understanding output data
The measured acceleration data are sent to the OUTX_H_A, OUTX_L_A, OUTY_H_A, OUTY_L_A, OUTZ_H_A,
and OUTZ_L_A registers. These registers contain, respectively, the most significant part and the least significant
part of the acceleration signals acting on the X, Y, and Z axes.
The measured angular rate data are sent to the OUTX_H_G, OUTX_L_G, OUTY_H_G, OUTY_L_G, OUTZ_H_G,
and OUTZ_L_G registers. These registers contain, respectively, the most significant part and the least significant
part of the angular rate signals acting on the X, Y, and Z axes.
The complete output data for the X, Y, Z channels is given by the concatenation OUTX_H_A(G) & OUTX_L_A(G),
OUTY_H_A(G) & OUTY_L_A(G) , OUTZ_H_A(G) & OUTZ_L_A(G) and it is expressed as a two’s complement
number.
Both acceleration data and angular rate data are represented as 16-bit numbers.
4.5.1Examples of output data
Table 19. Content of output data registers vs. acceleration (FS_XL = ±2 g) provides a few basic examples of the
accelerometer data that is read in the data registers when the device is subjected to a given acceleration.
Table 20. Content of output data registers vs. angular rate (FS_G = ±250 dps ) provides a few basic examples of
the gyroscope data that is read in the data registers when the device is subjected to a given angular rate.
The values listed in the following tables are given under the hypothesis of perfect device calibration (i.e. no offset,
no gain error, …).
AN5398
Understanding output data
Table 19. Content of output data registers vs. acceleration (FS_XL = ±2 g)
Acceleration values
0 g
350 mg16h69h
1 g40h09h
-350 mgE9h97h
-1 gBFhF7h
OUTX_H_A (29h)OUTX_L_A (28h)
00h00h
Register address
Table 20. Content of output data registers vs. angular rate (FS_G = ±250 dps )
Angular rate values
0 dps
100 dps2ChA4h
200 dps59h49h
-100 dpsD3h5Ch
-200 dpsA6hB7h
OUTX_H_G (23h)OUTX_L_G (22h)
00h00h
Register address
AN5398 - Rev 3
page 27/132
4.6Accelerometer offset registers
The device provides accelerometer offset registers (X_OFS_USR, Y_OFS_USR, Z_OFS_USR) which can be
used for zero-g offset correction or, in general, to apply an offset to the accelerometer output data.
The accelerometer offset block can be enabled by setting the USR_OFF_ON_OUT bit of the CTRL7_G register.
The offset value set in the offset registers is internally subtracted from the measured acceleration value for the
respective axis; internally processed data are then sent to the accelerometer output register and to the FIFO (if
enabled). These register values are expressed as an 8-bit word in two’s complement and must be in the range
[-127, 127].
The weight [g/LSB] to be applied to the offset register values is independent of the accelerometer selected full
scale and can be configured using the USR_OFF_W bit of the CTRL6_C register:
-10
•2
•
g/LSB if the USR_OFF_W bit is set to 0;
2-6 g/LSB if the USR_OFF_W bit is set to 1.
4.7Rounding functions
The rounding function can be used to auto address the device registers for a circular burst-mode read. Basically,
with a multiple read operation the address of the register that is being read goes automatically from the first
register to the last register of the pattern and then goes back to the first one.
4.7.1Rounding of FIFO output registers
The rounding function is automatically enabled when performing a multiple read operation of the FIFO output
registers: after reading FIFO_DATA_OUT_Z_H (7Eh), the address of the next register that will be read goes
automatically back to FIFO_DATA_OUT_TAG (78h), allowing the user to read many data with a unique multiple
read.
AN5398
Accelerometer offset registers
4.7.2Rounding of sensor output registers
It is possible to apply the rounding function to the other output registers.
The rounding function can also be enabled for the following groups of output registers:
•Accelerometer output registers, from OUTX_L_A (28h) to OUTZ_H_A (2Dh);
•Gyroscope output registers, from OUTX_L_G (22h) to OUTZ_H_G (27h);
•Gyroscope and accelerometer output registers, from OUTX_L_G (22h) to OUTZ_H_A (2Dh).
The output register rounding pattern can be configured using the bits ROUNDING[1:0] of the CTRL5_C register,
as indicated in the following table.
Table 21. Output register rounding pattern
ROUNDING[1:0]Rounding pattern
00No rounding
01Accelerometer only
10Gyroscope only
11Gyroscope + Accelerometer
AN5398 - Rev 3
page 28/132
4.8DEN (data enable)
The device allows an external trigger level recognition by enabling the TRIG_EN, LVL1_EN, LVL2_EN bits in
CTRL6_C register.
Four different modes can be selected (see Table 22. DEN configurations):
•Edge-sensitive trigger mode;
•Level-sensitive trigger mode;
•Level-sensitive latched mode;
•Level-sensitive FIFO enable mode.
The Data Enable (DEN) input signal must be driven on the INT2 pin, which is configured as an input pin when one
of these modes is enabled.
The DEN functionality is active by default on the gyroscope data only. To extend this feature to the accelerometer
data, the bit DEN_XL_EN in CTRL4_C register must be set to 1.
The DEN active level is low by default. It can be changed to active-high by setting the bit DEN_LH in CTRL5_C
register to 1.
TRIG_EN LVL1_EN LVL2_ENFunctionTrigger typeAction
000Data enable off--
100Edge-sensitive trigger modeEdgeData generation
010Level-sensitive trigger modeLevelData stamping
011Level-sensitive latched modeEdgeData stamping
110Level-sensitive FIFO enable modeLevelData generation in FIFO and stamping
AN5398
DEN (data enable)
Table 22. DEN configurations
AN5398 - Rev 3
page 29/132
4.8.1Edge-sensitive trigger mode
Edge-sensitive trigger mode can be enabled by setting the TRIG_EN bit in CTRL6_C to 1, and LVL1_EN,
LVL2_EN bits in CTRL6_C register to 0.
Once the edge-sensitive trigger mode is enabled, the FIFO buffer and output registers are filled with the first
sample acquired after every rising edge (if DEN_LH bit is equal to 1) or falling edge (if DEN_LH bit is equal to 0)
of the DEN input signal.
The following figure shows, with red circles, the samples acquired after the falling edges (DEN active-low).
Figure 7. Edge-sensitive trigger mode, DEN active-low
AN5398
DEN (data enable)
Edge-sensitive trigger mode, when enabled, acts only on the gyroscope output registers. GDA is related only to
downsampled data, while the accelerometer output registers and XLDA 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 can be
used by setting the gyroscope in Power-Down.
Please note that the DEN level is internally read just before the update of the data registers: if a level change
occurs after the read, DEN will be acknowledged in the next ODR.
AN5398 - Rev 3
page 30/132
Loading...
+ 102 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.