The various sensing elements are manufactured
using specialized micromachining processes,
while the IC interfaces are developed using a
CMOS technology that allows the design of a
dedicated circuit which is trimmed to better match
the sensing element characteristics.
The LSM330 has an user-selectable full scale
acceleration range of ±2 g/±4 g/±6 g/±8 g/±16 g
and angular rate range of ±250/±500/±2000
d.The accelerometer and gyroscope sensors can
be either activated or separately put in Powerdown/ sleep mode for applications optimized for
power saving.
The LSM330 is available in a plastic land grid
array (LGA) package.
Table 1.Device summary
Part number
LSM330-40 to +85
LSM330TR-40 to +85
Temperature
range [°C]
PackagePacking
LGA-24L
(3x3.5x1mm)
Tr a y
Tape
and reel
The LSM330 is a system-in-package featuring a
3D digital accelerometer with two embedded state
machines that can be programmed to implement
autonomous applications and a 3D digital
gyroscope.
ST’s family of MEMS sensor modules leverages
the robust and mature manufacturing processes
already used for the production of micromachined
accelerometers and gyroscopes.
July 2012Doc ID 023426 Rev 11/76
This is preliminary information on a new product foreseen to be developed. Details are subject to change without notice.
I2C serial data (SDA)
SPI serial data input (SDI)
3-wire interface serial data output (SDO)
Gyroscope:
SPI serial data output (SDO)
2
I
C least significant bit of the device address (SA0)
Accelerometer:
SPI serial data output (SDO)
2
I
C least significant bit of the device address (SA0)
Gyroscope: SPI enable
2
C/SPI mode selection (1: SPI idle mode / I2C communication
I
enabled; 0: SPI communication mode / I
Accelerometer: SPI enable
2
I
C/SPI mode selection (1: SPI idle mode / I2C communication
enabled; 0: SPI communication mode / I
Gyroscope Data Ready/FIFO Interrupt
(Watermark/Overrun/Empty)
2
C disabled)
2
C disabled)
LSM330Block diagram and pin description
Table 2.Pin description (continued)
Pin#NameFunction
10INT1_GGyroscope interrupt signal
11INT1_AAccelerometer interrupt1 signal
12INT2_AAccelerometer interrupt2 signal
13DEN_GGyroscope Data Enable
14ResReserved. Connect to GND
15ResReserved. Connect to GND
16ResReserved. Connect to GND
17ResReserved. Connect to GND
18ResReserved. Connect to GND
19GND0 V supply
20GND0 V supply
21CAPConnect to GND with ceramic capacitor
22Vdd
23Vdd
24Vdd
(3)
(3)
(3)
Power supply
Power supply
Power supply
(2)
1. 100 nF filter capacitor recommended.
2. 10 nF (+/- 10%), 25V. 1nF minimum value has to be guaranteed under 11V bias condition1.
3. 100 nF plus 10 µF capacitors recommended.
Doc ID 023426 Rev 113/76
Module specificationsLSM330
2 Module specifications
2.1 Mechanical characteristics
@ Vdd = 3V, T = 25 °C unless otherwise noted
Table 3.Mechanical characteristics
SymbolParameterTest conditionsMin.Typ.
FS bit set to 000±2.0
FS bit set to 001±4.0
LA_FS
G_FS
LA_SoLinear acceleration sensitivity
G_SoAngular rate sensitivity
LA_TyOff
G_TyOff
TopOperating temperature range-40+85°C
1. Typical specifications are not guaranteed.
2. Verified by wafer level test and measurement of initial offset and sensitivity.
3. Typical zero-g level offset value after MSL3 preconditioning.
4. Offset can be eliminated by enabling the built-in high-pass filter.
Linear acceleration measurement
(2)
range
Angular rate
measurement range
Linear acceleration typical zero-g
level offset accuracy
Angular rate typical zero-rate
(4)
level
(3)
(3)
FS bit set to 010±6.0
FS bit set to 011±8.0
FS bit set to 100±16.0
FS bit set to 00±250
FS bit set to 10±2000
FS bit set to 0000.061
FS bit set to 0010.122
FS bit set to 0100.183
FS bit set to 0110.244
FS bit set to 1000.732
FS = ±250 dps8.75
FS = ±500 dps17.50
FS = ±2000 dps70
FS bit set to 000±60mg
FS = 250 dps±10
FS = 2000 dps±25
(a)
(1)
Max.Unit
g
dpsFS bit set to 01±500
mg/digit
mdps/
digit
dpsFS = 500 dps±15
a. The product is factory calibrated at 3.0 V. The operational power supply range is from 2.4 V to 3.6 V.
14/76Doc ID 023426 Rev 1
LSM330Module specifications
2.2 Electrical characteristics
@ Vdd = 3 V, T = 25 °C unless otherwise noted
Table 4.Electrical characteristics
SymbolParameterTest conditionsMin.Typ.
VddSupply voltage2.43.6V
Vdd_IOPower supply for I/O1.71Vdd+0.1V
(1)
Max.Unit
LA_Idd
LA_IddPdn
G_Idd
G_IddLowP
G_IddPdn
VIHDigital high level input voltage0.8*Vdd_IOV
VILDigital low level input voltage0.2*Vdd_IOV
VOHHigh level output voltage0.9*Vdd_IOV
VOLLow level output voltage0.1*Vdd_IOV
TopOperating temperature range-40+85
1. Typical specifications are not guaranteed.
2. Sleep mode introduces a faster turn-on time compared to Power-down mode.
Accelerometer current
consumption in Normal mode
Accelerometer current
consumption in Power-down
mode
Gyroscope current
consumption in Normal mode
Gyroscope supply current
in Sleep mode
Gyroscope current
consumption in Power-down
mode
(2)
1.6 kHz ODR 250
3.125 Hz ODR10
1µA
6.1mA
2mA
5µA
µA
°C
2.3 Temperature sensor characteristics
@ Vdd = 3V, T = 25 °C unless otherwise noted
Table 5.Temperature sensor characteristics
SymbolParameterTest conditionMin.Typ.
TSDr
TODRTemperature refresh rate1Hz
Top Operating temperature range-40+85°C
1. Typical specifications are not guaranteed.
Temperature sensor output
change vs. temperature
-
b. The product is factory calibrated at 3.0 V.
Doc ID 023426 Rev 115/76
(b)
(1)
-1°C/digit
Max.Unit
Module specificationsLSM330
SPC
CS
SD I
SD O
t
su (CS)
t
v(SO)
t
h(SO )
t
h(SI)
t
su (SI)
t
h(CS)
t
dis(SO)
t
c(SPC )
MSB IN
MSB OUT
LSB OUT
LSB IN
(2)
(2)
(2)
(2)
(2)
(2)
(2)
(2)
2.4 Communication interface characteristics
2.4.1 SPI - serial peripheral interface
Subject to general operating conditions for Vdd and TOP.
Table 6.SPI slave timing values
(2)
Symbol
Parameter
(1)
tc(SPC)SPI clock cycle100ns
fc(SPC)SPI clock frequency10MHz
tsu(CS)CS setup time6
th(CS)CS hold time8
tsu(SI)SDI input setup time5
th(SI)SDI input hold time15
tv(SO)SDO valid output time50
th(SO)SDO output hold time9
tdis(SO)SDO output disable time50
Val ue
Unit
MinMax
ns
1. Data on CS, SPC, SDI and SDO refer to pins:CS_A, CS_G, SCL_A/G, SDA_A/G, SDO_A / SDO_G.
2. Values are guaranteed at 10 MHz clock frequency for SPI with both 4 and 3 wires, based on characterization results. Not
tested in production.
(c)
Figure 3.SPI slave timing diagram
2. Data on CS, SPC, SDI and SDO refer to pins:CS_A, CS_G, SCL_A/G, SDA_A/G, SDO_A / SDO_G.
c. Measurement points are done at 0.2·Vdd_IO and 0.8·Vdd_IO, for both input and output ports.
16/76Doc ID 023426 Rev 1
LSM330Module specifications
6'$
6&/
W
I6'$
W
VX63
W
Z6&//
W
VX6'$
W
U6'$
W
VX65
W
K67
W
Z6&/+
W
K6'$
W
U6&/
W
I6&/
W
Z6365
67$57
5(3($7('
67$57
6723
67$57
!-V
2.4.2 I2C - inter IC control interface
Subject to general operating conditions for Vdd and TOP.
Table 7.I2C slave timing values
SymbolParameter
(1)
I2C standard mode
(1)
I2C fast mode
Min.Max.Min.Max.
(1)
Unit
f
(SCL)
t
w(SCLL)
t
w(SCLH)
t
su(SDA)
t
h(SDA)
t
r(SDA) tr(SCL)
t
f(SDA) tf(SCL)
t
h(ST)
t
su(SR)
t
su(SP)
t
w(SP:SR)
1. SCL (SCL_A/G pin), SDA (SDA_A/G pin).
2. Cb = total capacitance of one bus line, in pF
Figure 4.I
SCL clock frequency01000400KHz
SCL clock low time4.71.3
SCL clock high time4.00.6
SDA setup time250100ns
SDA data hold time0.013.4500.9µs
SDA and SCL rise time1000
SDA and SCL fall time300
START condition hold time40.6
Repeated START condition
setup time
STOP condition setup time40.6
Bus free time between STOP
and START condition
2
C slave timing diagram
(d)
20 + 0.1C
20 + 0.1C
4.70.6
4.71.3
b
b
(2)
(2)
µs
300
ns
300
µs
d. Measurement points are done at 0.2·Vdd_IO and 0.8·Vdd_IO, for both ports.
Doc ID 023426 Rev 117/76
Module specificationsLSM330
This is a mechanical shock sensitive device, improper handling can cause permanent
damage to the part.
This is an ESD sensitive device, improper handling can cause permanent damage to
the part.
2.5 Absolute maximum ratings
Stresses above those listed as “absolute maximum ratings” may cause permanent damage
to the device. This is a stress rating only and functional operation of the device under these
conditions is not implied. Exposure to maximum rating conditions for extended periods may
affect device reliability.
Table 8.Absolute maximum ratings
SymbolRatingsMaximum valueUnit
VddSupply voltage-0.3 to 4.8V
Vdd_IOI/O pins supply voltage-0.3 to 4.8V
(1)
Vin
Input voltage on any control pin (SCL_A/G, SDA_A/G,
SDO_A, SDO_G, CS_A, CS_G, DEN_G)
-0.3 to Vdd_IO +0.3V
3000 g for 0.5 ms
A
POW
Acceleration (any axis, powered, Vdd = 3 V)
10000 g for 0.1 ms
3000 g for 0.5 ms
A
T
UNP
T
STG
Acceleration (any axis, unpowered)
10000 g for 0.1 ms
Operating temperature range-40 to +85°C
OP
Storage temperature range-40 to +125°C
ESDElectrostatic discharge protection2 (HBM)kV
1. Supply voltage on any pin should never exceed 4.8 V.
18/76Doc ID 023426 Rev 1
LSM330Terminology
3 Terminology
3.1 Sensitivity
Linear acceleration sensitivity can be determined e.g. by applying 1 g acceleration to the
device. Because the sensor can measure DC accelerations, this can be done easily by
pointing the selected axis towards the ground, noting the output value, rotating the sensor
180 degrees (pointing towards the sky) and noting the output value again. By doing so, ±1 g
acceleration is applied to the sensor. Subtracting the larger output value from the smaller
one, and dividing the result by 2, leads to the actual sensitivity of the sensor. This value
changes very little over temperature and over time. The sensitivity tolerance describes the
range of sensitivities of a large number of sensors.
Angular Rate Sensitivity describes the angular rate gain of the sensor and can be
determined by applying a defined angular velocity to the device. This value changes very
little overtemperature and also very little overtime.
3.2 Zero-g and zero rate level
Linear acceleration zero-g level offset (TyOff) describes the deviation of an actual output
signal from the ideal output signal if no acceleration is present. A sensor in a steady state on
a horizontal surface will measure 0 g on both the X axis and Y axes, whereas the Z axis will
measure 1 g. Ideally, the output is in the middle of the dynamic range of the sensor (content
of OUT registers 00h, data expressed as 2’s complement number). A deviation from the
ideal value in this case is called zero-g offset.
Offset is to some extent a result of stress to MEMS sensor and therefore the offset can
slightly change after mounting the sensor onto a printed circuit board or exposing it to
extensive mechanical stress. Offset changes little over temperature, see “Linear
acceleration zero-g level change vs. temperature” in Ta bl e 3 . The zero-g level tolerance
(TyOff) describes the standard deviation of the range of zero-g levels of a group of sensors.
Angular rate zero-rate level describes the actual output value if there is no angular rate
present. zero-rate level of precise MEMS sensors is, to some extent, a result of stress to the
sensor and therefore zero-rate level can slightly change after mounting the sensor onto a
printed circuit board or after exposing it to extensive mechanical stress. This value changes
very little overtemperature and overtime.
Doc ID 023426 Rev 119/76
FunctionalityLSM330
4 Functionality
The LSM330 is a system-in-package featuring a 3D digital accelerometer with two
embedded state machines and a 3D digital gyroscope, together with two FIFO memory
block available to manage linear acceleration and angular rate data.
The device includes specific sensing elements and two IC interfaces capable to measuring
both the acceleration and angular rate applied to the module and to provide a signal to
external applications through an SPI/I
The various sensing elements are manufactured using specialized micromachining
processes, while the IC interfaces are developed using a CMOS technology that allows the
design of a dedicated circuit which is trimmed to better match the sensing element
characteristics.
4.1 Power modes
The linear acceleration sensor and the angular rate sensor can be either activated or
separately set in Power-down/ sleep mode for applications optimized for power saving.
The acceleration sensor operating modes can be selected between normal or power-down
trough the CTRL_REG5_A (20h); the angular rate sensor operating mode can be selected
among normal power-down or sleep mode, through CTRL_REG1_G (20h).
2
C serial interface.
4.2 Linear acceleration sensor digital main blocks
4.2.1 State machine
The LSM330 embeds two state machines able to run a user defined program.
The program is composed by a set of instructions that define the transition to successive
states. Conditional branches are possible.
From each state (n) it is possible to have transition to next state (n+1) or to reset state.
Transition to Reset Point happens when “RESET condition” is true; Transition to next step
happens when “NEXT condition” is true.
Interrupt is triggered when Output/Stop/Continue state is reached.
Each State machine allows to implement in a flexible way gesture recognition, Free Fall,
Wake-up, 4D/6D orientation, pulse counter and step recognition, click/double click,
shake/double shake, face up/face down, turn/double turn:
–Code and parameters are loaded by host into dedicated memory areas for the
state program
–State program with timing based on ODR or decimated time
–Possibiliy of conditional branches
20/76Doc ID 023426 Rev 1
LSM330Functionality
State 1
State 2
next
State 3
next
State n
next
reset
reset
reset
reset
START
OUTPUT/STOP/CONTINUE
INT set
AM14725v1
Table 9.LSM330 accelerometer state machines: sequence of state to execute an
algorithm
4.2.2 FIFO
LSM330 embeds 32 slots of data FIFO for each of the three acceleration output
channels: X, Y and Z. This allows consistent power saving for the system, since the host
processor does not need to continuously poll data from the sensor, but it can wake up only
when needed and burst the significant data out from the FIFO. In order to use FIFO it is
necessary to enable FIFO_EN bit inCTRL_REG7_A (25h)register.
FIFO buffer can work accordingly in five different modes: Bypass mode, FIFO mode, Stream
mode, Stream-to-FIFO mode and Bypass-to-Stream mode. Each mode is selected by
FMODE [2:0] bits in the FIFO_CTRL_REG_A (2Eh) register. Programmable watermark
level, FIFO empty or FIFO overrun events can be enabled to generate dedicated interrupts
on the INT1_A/INT2_A pin (configured through INT2_EN and INT1_EN bits in the
CTRL_REG4_A (23h) register).
When FIFO is empty, EMPTY bit in FIFO_SRC_REG_A (2Fh) is equal to '1' and no samples
are available.
If the application requires a lower number of samples a programmable watermark level can
be set. In FIFO_SRC_REG_A (2Fh) WTM bit is high if a new data arrives and FSS [4:0] bit
in FIFO_SRC_REG_A (2Fh) is greater than or equal to WTMP [4:0] bit in
FIFO_CTRL_REG_A (2Eh) register. In FIFO_SRC_REG_A (2Fh) WTM bit goes to '0' if
reading X, Y, Z data slot from FIFO and FSS [4:0] bit in FIFO_SRC_REG_A (2Fh) is minor
than or equal to WTMP [4:0] bit in FIFO_CTRL_REG_A (2Eh) register.
When FIFO is completely filled, OVRN_FIFO bit in FIFO_SRC_REG_A (2Fh) is equal to '1'
and FIFO slot is overwritten.
Doc ID 023426 Rev 121/76
FunctionalityLSM330
4.2.3 Bypass mode
In Bypass mode, the FIFO is not operational and it remains empty. For each channel only
the first address is used. The remaining FIFO slots are empty.
Bypass mode must be used in order to reset the FIFO buffer when a different mode is
operating (i.e. FIFO mode).
4.2.4 FIFO mode
In FIFO mode, the buffer continues filling data from the X, Y and Z accelerometer channels
until it is full (32 samples set stored). When the FIFO is full it stops collecting data from the
input channels and the FIFO content remains unchanged.
An overrun interrupt can be enabled, P1_OVERRUN = '1' in CTRL_REG7_A (25h) register,
in order to be raised when the FIFO stops collecting data. When overrun interrupt occurs,
the first data has been overwritten and the FIFO stops collecting data from the input
channels.
At the end of the reading procedure it is necessary to transit from Bypass mode to reset
FIFO content. . After this reset command it is possible to restart FIFO mode writing FMODE
[2:0] the value '001' in FIFO_CTRL_REG_A (2Eh) register.
FIFO buffer can memorize 32 X, Y and Z data but the depth of the FIFO can be reduced by
a programmable watermark. In order to enable FIFO watermark, WTM_EN bit in
CTRL_REG7_A (25h) is high and the FIFO depth is set in WTMP [4:0] bits in
FIFO_CTRL_REG_A (2Eh) register. The watermark interrupt can be enable in INT1_A pad
if P1_WTMbit in CTRL_REG7_A (25h) register is enable.
4.2.5 Stream mode
In Stream mode FIFO continues filling data from X, Y, and Z accelerometer channels, when
the buffer is full (32 samples set stored) the FIFO buffer index restarts from the beginning
and older data is replaced by the current. The oldest values continue to be overwritten until
a read operation makes free FIFO slots available.
An overrun interrupt can be enabled, P1_OVERRUN = '1' in CTRL_REG7_A (25h) register,
in order to read the whole FIFO content at once. If in the application it is mandatory not to
lose data and it is not possible to read at least one sample for each axis within one ODR
period, a watermark interrupt can be enabled in order to read partially the FIFO and let free
memory slots for data incoming.
Setting the WTMP [4:0] bit in FIFO_CTRL_REG_A (2Eh) register to N value, the number of
X, Y and Z data samples that should be read at watermark interrupt rising is up to (N+1).
In the latter case reading all FIFO content before an overrun interrupt has occurred, the first
data read is equal to the last already read in previous burst, so the number of new data
available in FIFO depends on previous reading (see FIFO_SRC_REG_A (2Fh)) .
At the end of the reading procedure it is necessary to transit from Bypass mode to reset
FIFO content.
4.2.6 Stream-to-FIFO mode
In Stream-to-FIFO mode FIFO behavior changes according to interrupt generated by the
configuration of the two state machine by INT_SM1and INT_SM2 bits in STAT (18h) register.
22/76Doc ID 023426 Rev 1
LSM330Functionality
ADC
LPF1
HPF
0
1
HPen
LPF2
10
11
01
00
Out_Sel
DataReg
00
11
10
01
Interrupt
generator
INT_Sel
I2C
SPI
INT1
SCR REG
CONF REG
FIFO
32x16x3
AM07230v1
When INT_SM1, INT_SM2 bits in STAT (18h) register are equal to '1' FIFO operates in FIFO
mode, when INT_SM1, INT_SM2 bit in STAT (18h) register are equal to '0' FIFO operates in
Stream mode.
4.2.7 Bypass-to-stream mode
In Bypass-to-stream mode, the FIFO starts operating in Bypass mode and once a trigger
event occurs (STAT (18h) the FIFO starts operating in Stream mode.
4.2.8 Retrieve data from FIFO
FIFO data is read through OUT_X_L_A (28h) and OUT_X_H_A (29h), OUT_Y_L_A (2Ah)
and OUT_Y_H_A (2Bh) and OUT_Z_L_A (2Ch) and OUT_Z_H_A (2Dh). When the FIFO is
in Stream, Trigger or FIFO mode, a read operation to the OUT_X_L_A (28h) and
OUT_X_H_A (29h), OUT_Y_L_A (2Ah) and OUT_Y_H_A (2Bh) or OUT_Z_L_A (2Ch) and
OUT_Z_H_A (2Dh) registers provides the data stored in the FIFO. Each time data is read
from the FIFO, the oldest X, Y and Z data are placed in the OUT_X_L_A (28h) and
OUT_X_H_A (29h), OUT_Y_L_A (2Ah) and OUT_Y_H_A (2Bh) and OUT_Z_L_A (2Ch)
and OUT_Z_H_A (2Dh) registers and both single read and read_burst operations can be
used.
4.3 Angular rate sensor digital main blocks
Figure 5.Angular rate sensor digital block diagram
Doc ID 023426 Rev 123/76
FunctionalityLSM330
l
x
0
y
z
0
y
0
x
1
y
1
z
1
x
2
y
2
z
2
x
31
y
31
z
31
xi,yi,z
i
empty
AM07231v1
4.3.1 FIFO
LSM330 embeds a 32 slots of 16 bit data FIFO buffer for each of the three output channels,
yaw, pitch and roll. This allows a consistent power saving for the system, since the host
processor does not need to continuously poll data from the sensor, but it can wake up only
when needed and burst the significant data out from the FIFO.
In order to use FIFO it is necessary to enable FIFO_EN bit in CTRL_REG5_G (24h)
register. FIFO buffer can work accordingly to five different modes: Bypass mode, FIFO
mode, Stream mode, Bypass-to-Stream mode and Stream-to-FIFO mode. Each mode is
selected by the FM[2:0] bits into the FIFO_CTRL_REG_G (2Eh) register.
Programmable watermark level, FIFO empty or FIFO full events can be enabled to generate
dedicated interrupts on DRDY_G/INT2_G pin (configuration through CTRL_REG3_G (22h))
and event detection information are available into FIFO_SRC_REG_G (2Fh). Watermark
level can be configurated to WTM[4:0] bits into FIFO_CTRL_REG_G (2Eh).
4.3.2 Bypass mode
In bypass mode, the FIFO is not operational and for this reason it remains empty. As
described in the next figure, for each channel only the first address is used. The remaining
FIFO slots are empty. When a new data is available the old one is overwritten.
Figure 6.Bypass mode
4.3.3 FIFO mode
In FIFO mode, data from yaw, pitch and roll channels are stored into the FIFO. A watermark
interrupt can be enabled (I2_WTM bit into CTRL_REG3_G (22h)) in order to be raised when
the FIFO is filled to the level specified into the WTM[4:0] bits of FIFO_CTRL_REG_G (2Eh)
register. The FIFO continues filling until it is full (32 slots of 16 data for Yaw, Pitch and Roll).
When full, the FIFO stops collecting data from the input channels. To restart collecting data
it is needed to write FIFO_CTRL_REG_G (2Eh) back to Bypass mode. FIFO mode is
represented in the following figure.
24/76Doc ID 023426 Rev 1
LSM330Functionality
x
0
y
z
0
y
0
x
1
y
1
z
1
x
2
y
2
z
2
x
31
y
31
z
31
xi,yi,z
i
AM07232v1
Figure 7.FIFO mode
4.3.4 Stream mode
In the stream mode, data from yaw, pitch and roll measurement are stored into the FIFO. A
watermark interrupt can be enabled and set as in the FIFO mode. FIFO continues filling until
it is full (32 slots of 16 data for Yaw, Pitch and Roll). When full, the FIFO discards the older
data as the new arrive. Programmable watermark level events can be enabled to generate
dedicated interrupts on DRDY_G/INT2_G pin (configuration through CTRL_REG3_G
(22h)). Stream mode is represented in the following figure.
Doc ID 023426 Rev 125/76
FunctionalityLSM330
Figure 8.Stream mode
xi,yi,z
i
x
x
4.3.5 Bypass-to-stream mode
x
0
x
1
x
2
30
31
y
0
y
1
y
2
y
30
y
31
z
0
z
1
z
2
z
30
z
31
AM07234v1
In Bypass-to-stream mode, the FIFO starts operating in Bypass mode and once a trigger
event occurs (related to INT1_CFG_G (30h) register events) the FIFO starts operating in
Stream mode. Refer the following figure.
Figure 9.Bypass-to-stream mode
xi,yi,z
Empty
i
x
x
x
x
y
y
0
y
1
y
2
y
31
z
i
0
1
2
31
0
z
1
z
2
z
31
Bypass mode
Trigger event
xi,yi,z
i
x
x
x
x
x
y
0
1
2
30
31
0
y
1
y
2
y
30
y
31
Stream mode
z
0
z
1
z
2
z
30
z
31
AM07235v1
26/76Doc ID 023426 Rev 1
LSM330Functionality
4.3.6 Stream-to-FIFO mode
In Stream-to-FIFO mode, data from yaw, pitch and roll measurement are stored into the
FIFO. A watermark interrupt can be enabled on pin DRDY_G/INT2_G setting I2_WTM bit
into CTRL_REG3_G (22h) in order to be raised when the FIFO is filled to the level specified
into the WTM [4:0] bits of FIFO_CTRL_REG_G (2Eh). The FIFO continues filling until it's full
(32 slots of 16 data for Yaw, Pitch and Roll). When full, the FIFO discards the older data as
the new arrive. Once trigger event occurs (related to INT1_CFG_G (30h) register events),
the FIFO starts operating in FIFO mode. Refer to the following figure.
Figure 10. Trigger stream mode
xi,yi,z
i
x
0
x
1
x
2
x
30
x
31
y
0
y
1
y
2
y
30
y
31
Stream Mode
4.3.7 Retrieve data from FIFO
FIFO data is read through OUT_X_L_G (28h), OUT_X_H_G (29h) and OUT_Y_L_G (2Ah),
OUT_Y_H_G (2Bh) and OUT_Z_L_G (2Ch), OUT_Z_H_G (2Dh). When the FIFO is in
stream, stream-to-FIFO or FIFO mode, a read operation to the OUT_X_L_G (28h),
OUT_X_H_G (29h), OUT_Y_L_G (2Ah), OUT_Y_H_G (2Bh) and OUT_Z_L_G (2Ch),
OUT_Z_H_G (2Dh) regiters provides the data stored into the FIFO.
xi,yi,z
z
0
z
1
z
2
z
30
z
31
i
x
x
x
x
y
y
0
y
1
y
2
y
31
z
i
0
1
2
31
0
z
1
z
2
z
31
FIFO Mode
Trigger event
AM07236v1
Each time data is read from the FIFO, the oldest Pitch, Roll and Yaw data are placed into the
OUT_X_L_G (28h), OUT_X_H_G (29h), OUT_Y_L_G (2Ah), OUT_Y_H_G (2Bh) and
OUT_Z_L_G (2Ch), OUT_Z_H_G (2Dh) registers and both single read and read_burst (X, Y
and Z with autoincremental address) operations can be used. When data included into
OUT_Z_H_G (2Dh) is read, the system restarts to read information from OUT_X_L_G
(28h).
4.3.8 Level-sensitive / edge-sensitive data enable
The LSM330 allows external trigger level recognition through the enabling of the EXTRen
and LVLen bits in the CTRL_REG2_G register. Two different modes can be used: Levelsensitive or Edge-sensitive trigger.
Once enabled, DEN level replaces the LSb of the X, Y or Z axes, configurable through the
Xen, Yen, Zen bits in the CTRL_REG1_G register. Data is stored in the FIFO with the
internally-selected ODR.
Once enabled by setting EXTRen = 1, FIFO is filled with the pitch, roll and yaw data on the
rising edge of the DEN input signal. When selected ODR is 800 Hz, the maximum DEN
sample frequency is f
DEN
= 1/T
DEN
= 400 Hz.
28/76Doc ID 023426 Rev 1
LSM330Functionality
Figure 12. Edge-sensitive trigger
4.4 Factory calibration
The IC interface is factory calibrated for sensitivity and zero level. The trimming values are
stored in the device in non volatile memory. Any time the device is turned on, the trimming
parameters are downloaded to the registers to be used during normal operation. This allows
use of the device without further calibration.
Doc ID 023426 Rev 129/76
Application hintsLSM330
RES
GND
GND
CAP
VDD
VDD
VDD
VDD_IO
RES
RES
RES
RES
(TOP VIEW)
1
316
18
DEN_G
INT2_A
INT1_A
INT_G
DRDY_G/INT2_G
CS_A
CS_G
SDO_A
SCL_A/G
VDD_IO
SDA/SDI_A/G
SDO_G
10nF(25V)
*C1
100 nF
GND
GND
10 µF
C3C4
Vdd
Vdd_IO
GND
100 nF
C2
GND
GND
* C1 must guarantee 1 nF value under
11 V bias condition
Vdd_IO
I2C configuration
SCL
SDA
Rpu= 10kOhmRpu
Pull-up to be added
AM14726V1
5 Application hints
Figure 13. LSM330 electrical connection
5.1 External capacitors
The device core is supplied through the Vdd line. Power supply decoupling capacitors (C2,
C3=100 nF ceramic, C4=10 µF Al) should be placed as near as possible to the supply pin of
the device (common design practice).
All voltage and ground supplies must be present at the same time to achieve proper
behavior of the IC (refer to Figure 13).
30/76Doc ID 023426 Rev 1
LSM330Application hints
The functionality of the device and the measured acceleration/angular rate data is
selectable and accessible through the SPI/I
The functions, the threshold and the timing of the two interrupt pins for each sensor can be
completely programmed by the user through the SPI/I
5.2 Soldering information
The LGA package is compliant with ECOPACK®, RoHS and “Green” standards. It is
qualified for soldering heat resistance according to JEDEC J-STD-020D.
Leave “Pin 1 Indicator” unconnected during soldering.
Land pattern and soldering recommendations are available at www.st.com/mems
2
C interface.
2
C interface.
.
Doc ID 023426 Rev 131/76
Digital interfacesLSM330
6 Digital interfaces
The registers embedded in the LSM330 may be accessed through both the I2C and SPI
serial interfaces. The latter may be SW configured to operate either in 3-wire or 4-wire
interface mode.
To select/exploit the I
Table 10.Serial interface pin description
Pin namePin description
2
C interface, the CS line must be tied high (i.e. connected to Vdd_IO).
CS_A
CS_G
SCL_A/G
SDA_A/G
SDO_A
SDO_G
Linear acceleration SPI enable
Linear acceleration I2C/SPI mode selection (1: I2C mode; 0: SPI enabled)
Angular rate SPI enable
Angular rate I
I2C serial clock (SCL)
SPI serial port clock (SPC)
2
I
C serial data (SDA)
SPI serial data input (SDI)
3-wire interface serial data output (SDO)
2
I
C least significant bit of the device address (SA0)
SPI serial data output (SDO)
6.1 I2C serial interface
The LSM330 I2C is a bus slave. The I2C is employed to write the data to the registers,
whose content can also be read back.
ReceiverThe device which receives data from the bus
Master
SlaveThe device addressed by the master
The device which initiates a transfer, generates clock signals and terminates a
transfer
There are two signals associated with the I2C bus: the Serial Clock Line (SCL) and the
Serial Data line (SDA). The latter is a bidirectional line used for sending and receiving the
data to/from the interface.
32/76Doc ID 023426 Rev 1
LSM330Digital interfaces
6.1.1 I2C operation
The transaction on the bus is started through a START (ST) signal. A START condition is
defined as a HIGH to LOW transition on the data line while the SCL line is held HIGH. After
this has been transmitted by the master, the bus is considered busy. The next byte of data
transmitted after the start condition contains the address of the slave in the first 7 bits, and
the eighth bit tells whether the master is receiving data from the slave or transmitting data to
the slave. When an address is sent, each device in the system compares the first seven bits
after a start condition with its address. If they match, the device considers itself addressed
by the master.
Data transfer with acknowledge is mandatory. The transmitter must release the SDA line
during the acknowledge pulse. The receiver must then pull the data line LOW so that it
remains stable low during the HIGH period of the acknowledge clock pulse. A receiver which
has been addressed is obliged to generate an acknowledge after each byte of data
received.
2
The I
C embedded in the LSM330 behaves like a slave device and the following protocol
must be adhered to. After the start condition (ST), a slave address is sent. Once a slave
acknowledge (SAK) has been returned, an 8-bit sub-address (SUB) is transmitted: the 7
LSb represent the actual register address while the MSb enables address auto increment. If
the MSb of the SUB field is ‘1’, the SUB (register address) will be automatically increased to
allow multiple data read/write.
Table 12.Transfer when master is writing one byte to slave
MasterSTSAD + WSUBDATASP
SlaveSAKSAKSAK
Table 13.Transfer when master is writing multiple bytes to slave
MasterSTSAD + WSUBDATADATASP
SlaveSAKSAKSAKSAK
Table 14.Transfer when master is receiving (reading) one byte of data from slave
MasterSTSAD + WSUBSRSAD + RNMAKSP
SlaveSAKSAKSAKDATA
Table 15.Transfer when master is receiving (reading) multiple bytes of data from slave
Master ST SAD+WSUBSR SAD+RMAKMAKNMAK SP
SlaveSAKSAKSAKDATADATADATA
Data is transmitted in byte format (DATA). Each data transfer contains 8 bits. The number of
bytes sent per transfer is unlimited. Data is transferred with the most significant bit (MSb)
first. If a receiver cannot receive another complete byte of data until it has performed some
other function, it can hold the clock line, SCL, LOW to force the transmitter into a wait state.
Doc ID 023426 Rev 133/76
Digital interfacesLSM330
Data transfer only continues when the receiver is ready for another byte and releases the
data line. If a slave receiver does not acknowledge the slave address (i.e. it is not able to
receive because it is performing some real-time function) the data line must be left HIGH by
the slave. The master can then abort the transfer. A LOW to HIGH transition on the SDA line
while the SCL line is HIGH is defined as a STOP condition. Each data transfer must be
terminated by the generation of a STOP (SP) condition.
In order to read multiple bytes, it is necessary to assert the most significant bit of the subaddress field. In other words, SUB(7) must be equal to 1 while SUB(6-0) represents the
address of first register to be read.
In the communication format presented, MAK is Master Acknowledge and NMAK is No
Master Acknowledge.
Default address:
The SDO/SA0 pins (SDO_A / SDO_G) can be used to modify the least significant bits of the
device address.The linear acceleration sensor slave address is 00111xxb whereas the xx
bits are modified by the SDO_A pin: If SDO/A pin is connected to voltage supply, the
address is 0011101b otherwise if SDO/A pin is connected to ground, the address is
0011110b.This solution allows to connect and address two different accelerometers to the
same I2C line.
The angular rate sensor slave address is 110101xb, whereas the x bit is modified by the
SDO/G bit: If the SDO_G pin is connected to voltage supply, LSb is ‘1’ (address 1101011b),
otherwise, if the SDO_G pin is connected to ground, the LSb value is ‘0’ (address
1101010b).
The slave addresses is completed with a Read/Write bit. If the bit was ‘1’ (Read), a repeated
START (SR) condition will have to be issued after the two sub-address bytes; if the bit is ‘0’
(Write) the master will transmit to the slave with direction unchanged. Ta b le and Ta b le 1 7
explain how the SAD+Read/Write bit pattern arecomposed, listing all the possible
configurations.
Linear acceleration sensor: the default (factory) 7-bit slave address is
00111xxb.
Angular rate sensor: the default (factory) 7-bit slave address is 110101xb.
Table 17.Angular rate SAD+Read/Write patterns
CommandSAD[6:1]SAD[0] = SDO_GR/WSAD+R/W
Read1101010111010101 (D5h)
Write1101010011010100 (D4h)
Read1101011111010111 (D7h)
Write1101011011010110 (D6h)
6.2 SPI bus interface
The LSM330 SPI is a bus slave. The SPI allows writing and reading the registers of the
device.
The serial interface interacts with the external world through 4 wires: CS(CS_A,CS_G),
SPC, SDI and SDO (SDO_A,SDO_G); (SPC, SDI are common).
Figure 14. Read and write protocol
CS is the serial port enable and is controlled by the SPI master. It goes low at the start of the
transmission and returns high at the end. SPC is the serial port clock and is controlled by
the SPI master. It is stopped high when CS is high (no transmission). SDI and SDO are
respectively the serial port data input and output. These lines are driven at the falling edge
of SPC and should be captured at the rising edge of SPC.
Both the read register and write register commands are completed in 16 clock pulses or in
multiples of 8 in case of multiple-byte read/write. Bit duration is the time between two falling
edges of SPC. The first bit (bit 0) starts at the first falling edge of SPC after the falling edge
of CS, while the last bit (bit 15, bit 23, ...) starts at the last falling edge of SPC just before the
rising edge of CS.
bit 0: RW
bit. When 0, the data DI(7:0) is written to the device. When 1, the data DO(7:0)
from the device is read. In the latter case, the chip drives SDO at the start of bit 8.
bit 1: MS
bit. When 0, the address remains unchanged in multiple read/write commands.
When 1, the address is auto-incremented in multiple read/write commands.
bit 2-7: address AD(5:0). This is the address field of the indexed register.
Doc ID 023426 Rev 135/76
Digital interfacesLSM330
CS
SPC
SDI
SDO
RW
DO7 DO6 DO5 DO4 DO3DO2 DO1 DO0
AD5 AD4 AD3 AD2 AD1 AD0
MS
AM10130V1
bit 8-15: data DI(7:0) (Write mode). This is the data that will be written to the device (MSb
first).
bit 8-15: data DO(7:0) (Read mode). This is the data that will be read from the device (MSb
first).
In multiple read/write commands, further blocks of 8 clock periods will be added. When the
MS
bit is ‘0’, the address used to read/write data remains the same for every block. When
the MS
bit is ‘1’, the address used to read/write data is increased at every block.
The function and the behavior of SDI and SDO remain unchanged.
6.2.1 SPI read
Figure 15. SPI read protocol
Note:Data on CS, SPC, SDI and SDO refer to pins:CS_A, CS_G, SCL_A/G, SDA_A/G, SDO_A /
SDO_G.
The SPI read command is performed with 16 clock pulses. A multiple-byte read command is
performed by adding blocks of 8 clock pulses to the previous one.
bit 0: READ bit. The value is 1.
bit 1: MS
bit. When 0, do not increment address; when 1, increment address in multiple
reading.
bit 2-7: address AD(5:0). This is the address field of the indexed register.
bit 8-15: data DO(7:0) (Read mode). This is the data that will be read from the device (MSb
first).
bit 16-... : data DO(...-8). Further data in multiple-byte reading.
Note:Data on CS, SPC, SDI and SDO refer to pins:CS_A, CS_G, SCL_A/G, SDA_A/G, SDO_A /
SDO_G.
The SPI write command is performed with 16 clock pulses. A multiple-byte write command
is performed by adding blocks of 8 clock pulses to the previous one.
bit 0: WRITE bit. The value is 0.
bit 1: MS
bit. When 0, do not increment address; when 1, increment address in multiple
writing.
bit 2 -7: address AD(5:0). This is the address field of the indexed register.
bit 8-15: data DI(7:0) (Write mode). This is the data that will be written to the device (MSb
first).
bit 16-... : data DI(...-8). Further data in multiple-byte writing.
Doc ID 023426 Rev 137/76
Digital interfacesLSM330
CS
SPC
SDI
RW
AD5 AD4 AD3 AD2 AD1 AD 0
DI7 DI6 DI 5 D I4 DI 3 DI 2 DI 1 DI 0 DI 15 D I1 4 DI13 DI12 DI 11 DI 10 DI9 DI 8
3-wire mode is entered by setting the SIM bits to ‘1’ (SPI serial interface mode selection) in
the CTRL_REG6_A (24h) and CTRL_REG4_G (23h) .
Figure 19. SPI read protocol in 3-wire mode
Note:Data on CS, SPC, SDI and SDO refer to pins:CS_A, CS_G, SCL_A/G, SDA_A/G, SDO_A /
SDO_G.
The SPI read command is performed with 16 clock pulses:
bit 0: READ bit. The value is 1.
bit 1: MS
bit. When 0, do not increment address; when 1, increment address in multiple
reading.
bit 2-7: address AD(5:0). This is the address field of the indexed register.
bit 8-15: data DO(7:0) (Read mode). This is the data that will be read from the device (MSb
first).
Multiple read command is also available in 3-wire mode.
38/76Doc ID 023426 Rev 1
LSM330Register mapping
7 Register mapping
The table below provides a listing of the 8/16-bit registers embedded in the device, and their
related addresses:
Table 18.Register address map
Name
WHO_AM_I_ATa bl e 1 5r0F000 111101000000
CTRL_REG4_ATa b le 1 5r/w23010 001100000000
CTRL_REG5_ATa b le 1 5r/w20010 000000000111
CTRL_REG6_ATa b le 1 5r/w24010 010000000000
CTRL_REG7_ATa b le 1 5r/w25010 010100000000
STATUS_REG_ATa b le 1 5r27010 0111output
OFF_XTa bl e 1 5r/w10001 0000output
OFF_YTa bl e 1 5r/w11001 0001output
OFF_ZTa b le 1 5r/w12001 0010output
CS_XTa bl e 1 5r/w13001 001100000001
CS_YTa bl e 1 5r/w14001 010000000001
CS_ZTa bl e 1 5r/w15001 010100000001
Slave
address
Typ e
Register address
DefaultComment
HexBinary
Who am I
linear
acceleration
sensor
register
Linear
Acceleration
Sensor
Control
Registers
Status
register
Axis offset
correction
Constant Shift
registers
LC_LTa bl e 1 5r/w16001 011000000001
LC_HTa bl e 1 5r/w17001 011100000000
STATTa bl e 1 5r18001 1000outputInterrupt Sync
VFC_1Ta b l e 1 5r/w1B001 101100000000
VFC_2Ta b l e 1 5r/w1C001 110000000000
VFC_3Ta b l e 1 5r/w1D001 110100000000
VFC_4Ta b l e 1 5r/w1E001 111000000000
THRS3Ta b l e 1 5r/w1F001 111100000000
Doc ID 023426 Rev 139/76
Long Counter
Registers
Vec t o r F ilter
Coefficient
Thresold
value 3
Register mappingLSM330
Table 18.Register address map (continued)
Name
OUT_X_L_ATa bl e 1 5r28010 1000output
OUT_X_H_ATa b le 1 5r29010 1001output
OUT_Y_L_ATa bl e 1 5r2A010 1010output
OUT_Y_H_ATa b le 1 5r2B010 1011output
OUT_Z_L_ATab le 1 5r2C010 1100output
OUT_Z_H_ATa b le 1 5r2D010 1101output
FIFO_CTRL_REG_ATa b le 1 5r/w2E010 111000000000Linear
FIFO_SRC_REG_ATa bl e 1 5r2F010 1111output
CTRL_REG2_ATa b le 1 5r/w21010 000100000000
STx_1Ta bl e 1 5r/w40-4F
TIM4_1Ta bl e 1 5r/w50101 000000000000
TIM3_1Ta bl e 1 5r/w51101 000100000000
TIM2_1Ta bl e 1 5r/w52-53
TIM1_1Ta bl e 1 5r/w54-55
THRS2_1Ta bl e 1 5r/w56101 011000000000
THRS1_1Ta bl e 1 5r/w57101 011100000000
MASKB_1Ta b le 1 5r/w59101 100100000000
MASKA_1Ta b le 1 5r/w5A101 101000000000
Slave
address
Typ e
Register address
HexBinary
100 0000
100 1111
101 0010
101 0011
101 0100
101 0101
DefaultComment
Linear
Acceleration
Sensor
Output
registers
Acceleration
Sensor FIFO
Registers
SM1 Control
Register
SM1 Code
00000000
00000000
00000000
Register
(X=1-16)
SM1 General
Timers
SM1
Thereshold
Val ue 1
SM1
Thereshold
Val ue 2
SM1 axis and
sign mask
SETT1Ta b le 1 5r/w5B101 101100000000
PR1Ta b le 1 5r/w5C101 110000000000
TC1Ta b le 1 5r5D-5E
OUTS1Ta b le 1 5r5F101 111100000000Main set flag
PEAK1Ta bl e 1 5r19001 100100000000Peak value
40/76Doc ID 023426 Rev 1
101 1101
101 1110
SM1
Detection
Settings
Program-
Reset Pointer
00000000Timer Counter
LSM330Register mapping
Table 18.Register address map (continued)
Name
CTRL_REG3_ATa b le 1 5r/w22010 001000000000
STx_2Ta bl e 1 5r/w60-6F
TIM4_2Ta bl e 1 5r/w70111 000000000000
TIM3_2Ta bl e 1 5r/w71111 000100000000
TIM2_2Ta bl e 1 5r/w72-73
TIM1_2Ta bl e 1 5r/w74-75
THRS2_2Ta bl e 1 5r/w76111 011000000000
THRS1_2Ta bl e 1 5r/w77111 011100000000
MASKB_2Ta b le 1 5r/w79111 100100000000
MASKA_2Ta b le 1 5r/w7A111 101000000000
Slave
address
Typ e
Register address
HexBinary
110 0000
110 1111
111 00 1 0
111 0011
111 0100
111 0101
DefaultComment
00000000
00000000
00000000
SM2 Control
Register
SM2 Code
Register
(X=1-16)
SM2 General
Timers
SM2
Thereshold
Val ue 1
SM2
Thereshold
Val ue 2
SM2 axis and
sign mask
SM2
SETT2Ta b le 1 5r/w7B111 101100000000
PR2Ta b le 1 5r/w7C111 110000000000
TC2Ta b le 1 5r7D-7E
OUTS2Ta b le 1 5r7F111 111100000000Main set flag
PEAK2Ta bl e 1 5r1A001 101000000000Peak value
DES2Ta bl e 1 5w78111 100000000000
WHO_AM_I_GTab l e 1 6r0F000 111111010100Who I am ID
Reserved--10-1F---
CTRL_REG1_GTa b le 1 6r/w20010 000000000111
CTRL_REG2_GTa b le 1 6r/w21010 000100000000
CTRL_REG3_GTa b le 1 6
CTRL_REG4_GTa b le 1 6r/w23010 001100000000
CTRL_REG5_GTa b le 1 6r/w24010 010000000000
r/w22010 001000000000
111 1101
111 1110
00000000Timer Counter
Detection
Settings
Program-
Reset Pointer
Decimation
Facto r
Angular Rate
Sensor
Control
Registers
Doc ID 023426 Rev 141/76
Register mappingLSM330
Table 18.Register address map (continued)
Name
REFERENCE_GTa bl e 1 6r/w25010 010100000000
OUT_TEMP_GTa bl e 1 6r26010 0110output
STATUS_REG_GTa bl e 1 6r27010 0111output
OUT_X_L_GTa b l e 1 6r28010 1000output
OUT_X_H_GTa bl e 1 6r29010 1001output
OUT_Y_L_GTa b l e 1 6r2A010 1010output
OUT_Y_H_GTa bl e 1 6r2B010 1011output
OUT_Z_L_GTa bl e 1 6r2C010 1100output
OUT_Z_H_GTa b le 1 6r2D010 1101output
FIFO_CTRL_REG_GTa bl e 1 6r/w2E010 111000000000Angular rate
FIFO_SRC_REG_GTa b le 1 6r2F010 1111output
INT1_CFG_GTa bl e 1 6r/w30011 000000000000
Slave
address
Typ e
Register address
DefaultComment
HexBinary
Reference
value for
interrupt
generation
Temperature
data output
Status
register
Angular rate
sensor
Output
Registers
sensor FIFO
Registers
INT1_SRC_GTa bl e 1 6r/w31011 0001output
INT1_THS_XH_GTa b le 1 6r/w32011 001000000000
INT1_THS_XL_GTa bl e 1 6r/w33011 001100000000
INT1_THS_YH_GTa b le 1 6r/w34011 010000000000
INT1_THS_YL_GTa bl e 1 6r/w35011 010100000000
INT1_THS_ZH_GTa bl e 1 6r/w36011 011000000000
INT1_THS_ZL_GTa b le 1 6r/w37011 011100000000
INT1_DURATION_GTa bl e 1 6r/w38011 100000000000
Registers marked as Reserved must not be changed. Writing to those registers may cause
permanent damage to the device.
The content of the registers that are loaded at boot should not be changed. They contain the
factory calibration values. Their content is automatically restored when the device is
powered up.
Angular rate
sensor
Interrupt
Registers
42/76Doc ID 023426 Rev 1
LSM330Register descriptions
8 Register descriptions
The device contains a set of registers which are used to control its behavior and to retrieve
linear acceleration, angular rate and temperature data. The register addresses, made up of
7 bits, are used to identify them and to write the data through the serial interface.
8.1 WHO_AM_I_A (0Fh)
Who am I linear acceleration sensor register (r)
Table 19.WHO_AM_I_A register default value
01000000
8.2 CTRL_REG4_A (23h)
Linear acceleration sensor control register 4 (r/w)
Table 20.CTRL_REG4_A register
DR_ENIEAIELINT2_ENINT1_ENVFILT-STRT
Table 21.CTRL_REG4_A register description
DR_EN
IEA
IEL
INT2_EN
INT1_EN
VFILT
STRT
DRDY signal enable on INT1_A. Default Value:0
0 = Data Ready signal disabled, 1 = Data Ready signal routed to INT1_A
Interrupt signal polarity. Default Value:0
0 = Interrupt signal active LOW, 1 = Interrupt signal active HIGH
Interrupt signal lachting. Default Value:0
0 = Interrupt signal latched, 1 = Interrupt signal pulsed
Interrupt 2 enable on INT2_A. Default Value:0
0 = INT2_A signal disabled, 1 = INT2_A signal enable
Interrupt 1 enable on INT1_A. Default Value:0
0 = INT1_A signal disabled, 1 = INT1_A signal enable
ODR [3:0] is used to set Power mode, ODR selection . In the following Ta b le are reported all
frequencies available.
Table 24.CTRL_REG5_A Output Data Rate selection
ODR3ODR2ODR1ODR0ODR selection
0000Power Down
00013.125 Hz
00106.25 Hz
001112.5 Hz
010025 Hz
010150 Hz
0110100 Hz
0111400 Hz
1000800 Hz
10011600 Hz
BDU bit is used to inhibit output registers update until both upper and lower registers are
read. In default mode (BDU=’0’) the output register values are updated continuosly. If for any
reason it is not sure to read faster than output data rate it is recommended to set BDU bit to
‘1’. In this way the content of output register is not updated until both MSB and LSB are
read, avoiding to read values related to different sample time.
44/76Doc ID 023426 Rev 1
LSM330Register descriptions
8.4 CTRL_REG6_A (24h)
Linear acceleration sensor control register 6 (r/w).
Default Value:0
0 = no action, 1 = Threshold 3 limit value for axis and sign mask reset (MASKB_2)
Default Value:0
0 = unsigned thresholds, 1 = signed thresholds
Default Value:0
0 = no action, 1 = Threshold 3 limit value for axis and sign mask reset (MASKA_2)
next condition validation flag.Default Value:0
0 = no valid next condition found , 1= valid nextc ondition found and reset
Default Value:0
0 = no actions, 1 = program flow can be modified by STOP and CONT commands
Table 94.PR2 register description
PP [3:0]SM2 Program Pointer Address.Default Value :0
RP [3:0]SM2 Reset Pointer Address.Default Value :0
8.52 TC2 (7Dh-7E)
16 bit general timer (unsigned output value) for state machine 2 operation timing register (r).
Table 95.TC2_L default value
00000000
Table 96.TC2_H default value
00000000
8.53 OUTS2 (7Fh)
Output flags on axis for interrupt SM2 management register (r).
Doc ID 023426 Rev 159/76
Register descriptionsLSM330
Table 97.OUTS2 register
P_XN_XP_YN_YP_ZN_ZP_VN_V
Read action of this register, depending on the flag will affect SM2 interrupt functions.
Table 98.OUTS2 register description
P_X0 = X + noshow, 1 =X+ show. Default Value :0
N_X0 = X - noshow, 1 = X – show. Default Value :0
P_Y0 = Y + noshow, 1 =Y+ show. Default Value :0
N_Y0 = Y - noshow, 1 = Y – show. Default Value :0
P_Z0 = Z + noshow, 1 =Z+ show. Default Value :0
N_Z0 = Z - noshow, 1 = Z – show. Default Value :0
P_V0 = V + noshow, 1 = V + show. Default Value :0
N_V0 = V - noshow, 1 = V – show. Default Value :0
8.54 PEAK2 (1Ah)
Peak detection value register for state machine 2 operation register (r).
Table 99.PEAK2 default value
00000000
Peak detected value for next condition SM2.
8.55 DES2 (78h)
Decimation counter value register for SM2 operation (w).
Table 100. DES2 default value
00000000
8.56 WHO_AM_I_G (0Fh)
Who am I angular rate sensor register (r)
Table 101. WHO_AM_I_G register
11010100
60/76Doc ID 023426 Rev 1
LSM330Register descriptions
8.57 CTRL_REG1_G (20h)
Angular rate sensor control register 1 (r/w).
Table 102. CTRL_REG1_G register
DR1DR0BW1BW0PDZenXenYen
Table 103. CTRL_REG1_G description
DR [1:0]Output data rate selection.Default value:00. Refer toTable 104
BW [1:0]Bandwidth selection.Default value:00. Refer to Table 104
PD
ZenZ axis enable. Default value: 1
YenY axis enable. Default value: 1
XenX axis enable. Default value: 1
Power-down mode enable. Default value: 0
(0: Power-down mode, 1: Normal mode or Sleep mode)
(0: Z axis disabled; 1: Z axis enabled)
(0: Y axis disabled; 1: Y axis enabled)
(0: X axis disabled; 1: X axis enabled)
DR [1:0] is used to set ODR selection. BW [1:0] is used to set bandwidth selection.
The table below provides all the frequencies resulting from the DR / BW bit combinations.
Table 104. DR and BW configuration setting
DR [1:0]BW [1:0]ODR [Hz]Cut-off [Hz]
00009512.5
00019525
00109525
00119525
010019012.5
010119025
011019050
011119070
100038020
100138025
101038050
1011380100
110076030
110176035
(1)
Doc ID 023426 Rev 161/76
Register descriptionsLSM330
Table 104. DR and BW configuration setting (continued)
DR [1:0]BW [1:0]ODR [Hz]Cut-off [Hz]
111076050
1111760100
1. Values in the table are indicative and they can vary proportionally with the specific ODR value
(1)
The combination of PD, Zen, Yen, Xen is used to set the angular rate sensor in different
modes (Power-down / Normal / Sleep mode) according to the following table:
ZHZ high. Default value: 0 (0: no interrupt, 1: Z High event has occurred)
ZLZ low. Default value: 0 (0: no interrupt; 1: Z Low event has occurred)
YHY high. Default value: 0 (0: no interrupt, 1: Y High event has occurred)
YLY low. Default value: 0 (0: no interrupt, 1: Y Low event has occurred)
XHX high. Default value: 0 (0: no interrupt, 1: X High event has occurred)
XLX low. Default value: 0 (0: no interrupt, 1: X Low event has occurred)
68/76Doc ID 023426 Rev 1
Interrupt active. Default value: 0
(0: no interrupt has been generated; 1: one or more interrupts have been generated)
LSM330Register descriptions
Reading at this address clears the INT1_SRC_G (31h) IA bit (and eventually the interrupt
signal on the INT1_G pin) and allows the refreshing of data in the INT1_SRC_G register if
the latched option was chosen.
8.72 INT1_THS_XH_G (32h)
Angular rate sensor interrupt threshold x-axis high register (r/w).
D6 - D0 bits set the minimum duration of the interrupt event to be recognized. Duration steps
and maximum values depend on the ODR chosen.
WAIT bit has the following meaning:
Wait =’0’: the interrupt falls immediately if signal crosses the selected threshold
Wait =’1’: if the signal crosses the selected threshold, the interrupt falls only after the
duration has counted the number of samples at the selected data rate, written into the
duration counter register.
Figure 21. Wait disabled
Doc ID 023426 Rev 171/76
Register descriptionsLSM330
Figure 22. Wait enabled
72/76Doc ID 023426 Rev 1
LSM330Package information
9 Package information
In order to meet environmental requirements, ST offers these devices in different grades of
ECOPACK
specifications, grade definitions and product status are available at: www.st.com.
ECOPACK is an ST trademark.
®
packages, depending on their level of environmental compliance. ECOPACK
®
Doc ID 023426 Rev 173/76
Package informationLSM330
8379971_A
Table 145. LGA (3.5x3x1 mm) 24 lead mechanical data
mm
Dim.
Min.Typ.Max.
A11.0001.027
A20.800
A30.200
D12.8503.0003.150
E13.3503.5003.650
L13.010
L21.290
N10.430
M0.0400.100
M10.0700.130
P20.2000.2500.300
a45°
T10.3000.3500.400
T20.1800.2300.280
K0.050
L11.271.40
L21.301.75
R0.4
V20°8°
Figure 23. LGA (3.5x3x1 mm) lead drawing
74/76Doc ID 023426 Rev 1
LSM330Revision history
10 Revision history
Table 146. Document revision history
DateRevisionChanges
10-Jul-20121Initial release.
Doc ID 023426 Rev 175/76
LSM330
Please Read Carefully:
Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries (“ST”) reserve the
right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any
time, without notice.
All ST products are sold pursuant to ST’s terms and conditions of sale.
Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no
liability whatsoever relating to the choice, selection or use of the ST products and services described herein.
No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this
document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products
or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such
third party products or services or any intellectual property contained therein.
UNLESS OTHERWISE SET FORTH IN ST’S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED
WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS
OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT.
UNLESS EXPRESSLY APPROVED IN WRITING BY TWO AUTHORIZED ST REPRESENTATIVES, ST PRODUCTS ARE NOT
RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING
APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY,
DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE
GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER’S OWN RISK.
Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void
any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any
liability of ST.
ST and the ST logo are trademarks or registered trademarks of ST in various countries.
Information in this document supersedes and replaces all information previously supplied.
The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners.