The various sensing elements are manufactured
by using specialized micromachining processes,
while the IC interfaces are realized using a CMOS
technology that allows the design of a dedicated
circuit which is trimmed to better match the
sensing element characteristics. The
LSM303DLM has a linear acceleration full-scale
of ±2 g / ±4 g / ±8 g and a magnetic field full-scale
of±1.3 / ±1.9 / ±2.5 / ±4.0 / ±4.7 / ±5.6 / ±8.1
gauss, both fully selectable by the user.
The LSM303DLM includes an I
interface that supports standard mode (100 kHz)
and fast mode (400 kHz). The system can be
configured to generate an interrupt signal by
inertial wakeup/free-fall events, as well as by the
position of the device itself. Thresholds and timing
of interrupt generators are programmable on the
fly by the end user.
Magnetic and accelerometer parts can be
enabled or put into power-down mode separately.
The LSM303DLM is available in a plastic land grid
array package (LGA), and is guaranteed to
operate over an extended temperature range from
-40 to +85 °C.
Table 1.Device summary
Temp.
Part number
range
[°C]
2
C serial bus
PackagePacking
The LSM303DLM is a system-in-package
featuring a 3D digital linear acceleration sensor
and a 3D digital magnetic sensor.
April 2011Doc ID 018725 Rev 11/38
This is preliminary information on a new product now in development or undergoing evaluation. Details are subject to
change without notice.
Linear acceleration signal I2C less significant bit of the device
address (SA0)
5NCInternally not connected
6VddPower supply
7ReservedConnect to Vdd
8ReservedLeave unconnected
9ReservedLeave unconnected
10ReservedLeave unconnected
11ReservedLeave unconnected
12SET2S/R capacitor connection (C2)
13ReservedLeave unconnected
14ReservedLeave unconnected
15C1Reserved capacitor connection (C1)
16SET1S/R capacitor connection(C2)
17ReservedConnect to GND
18DRDY_MMagnetic signal interface data ready
2
19SDA_MMagnetic signal interface I
C serial data (SDA)
Doc ID 018725 Rev 17/38
Page 8
Block diagram and pin descriptionLSM303DLM
Table 2.Pin description (continued)
Pin#NameFunction
20SCL_MMagnetic signal interface I2C serial clock (SCL)
21NCInternally not connected
22Vdd_IOSignal interface power supply for I/O pins
23ReservedConnect to Vdd_IO
24SCL_ALinear acceleration signal interface I2C serial clock (SCL)
2
25SDA_ALinear acceleration signal interface I
26INT1Inertial Interrupt 1
27INT2Inertial Interrupt 2
28ReservedConnect to GND
C serial data (SDA)
8/38Doc ID 018725 Rev 1
Page 9
LSM303DLMModule specifications
2 Module specifications
2.1 Sensor characteristics
@ Vdd = 2.5 V, T = 25 °C unless otherwise noted
Table 3.Sensor characteristics
SymbolParameterTest conditionsMin.Typ.
FS bit set to 00±2.0
LA_FS
M_FSMagnetic measurement range
LA_SoLinear acceleration sensitivity
M_GNMagnetic gain setting
Linear acceleration
measurement range
(2)
FS bit set to 11±8.0
GN bits set to 001±1.3
GN bits set to 010±1.9
GN bits set to 011±2.5
GN bits set to 100±4.0
GN bits set to 101±4.7
GN bits set to 110±5.6
GN bits set to 111±8.1
FS bit set to 00
12-bit representation
FS bit set to 01
12-bit representation
FS bit set to 11
12-bit representation
GN bits set to 001 (X,Y)1100
GN bits set to 001 (Z)980
GN bits set to 010 (X,Y)855
GN bits set to 010 (Z)760
GN bits set to 011 (X,Y)670
GN bits set to 011 (Z)600
GN bits set to 100 (X,Y)450
GN bits set to 100 (Z)400
GN bits set to 101 (X,Y)400
GN bits set to 101 (Z)355
GN bits set to 110 (X,Y)330
GN bits set to 110 (Z)295
GN bits set to 111
GN bits set to 111
(a)
.
(2)
(X,Y)230
(2)
(Z)205
1
2
3.9
(1)
Max.Unit
gFS bit set to 01±4.0
gauss
g/digit
m
LSB/
gauss
a. The product is factory calibrated at 2.5 V. The operational power supply range is from 2.16 V to 3.6 V.
Doc ID 018725 Rev 19/38
Page 10
Module specificationsLSM303DLM
Table 3.Sensor characteristics (continued)
SymbolParameterTest conditionsMin.Typ.
(1)
Max.Unit
LA_TCSo
Linear acceleration sensitivity
change vs. temperature
FS bit set to 00±0.01%/°C
Linear acceleration typical
LA_TyOff
LA_TCOff
Zero-g level offset
accuracy
(3),(4)
Linear acceleration Zero-g level
change vs. temperature
M_CASMagnetic cross-axis sensitivity
M_EFMaximum exposed field
FS bit set to 00±60mg
Max. delta from 25 °C±0.5mg/°C
Cross field = 0.5 gauss
H applied = ±3 gauss
No permitting effect on
zero reading
±1
10000gauss
M_RMagnetic resolution5mgauss
Sensitivity starts to
M_DFDisturbing field
degrade. Use S/R pulse to
20gauss
restore sensitivity
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.
%FS/
gauss
2.2 Electrical characteristics
@ Vdd = 2.5 V, T = 25 °C unless otherwise noted.
Table 4.Electrical characteristics
SymbolParameter
VddSupply voltage
Tes t
conditions
Min.Typ.
2.163.6V
Vdd_IOModule power supply for I/O1.711.8Vdd+0.1V
Idd
IddPdn
Current consumption in normal
(2)
mode
Current consumption in powerdown mode
-
TopOperating temperature range-40+85
1. Typical specifications are not guaranteed.
2. Magnetic sensor setting ODR = 7.5 Hz. Accelerometer sensor ODR = 50 Hz.
(1)
Max.Unit
360µA
2µA
°C
10/38Doc ID 018725 Rev 1
Page 11
LSM303DLMModule specifications
W
W
W
W
W
W
W
W
W
W
W
W
2.3 Communication interface characteristics
2.3.1 Sensor I2C - inter IC control interface
Subject to general operating conditions for Vdd and top.
Table 5.I2C slave timing values
SymbolParameter
2
C standard mode
I
Min.Max.Min.Max.
(1)
I2C fast mode
(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)
SCL clock frequency01000400KHz
SCL clock low time4.71.3
SCL clock high time4.00.6
SDA setup time250100ns
SDA data hold time0.013.450.010.9µs
SDA and SCL rise time1000
SDA and SCL fall time300
START condition hold time40.6
Repeated START condition
setup time
4.70.6
STOP condition setup time40.6
Bus free time between STOP
and START condition
4.71.3
1. Data based on standard I2C protocol requirement, not tested in production.
2. Cb = total capacitance of one bus line, in pF.
Figure 3.I
2
C slave timing diagram
67$57
(b)
20 + 0.1C
20 + 0.1C
µs
(2)
b
(2)
b
300
ns
300
µs
5(3($7('
67$57
6'$
6&/
I6'$
K67
Z6&//
U6'$
Z6&/+
VX6'$
U6&/
VX65
Z6365
K6'$
VX63
I6&/
67$57
6723
b. Measurement points are done at 0.2·Vdd_IO and 0.8·Vdd_IO, for both ports.
Doc ID 018725 Rev 111/38
Page 12
Absolute maximum ratingsLSM303DLM
3 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 6.Absolute maximum ratings
SymbolRatingsMaximum valueUnit
VddSupply voltage-0.3 to 4.8V
Vdd_IOI/O pins supply voltage-0.3 to 4.8V
VinInput voltage on any control pin (SCL, SDA) -0.3 to Vdd_IO +0.3V
A
POW
A
UNP
T
OP
T
STG
Acceleration (any axis, powered, Vdd = 2.5 V)
Acceleration (any axis, unpowered)
Operating temperature range-40 to +85°C
Storage temperature range-40 to +125°C
3,000 for 0.5 msg
10,000 for 0.1 msg
3,000 for 0.5 msg
10,000 for 0.1 msg
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.
12/38Doc ID 018725 Rev 1
Page 13
LSM303DLMTerminology
4 Terminology
4.1 Linear acceleration sensitivity
Linear acceleration sensitivity describes the gain of the accelerometer sensor and can be
determined by applying 1 g acceleration to it. As 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 to the sky) and noting the output value
again. By doing so, a ±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.
4.2 Zero-g level
Zero-g level Offset (LA_TyOff) describes the deviation of an actual output signal from the
ideal output signal if no linear acceleration is present. A sensor in steady-state on a
horizontal surface measures 0 g on both the X and Y axes, whereas the Z axis measures 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 the 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” (LA_TCOff) in
Table 3. The Zero-g level tolerance (TyOff) describes the standard deviation of the range of
Zero-g levels of a group of sensors.
4.3 Sleep-to-wakeup
The “sleep-to-wakeup” function, in conjunction with low-power mode, allows further
reduction of system power consumption and the development of new smart applications.
The LSM303DLM may be set to a low-power operating mode, characterized by lower data
rate refreshing. In this way, the device, even if sleeping, continues sensing acceleration and
generating interrupt requests.
When the sleep-to-wakeup function is activated, the LSM303DLM is able to automatically
wake up as soon as the interrupt event has been detected, increasing the output data rate
and bandwidth. With this feature the system may be efficiently switched from low-power
mode to full-performance depending on user-selectable positioning and acceleration events,
therefore ensuring power-saving and flexibility.
Doc ID 018725 Rev 113/38
Page 14
FunctionalityLSM303DLM
5 Functionality
The LSM303DLM is a system-in-package featuring a 3D digital linear acceleration and 3D
digital magnetic field detection sensor.
The system includes specific sensing elements and an IC interface capable of measuring
both the linear acceleration and the magnetic field applied on it and to provide a signal to the
external world through an I
The sensing system is manufactured using specialized micromachining processes, while
the IC interfaces are realized using a CMOS technology that allows the design of a
dedicated circuit which is trimmed to better match the sensing element characteristics.
The LSM303DLM features two data-ready signals (RDY) which indicate when a new set of
measured acceleration data and magnetic data are available, therefore simplifying data
synchronization in the digital system that uses the device.
The LSM303DLM may also be configured to generate an inertial wakeup and free-fall
interrupt signal according to a programmed acceleration event along the enabled axes. Both
free-fall and wakeup can be used simultaneously on two different accelerometer interrupts.
2
C serial interface with separated digital output.
5.1 Factory calibration
The IC interface is factory calibrated for linear acceleration sensitivity (LA_So), and linear
acceleration Zero-g level (LA_TyOff).
The trimming values are stored inside the device in non-volatile memory. When the device is
turned on, the trimming parameters are downloaded into the registers to be used during
normal operation. This allows the use of the device without further calibration.
14/38Doc ID 018725 Rev 1
Page 15
LSM303DLMApplication hints
6 Application hints
Figure 4.LSM303DLM electrical connection - recommended for I2C fast mode
Vdd_IO
SDA_A
SCL_A
Vdd_IO
Vdd_IO
RES
22
Rpu
Rpu=10kOhm
Vdd_IO
Rpu
NC
21
SCL_M
SDA_M
DRDY_M
RES
SET1
C1
15
418
C1=4.7uF
Rpu=10kOhm
Electrical connection
Z
1
DIRECTIONS OF
DETECTABLE
MAGNETIC FIELDS
Z
1
DIRECTIONS OF
DETECTABLE
ACCELERATIONS
Vdd
Y
C3 = 10uF
X
C4 = 100uF
Y
X
RES
GND
GND
SA0
VDD
RES
RES
INT2
INT1
28
1
LSM303DLM
NC
7
(TOP VIEW)
6.1 External capacitors
The C1 and C2 external capacitors should have a low SR value ceramic type construction.
Reservoir capacitor C1 is nominally 4.7 µF in capacitance, with the set/reset capacitor C2
nominally 0.22 µF in capacitance.
The device core is supplied through the Vdd line. Power supply decoupling capacitors
(C4=100 nF ceramic, C3=10 µF Al) should be placed as near as possible to the supply pin
of the device (common design practice). All the voltage and ground supplies must be
present at the same time to obtain proper behavior of the IC (refer to Figure 4).
The functionality of the device and the measured acceleration/magnetic field data is
selectable and accessible through the I
The functions, the threshold, and the timing of the two interrupt pins (INT 1 and INT 2) can
be completely programmed by the user through the I
RES
RES
RES
2
C interface.
RES
RES
SET2
RES
C2=0.22uF
GND
AM09240V1
2
C interface.
Doc ID 018725 Rev 115/38
Page 16
Application hintsLSM303DLM
6.2 Soldering information
The LGA package is compliant with the ECOPACK®, RoHS and “Green” standard.
It is qualified for soldering heat resistance according to JEDEC J-STD-020.
Leave “pin 1 indicator” unconnected during soldering.
Land pattern and soldering recommendations are available at www.st.com
6.3 High current wiring effects
High current in the wiring and printed circuit traces can be the cause of errors in magnetic
field measurements for compassing.
Conductor-generated magnetic fields add to the Earth’s magnetic field, creating errors in
compass heading computation.
Keep currents that are higher than 10 mA a few millimeters further away from the sensor IC.
.
16/38Doc ID 018725 Rev 1
Page 17
LSM303DLMDigital interfaces
7 Digital interfaces
The registers embedded inside the LSM303DLM are accessible through two separate I2C
serial interfaces; one for the accelerometer core and the other for the magnetometer core.
The two interfaces can be connected together on the PCB.
Table 7.Serial interface pin description
Pin namePin description
SCL_AI
SDA_AI
SCL_MI
SDA_MI
7.1 I2C serial interface
The LSM303DLM I2C is a bus slave. The I2C is employed to write the data into the registers
whose content can also be read back.
The relevant I
2
2
C serial clock (SCL) for accelerometer
2
C serial data (SDA) for accelerometer
2
C serial clock (SCL) for magnetometer
2
C serial data (SDA) for magnetometer
C terminology is given in the table below.
Table 8.Serial interface pin description
TermDescription
TransmitterThe device which sends data to the bus
ReceiverThe device which receives data from the bus
Master
SlaveThe device addressed by the master
There are two signals associated with the I
The device which initiates a transfer, generates clock signals, and terminates a
transfer
2
C 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.
Doc ID 018725 Rev 117/38
Page 18
Digital interfacesLSM303DLM
7.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
th
the 8
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 inside the LSM303DLM 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 LSBs represent the actual register address while the MSB enables address autoincrement. If the MSb of the SUB field is ‘1’, the SUB (register address) is automatically
increased to allow multiple data read/write.
Table 9.Transfer when master is writing one byte to slave
MasterSTSAD + WSUBDATASP
SlaveSAKSAKSAK
Table 10.Transfer when master is writing multiple bytes to slave
MasterSTSAD + WSUBDATADATASP
SlaveSAKSAKSAKSAK
Table 11.Transfer when master is receiving (reading) one byte of data from slave
MasterSTSAD + WSUBSRSAD + RNMAKSP
SlaveSAKSAKSAKDATA
Data are transmitted in byte format (DATA). Each data transfer contains 8 bits. The number
of bytes transferred 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. 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 a 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.
18/38Doc ID 018725 Rev 1
Page 19
LSM303DLMDigital interfaces
7.1.2 Linear acceleration digital interface
For linear acceleration, the default (factory) 7-bit slave address is 001100xb. The SDO/SA0
pad can be used to modify the least significant bit of the device address. If the SA0 pad is
connected to voltage supply, the LSB is ‘1’ (address 0011001b) otherwise, if the SA0 pad is
connected to ground, the LSB value is ‘0’ (address 0011000b). This solution permits
connecting and addressing two different accelerometers to the same I
The slave address is completed with a read/write bit. If the bit is ‘1’ (read), a repeated
START (SR) condition must be issued after the two sub-address bytes; if the bit is ‘0’ (write),
the master transmits to the slave with the direction unchanged. Table 12 explains how the
SAD+read/write bit pattern is composed, listing all the possible configurations.
Table 12.SAD and read/write patterns
CommandSAD[6:1]SAD[0] = SA0R/WSAD+R/W
Read0011000100110001 (31h)
Write0011000000110000 (30h)
Read0011001100110011 (33h)
Write0011001000110010 (32h)
2
C lines.
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 the first register to be read.
In the presented communication format, MAK is master acknowledge and NMAK is no
master acknowledge.
Table 13.Transfer when master is receiving (reading) multiple bytes of data from slave
MasterST SAD+WSUBSR SAD+RMAKMAKNMAK SP
SlaveSAKSAKSAK DATADATADATA
7.1.3 Magnetic field digital interface
For magnetic sensors the default (factory) 7-bit slave address is 0011110xb.
The slave address is completed with a read/write bit. If the bit is ‘1’ (read), a repeated
START (SR) condition must be issued after the two sub-address bytes; if the bit is ‘0’ (write),
the master transmits to the slave with the direction unchanged. Table 14 explains how the
SAD is composed.
Table 14.SAD and read/write patterns
CommandSAD[6:0]R/WSAD+R/W
Read0011110100111101 (3Dh)
Write0011110000111100 (3Ch)
Doc ID 018725 Rev 119/38
Page 20
Digital interfacesLSM303DLM
Magnetic signal interface reading/writing
The interface uses an address pointer to indicate which register location is to be read from
or written to. These pointer locations are sent from the master to this slave device and
succeed the 7-bit address plus 1 bit read/write identifier.
To minimize communication between the master and magnetic digital interface of
LSM303DLM, the address pointer updates automatically without master intervention.
This automatic address pointer update has two additional features. First, when address 12
or higher is accessed, the pointer updates to address 00, and secondly, when address 08 is
reached, the pointer rolls back to address 03. Logically, the address pointer operation
functions as shown below.
If (address pointer = 08) then the address pointer = 03
Or else, if (address pointer >= 12) then the address pointer = 0
Or else, (address pointer) = (address pointer) + 1
The address pointer value itself cannot be read via the I
Any attempt to read an invalid address location returns 0, and any write to an invalid
address location, or an undefined bit within a valid address location, is ignored by this
device.
2
C bus.
20/38Doc ID 018725 Rev 1
Page 21
LSM303DLMRegister mapping
8 Register mapping
Table 15 provides a listing of the 8-bit registers embedded in the device and the related
addresses:
Table 15.Register address map
Name
Reserved (do not modify)Table 12--00 - 1F----Reserved
Reserved (do not modify)Table 12--2E - 2F----Reserved
Slave
address
Type
Register address
DefaultComment
HexBinary
INT1_CFG_ATable 12rw30011 000000000000
INT1_SOURCE_ATable 12r31011 000100000000
INT1_THS_ATable 12rw32011 001000000000
INT1_DURATION_ATable 12rw33011 001100000000
INT2_CFG_ATable 12rw34011 010000000000
INT2_SOURCE_ATable 12r35011 010100000000
INT2_THS_ATable 12rw36011 011000000000
INT2_DURATION_ATable 12rw37011 011100000000
Reserved (do not modify)Table 12--38 - 3F----Reserved
CRA_REG_MTable 14rw000000000000010000
CRB_REG_MTable 14rw010000000100100000
MR_REG_MTable 14rw020000001000000011
Doc ID 018725 Rev 121/38
Page 22
Register mappingLSM303DLM
Table 15.Register address map (continued)
Name
OUT_X_H_MTable 14r0300000011output
OUT_X_L_MTable 14r0400000100output
OUT_Y_H_MTable 14r0700000101output
OUT_Y_L_MTable 14r0800000110output
OUT_Z_H_MTable 14r0500000111output
OUT_Z_L_MTable 14r0600001000output
SR_REG_MgTable 14r090000100100000000
IRA_REG_MTable 14r0A0000101001001000
IRB_REG_MTable 14r0B0000101100110100
IRC_REG_MTable 14r0C0000110000110011
Reserved (do not modify)Table 14--0D - 0E----Reserved
WHO_AM_I_MTable 14r0F0000111100111100Who am I ID
Reserved (do not modify)Table 14--10 - 3A----Reserved
Slave
address
Type
Register address
DefaultComment
HexBinary
Registers marked as “reserved” must not be changed. Writing to these 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 calibrated values. Their content is automatically restored when the device is powered
up.
22/38Doc ID 018725 Rev 1
Page 23
LSM303DLMRegister description
9 Register description
The device contains a set of registers which are used to control its behavior and to retrieve
acceleration data. The register address, made up of 7 bits, is used to identify them and to
write the data through the serial interface.
9.1 Linear acceleration register description
9.1.1 CTRL_REG1_A (20h)
Table 16.CTRL_REG1_A register
PM2PM1PM0DR1DR0ZenYenXen
Table 17.CTRL_REG1_A description
PM2 - PM0
DR1, DR0
Zen
Ye n
Xen
Power mode selection. Default value: 000
(000: power-down; others: refer to Table 18)
Data rate selection. Default value: 00
(00:50 Hz; others: refer to Table 19)
Z axis enable. Default value: 1
(0: Z axis disabled; 1: Z axis enabled)
Y axis enable. Default value: 1
(0: Y axis disabled; 1: Y axis enabled)
X axis enable. Default value: 1
(0: X axis disabled; 1: X axis enabled)
PM bits allow selection between power-down and two operating active modes. The device is
in power-down mode when the PD bits are set to “000” (default value after boot).
Table 18
shows all the possible power mode configurations and respective output data rates. Output
data in the low-power modes are computed with a low-pass filter cut-off frequency defined
by DR1 and DR0 bits.
DR bits, in normal-mode operation, select the data rate at which acceleration samples are
produced. In low-power mode they define the output data resolution.
Table 19 shows all the
possible configurations for the DR1 and DR0 bits.
Table 18.Power mode and low-power output data rate configurations
PM2PM1PM0Power mode selection
000Power-down--
001Normal modeODR
010Low-power0.5
Doc ID 018725 Rev 123/38
Output data rate [Hz]
ODR
LP
Page 24
Register descriptionLSM303DLM
Table 18.Power mode and low-power output data rate configurations (continued)
PM2PM1PM0Power mode selection
011Low-power1
100Low-power2
101Low-power5
110Low-power10
Table 19.Normal-mode output data rate configurations and low-pass cut-off
The BOOT bit is used to refresh the content of internal registers stored in the Flash memory
block. At device power-up, the content of the Flash memory block is transferred to the
internal registers related to trimming functions to permit good device behavior. If, for any
24/38Doc ID 018725 Rev 1
Page 25
LSM303DLMRegister description
reason, the content of the trimming registers has changed, it is sufficient to use this bit to
restore the correct values. When the BOOT bit is set to ‘1’ the content of the internal Flash is
copied to the corresponding internal registers and is used to calibrate the device. These
values are factory-trimmed and are different for every accelerometer. They permit good
device behavior and normally do not have to be modified. At the end of the boot process, the
BOOT bit is again set to ‘0’.
Table 22.High-pass filter mode configuration
HPM1HPM0High-pass filter mode
00Normal mode (reset reading HP_RESET_FILTER)
01Reference signal for filtering
10Normal mode (reset reading HP_RESET_FILTER)
HPCF[1:0]. These bits are used to configure the high-pass filter cut-off frequency (f
is given by:
The equation can be simplified to the following approximated equation:
Table 23.High-pass filter cut-off frequency configuration
[Hz]
f
HPcoeff2,1
t
Data rate = 50 Hz
0012820
010.51410
100.250.525
110.1250.2512.5
9.1.3 CTRL_REG3_A (22h)
f
1
t
⎝⎠
----------------------=
f
t
6HPc⋅
----------- -–
HPc
f
s
1
⎛⎞
ft [Hz]
Data rate = 100 Hz
f
s
------
⋅ln=
2π
ft [Hz]
Data rate = 400 Hz
, which
t)
ft [Hz]
Data rate = 1000 Hz
Table 24.CTRL_REG3_A register
IHLPP_ODLIR2I2_CFG1I2_CFG0LIR1I1_CFG1I1_CFG0
Table 25.CTRL_REG3_A description
IHL
PP_OD
Interrupt active high, low. Default value: 0
(0: active high; 1: active low)
Push-pull/open drain selection on interrupt pad. Default value 0.
(0: push-pull; 1: open drain)
Doc ID 018725 Rev 125/38
Page 26
Register descriptionLSM303DLM
Table 25.CTRL_REG3_A description (continued)
Latch interrupt request on INT2_SRC register, with INT2_SRC register cleared by
The BDU bit is used to inhibit output register updates between the reading of the upper and
lower register parts. In default mode (BDU = ‘0’), the lower and upper register parts are
updated continuously. If it is not certain whether to read faster than the output data rate, it is
recommended to set BDU bit to ‘1’. In this way, after the reading of the lower (upper) register
part, the content of that output register is not updated until the upper (lower) part is read
also. This feature avoids reading LSB and MSB related to different samples.
26/38Doc ID 018725 Rev 1
Page 27
LSM303DLMRegister description
9.1.5 CTRL_REG5_A (24h)
Table 29.CTRL_REG5_A register
000000TurnOn1TurnOn0
Table 30.CTRL_REG5_A description
Tu r n On 1 ,
Tu r n On 0
Turn O n bits are used for turning on the sleep-to-wakeup function.
Table 31.Sleep-to-wakeup configuration
TurnOn1TurnOn0Sleep-to-wakeup status
00Sleep-to-wakeup function is disabled
11
Turn-on mode selection for sleep-to-wakeup function. Default value: 00.
Turned on: the device is in low-power mode
(ODR is defined in CTRL_REG1_A)
By setting the TurnOn [1:0] bits to 11, the “sleep-to-wakeup” function is enabled. When an
interrupt event occurs, the device goes into normal mode, increasing the ODR to the value
defined in CTRL_REG1_A. Although the device is in normal mode, CTRL_REG1_A content
is not automatically changed to “normal mode” configuration.
9.1.6 HP_FILTER_RESET_A (25h)
Dummy register. Reading at this address instantaneously zeroes the content of the internal
high-pass filter. If the high-pass filter is enabled, all three axes are instantaneously set to 0
g. This makes it possible to surmount the settling time of the high-pass filter.
9.1.7 REFERENCE_A (26h)
Table 32.REFERENCE_A register
Ref7Ref6Ref5Ref4Ref3Ref2Ref1Ref0
Table 33.REFERENCE_A description
Ref7 - Ref0Reference value for high-pass filter. Default value: 00h.
This register sets the acceleration value taken as a reference for the high-pass filter output.
When the filter is turned on (at least one FDS, HPen2, or HPen1 bit is equal to ‘1’) and HPM
bits are set to “01”, filter out is generated taking this value as a reference.
Doc ID 018725 Rev 127/38
Page 28
Register descriptionLSM303DLM
9.1.8 STATUS_REG_A(27h)
Table 34.STATUS_REG_A register
ZYXORZORYORXORZYXDAZDAYDAXDA
Table 35.STATUS_REG_A description
ZYXOR
ZOR
YOR
XOR
ZYXDAX, Y, and Z axis new data available. Default value: 0
ZDAZ axis new data available. Default value: 0
X, Y, and Z axis data overrun. Default value: 0
(0: no overrun has occurred, 1: new data has overwritten the previous one)
Z axis data overrun. Default value: 0
(0: no overrun has occurred, 1: new data for the Z-axis has overwritten the previous
one)
Y axis data overrun. Default value: 0
(0: no overrun has occurred, 1: new data for the Y-axis has overwritten the previous
one)
X axis data overrun. Default value: 0
(0: no overrun has occurred, 1: new data for the X-axis has overwritten the previous
one)
(0: a new set of data is not yet available, 1: a new set of data is available)
(0: new data for the Z-axis is not yet available, 1: new data for the Z-axis is available)
YDAY axis new data available. Default value: 0
(0: new data for the Y-axis is not yet available, 1: new data for the Y-axis is available)
XDAX axis new data available. Default value: 0
(0: new data for the X-axis is not yet available, 1: new data for the X-axis is available)
9.1.9 OUT_X_L_A (28h), OUT_X_H_A (29h)
X-axis acceleration data. The value is expressed as 2’s complement.
9.1.10 OUT_Y_L_A (2Ah), OUT_Y_H_A (2Bh)
Y-axis acceleration data. The value is expressed as 2’s complement.
9.1.11 OUT_Z_L_A (2Ch), OUT_Z_H_A (2Dh)
Z-axis acceleration data. The value is expressed as 2’s complement.
9.1.12 INT1_CFG_A (30h)
Table 36.INT1_CFG_A register
AOI6DZHIEZLIEYHIEYLIEXHIEXLIE
28/38Doc ID 018725 Rev 1
Page 29
LSM303DLMRegister description
Table 37.INT1_CFG_A description
AOI
6D
ZHIE
ZLIE
YHIE
YLIE
XHIE
XLIE
AND/OR combination of interrupt events. Default value: 0
(see Table 38).
6-direction detection function enable. Default value: 0
(see Table 38).
Enable interrupt generation on Z high event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value higher than preset threshold)
Enable interrupt generation on Z low event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value lower than preset threshold)
Enable interrupt generation on Y high event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value higher than preset threshold)
Enable interrupt generation on Y low event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value lower than preset threshold)
Enable interrupt generation on X high event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value higher than preset threshold)
Enable interrupt generation on X low event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value lower than preset threshold)
Configuration register for Interrupt 1 source.
Table 38.Interrupt 1 source configurations
AOI6DInterrupt mode
00OR combination of interrupt events
016-direction movement recognition
10AND combination of interrupt events
116-direction position recognition
9.1.13 INT1_SRC_A (31h)
Table 39.INT1_SRC register
0 IA ZHZLYHYLXHXL
Doc ID 018725 Rev 129/38
Page 30
Register descriptionLSM303DLM
Table 40.INT1_SRC_A description
IA
ZH
ZL
YH
YL
XH
XL
Interrupt active. Default value: 0
(0: no interrupt has been generated, 1: one or more interrupts have been generated)
Z high. Default value: 0
(0: no interrupt, 1: Z high event has occurred)
Z low. Default value: 0
(0: no interrupt, 1: Z low event has occurred)
Y high. Default value: 0
(0: no interrupt, 1: Y high event has occurred)
Y low. Default value: 0
(0: no interrupt, 1: Y low event has occurred)
X high. Default value: 0
(0: no interrupt, 1: X high event has occurred)
X low. Default value: 0
(0: no interrupt, 1: X low event has occurred)
Interrupt 1 source register. Read-only register.
Reading at this address clears the INT1_SRC_A IA bit (and the interrupt signal on the INT 1
pin) and allows the refreshing of data in the INT1_SRC_A register if the latched option was
chosen.
The D6 - D0 bits set the minimum duration of the Interrupt 2 event to be recognized.
Duration steps and maximum values depend on the ODR chosen.
30/38Doc ID 018725 Rev 1
Page 31
LSM303DLMRegister description
9.1.16 INT2_CFG_A (34h)
Table 45.INT2_CFG_A register
AOI6DZHIEZLIEYHIEYLIEXHIEXLIE
Table 46.INT2_CFG_A description
AOI
6D
ZHIE
ZLIE
YHIE
AND/OR combination of interrupt events. Default value: 0
(see Table 47).
6-direction detection function enable. Default value: 0
(see Table 47).
Enable interrupt generation on Z high event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value higher than preset threshold)
Enable interrupt generation on Z low event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value lower than preset threshold)
Enable interrupt generation on Y high event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value higher than preset threshold)
Enable interrupt generation on Y low event. Default value: 0
YLIE
XHIE
XLIE
(0: disable interrupt request,
1: enable interrupt request on measured accel. value lower than preset threshold)
Enable interrupt generation on X high event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value higher than preset threshold)
Enable interrupt generation on X low event. Default value: 0
(0: disable interrupt request,
1: enable interrupt request on measured accel. value lower than preset threshold)
Configuration register for Interrupt 2 source.
Table 47.Interrupt mode configuration
AOI6DInterrupt mode
00OR combination of interrupt events
016-direction movement recognition
10AND combination of interrupt events
116-direction position recognition
Doc ID 018725 Rev 131/38
Page 32
Register descriptionLSM303DLM
9.1.17 INT2_SRC_A (35h)
Table 48.INT2_SRC_A register
0 IA ZHZLYHYLXHXL
Table 49.INT2_SRC_A description
IA
ZH
ZL
YH
YL
XH
XL
Interrupt active. Default value: 0
(0: no interrupt has been generated; 1: one or more interrupts have been generated)
Z high. Default value: 0
(0: no interrupt, 1: Z high event has occurred)
Z low. Default value: 0
(0: no interrupt; 1: Z low event has occurred)
Y high. Default value: 0
(0: no interrupt, 1: Y high event has occurred)
Y low. Default value: 0
(0: no interrupt, 1: Y low event has occurred)
X high. Default value: 0
(0: no interrupt, 1: X high event has occurred)
X Low. Default value: 0
(0: no interrupt, 1: X low event has occurred)
Interrupt 2 source register. Read-only register.
Reading at this address clears the INT2_SRC_A IA bit (and the interrupt signal on the INT 2
pin) and allows the refreshing of data in the INT2_SRC_A register if the latched option was
chosen.
The D6 - D0 bits set the minimum duration of the Interrupt 2 event to be recognized.
Duration time steps and maximum values depend on the ODR chosen.
9.2 Magnetic field sensing register description
9.2.1 CRA_REG_M (00h)
Table 54.CRA_REG_M register
(1)
0
1. This bit must be set to ‘0’ for correct working of the device.
Table 55.CRA_REG_M description
DO2 to DO0
(1)
0
(1)
0
DO2DO1DO00
(1)
(1)
0
Data output rate bits. These bits set the rate at which data is written to all three data
output registers (refer to Table 56). Default value: 100
Table 56.Data rate configurations
DO2DO1DO0Minimum data output rate (Hz)
00 00.75
00 11.5
01 03.0
01 17.5
10 015
10 130
11 075
111220
9.2.2 CRB_REG_M (01h)
Table 57.CRA_REG register
GN2GN1GN00
1. This bit must be set to ‘0’ for correct working of the device.
CRA_REG description
GN1-0
Gain configuration bits. The gain configuration is common for all channels (refer to
Table 58)
(1)
(1)
0
(1)
0
(1)
0
(1)
0
Doc ID 018725 Rev 133/38
Page 34
Register descriptionLSM303DLM
Table 58.Gain setting
GN2GN1GN0
001±1.31100980
010±1.9855760
011±2.5670600
100±4.0450400
101±4.7400355
110±5.6330295
111±8.1230205
9.2.3 MR_REG_M (02h)
Table 59.MR_REG
(1)
0
1. This bit must be set to ‘0’ for correct working of the device
Table 60.MR_REG description
MD1-0
(1)
0
Mode select bits. These bits select the operation mode of this device (refer to
Table 61)
Sensor input
field range
[Gauss]
(1)
0
Gain X/Y and
[LSB/Gauss]
(1)
0
Z
(1)
0
Gain Z
[LSB/Gauss]
(1)
0
Output range
0xF800–0x07FF
(-2048–2047)
MD1MD0
Table 61.Magnetic sensor operating mode
MD1MD0Mode
00Continuous-conversion mode
01Single-conversion mode
10Sleep-mode. Device is placed in sleep-mode
11Sleep-mode. Device is placed in sleep-mode
9.2.4 OUT_X_H_M (03), OUT_X_LH_M (04h)
X-axis magnetic field data. The value is expressed as 2’s complement.
9.2.5 OUT_Z_H_M (05), OUT_Z_L_M (06h)
Z-axis magnetic field data. The value is expressed as 2’s complement.
9.2.6 OUT_Y_H_M (07), OUT_Y_L_M (08h)
Y-axis magnetic field data. The value is expressed as 2’s complement.
34/38Doc ID 018725 Rev 1
Page 35
LSM303DLMRegister description
9.2.7 SR_REG_M (09h)
Table 62.SR register
------------LOCKDRDY
Table 63.SR register description
LOCK
DRDYData ready bit. This bit is when a new set of measurements is available.
Data output register lock. Once a new set of measurements is available, this bit
is set when the first magnetic field data register has been read.
9.2.8 IR_REG_M (0Ah/0Bh/0Ch)
Table 64.IRA_REG_M
01001000
Table 65.IRB_REG_M
00110100
Table 66.IRC_REG_M
00110011
9.2.9 WHO_AM_I _M (0F)
Table 67.WHO_AM_I_M
00111100
Doc ID 018725 Rev 135/38
Page 36
Package informationLSM303DLM
10 Package information
In order to meet environmental requirements, ST offers these devices in different grades of
ECOPACK
®
packages, depending on their level of environmental compliance. ECOPACK
specifications, grade definitions, and product status are available at: www.st.com.
ECOPACK is an ST trademark.
Figure 5.LGA-28: mechanical data and package dimensions
Dimensions
Ref.
A1 1
A2 0.785
A3 0.200
D1 4.850 5.000 5.150
E1 4.850 5.000 5.150
L1 1.650
L2 3.300
N1 0.550
M 0.040 0.100 0.160
T1 0.260 0.300 0.340
T2 0.360 0.400 0.440
d 0.200
k 0.050
h 0.100
Min.Typ.Max.
mm
Land Grid Array Packages
Outline and
mechanical data
LGA-28 (5x5x1)
36/38Doc ID 018725 Rev 1
8192208_B
Page 37
LSM303DLMRevision history
11 Revision history
Table 68.Document revision history
DateRevisionChanges
11-Apr-20111Initial release.
Doc ID 018725 Rev 137/38
Page 38
LSM303DLM
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 AN AUTHORIZED ST REPRESENTATIVE, 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.