■ Integrated low- and high-pass filters with user-
selectable bandwidth
■ Wide supply voltage: 2.4 V to 3.6 V
■ Low voltage-compatible IOs (1.8 V)
■ Embedded power-down and sleep mode
■ Embedded temperature sensor
■ Embedded FIFO
■ High shock survivability
■ Extended operating temperature range (-40 °C
to +85 °C)
■ ECOPACK
®
RoHS and “Green” compliant
Applications
■ Gaming and virtual reality input devices
■ Motion control with MMI (man-machine
interface)
■ GPS navigation systems
■ Appliances and robotics
L3GD20
MEMS motion sensor:
three-axis digital output gyroscope
LGA-16
Description
The L3GD20 is a low-power three-axis angular
rate sensor.
It includes a sensing element and an IC interface
capable of providing the measured angular rate to
the external world through a digital interface
2
(I
C/SPI).
The sensing element is manufactured using a
dedicated micro-machining process developed by
STMicroelectronics to produce inertial sensors
and actuators on silicon wafers.
The IC interface is manufactured using a CMOS
process that allows a high level of integration to
design a dedicated circuit which is trimmed to
better match the sensing element characteristics.
The L3GD20 has a full scale of ±250/±500/ ±2000
dps and is capable of measuring rates with a
user-selectable bandwidth.
The L3GD20 is available in a plastic land grid
array (LGA)package and can operate within a
temperature range of -40 °C to +85 °C.
2. 1 nF min value must be guaranteed under 11 V bias condition.
3. 100 nF plus 10 µF capacitors recommended.
(3)
Power supply
(2)
8/44Doc ID 022116 Rev 1
L3GD20Mechanical and electrical specifications
2 Mechanical and electrical specifications
2.1 Mechanical characteristics
@ Vdd = 3.0 V, T = 25 °C unless otherwise noted.
Table 3.Mechanical characteristics
SymbolParameterTest conditionMin. Typ.
FSMeasurement rangeUser-selectable
FS = 250 dps8.75
SoSensitivity
FS = 2000 dps70
SoDr
Sensitivity change vs.
temperature
From -40 °C to +85 °C±2%
FS = 250 dps±10
DVoffDigital zero-rate level
FS = 2000 dps±75
OffDr
Zero-rate level change
vs. temperature
FS = 250 dps±0.03dps/°C
FS = 2000 dps±0.04dps/°C
NLNon linearityBest fit straight line0.2% FS
RnRate noise density0.03
(1)
±250
±2000
(2)
Max.Unit
dps±500
mdps/digitFS = 500 dps17.50
dpsFS = 500 dps±15
dpsHz(⁄
ODRDigital output data rate
Top
1. The product is factory calibrated at 3.0 V. The operational power supply range is specified in Table 4.
2. Typical specifications are not guaranteed.
Operating temperature
range
-40+85°C
95/190/
380/760
Doc ID 022116 Rev 19/44
Hz
Mechanical and electrical specificationsL3GD20
2.2 Electrical characteristics
@ Vdd =3.0 V, T=25 °C unless otherwise noted.
Table 4.Electrical characteristics
SymbolParameterTest conditionMin.Typ.
(1)
(2)
Max.Unit
VddSupply voltage2.43.03.6V
Vdd_IOI/O pins supply voltage
(3)
1.71Vdd+0.1V
IddSupply current6.1mA
IddSL
IddPdn
VIH
VIL
To p
1. The product is factory calibrated at 3.0 V.
2. Typical specifications are not guaranteed.
3. It is possible to remove Vdd maintaining Vdd_IO without blocking the communication busses; in this condition the
measurement chain is powered off.
4. Sleep mode introduces a faster turn-on time relative to power-down mode.
Supply current
in sleep mode
(4)
Supply current in
power-down mode
Digital high level input
voltage
Digital low level input
voltage
Operating temperature
range
Selectable by digital
interface
Selectable by digital
interface
2mA
5µA
0.8*Vdd_I
O
0.2*Vdd_I
O
-40+85°C
V
V
2.3 Temperature sensor characteristics
@ Vdd =3.0 V, T=25 °C unless otherwise noted.
Table 5.Electrical characteristics
SymbolParameterTest conditionMin.Typ.
Temperature sensor
TSDr
TODRTemperature refresh rate1Hz
To p
1. The product is factory calibrated at 3.0 V.
2. Typical specifications are not guaranteed.
10/44Doc ID 022116 Rev 1
output change vs.
temperature
Operating temperature
range
(1)
(2)
Max.Unit
-1°C/digit
-
-40+85°C
L3GD20Mechanical and electrical specifications
W
W
W
W
W
W
W
W
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
(1)
Val ue
SymbolParameter
MinMax
tc(SPC)SPI clock cycle100ns
fc(SPC)SPI clock frequency10MHz
tsu(CS)CS setup time5
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 time6
tdis(SO)SDO output disable time50
Unit
ns
1. Values are guaranteed at a 10 MHz clock frequency for SPI with both 4 and 3 wires, based on characterization results; not
tested in production.
(a)
K6,
Y62
F63&
K62
K&6
/6%,1
GLV62
/6%287
!-V
Figure 3.SPI slave timing diagram
&6
VX&6
63&
VX6,
6',
6'2
06%,1
06%287
a. Measurement points are at 0.2·Vdd_IO and 0.8·Vdd_IO, for both input and output port.
Doc ID 022116 Rev 111/44
Mechanical and electrical specificationsL3GD20
W
W
W
W
W
W
W
W
W
W
W
W
2.4.2 I2C - Inter IC control interface
Subject to general operating conditions for Vdd and Top.
Table 7.I2C slave timing values (TBC)
SymbolParameter
I2C standard mode
(1)
I2C fast mode
MinMaxMinMax
(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. Data based on standard I2C protocol requirement; not tested in production.
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 time03.4500.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
2
C slave timing diagram
67$57
(b)
4.71.3
20 + 0.1C
20 + 0.1C
µs
(2)
b
(2)
b
300
ns
300
µs
5(3($7('
67$57
6'$
I6'$
U6'$
VX6'$
K6'$
6&/
Z6&//
K67
b. Measurement points are at 0.2·Vdd_IO and 0.8·Vdd_IO, for both ports.
Z6&/+
U6&/
I6&/
12/44Doc ID 022116 Rev 1
VX65
VX63
Z6365
67$57
6723
!-V
L3GD20Mechanical and electrical specifications
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
T
ESDElectrostatic discharge protection
Storage temperature range-40 to +125°C
STG
SgAcceleration g for 0.1 ms10,000g
2 (HBM)kV
1.5 (CDM)kV
200 (MM)V
Vin
Input voltage on any control pin
(CS, SCL/SPC, SDA/SDI/SDO, SDO/SA0)
Note:Supply voltage on any pin should never exceed 4.8 V
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
-0.3 to Vdd_IO +0.3V
Doc ID 022116 Rev 113/44
Mechanical and electrical specificationsL3GD20
2.6 Terminology
2.6.1 Sensitivity
An angular rate gyroscope is a device that produces a positive-going digital output for
counter-clockwise rotation around the sensitive axis considered. Sensitivity describes the
gain of the sensor and can be determined by applying a defined angular velocity to it. This
value changes very little over temperature and time.
2.6.2 Zero-rate level
Zero-rate level describes the actual output signal if there is no angular rate present. Zerorate 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 over
temperature and time.
2.7 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/mems
.
14/44Doc ID 022116 Rev 1
L3GD20Application hints
9nF
3 Application hints
Figure 5.L3GD20 electrical connections and external component values
VddGND
+
Ω
Z
X
(TOP VIEW)
DIRECTIONS OF THE
DETECTABLE
ANGULA RATES
+Ω
+
Y
Ω
X
SDA_SDI_SDO
Vdd_IO
SCL/SPC
SDO/SA0
GND
14
10nF(25V)*
C1
1316
12
10 µF
100 nF
Vdd
1
TOP
VIEW
49
5
8
GND
GND
AM10128V1
* C1 must guarantee 1 nF value under
11 V bias condition
DR
CS
SCL/SPC
SDA_SDI_SDO
Pull-up to be added when I2C interface isused
INT
Vdd I2C bus
Rpu
Rpu = 10kOhm
Power supply decoupling capacitors (100 nF + 10 µF) should be placed as near as possible
to the device (common design practice).
If Vdd and Vdd_IO are not connected together, 100 nF and 10 µF decoupling capacitors
must be placed between Vdd and common ground, and 100 nF between Vdd_IO and
common ground. Capacitors should be placed as near as possible to the device (common
design practice).
Doc ID 022116 Rev 115/44
Digital main blocksL3GD20
4 Digital main blocks
4.1 Block diagram
Figure 6.Block diagram
Out_Sel
00
01
DataReg
ADC
4.2 FIFO
LPF1
HPF
0
1
HPen
LPF2
10
11
INT_Sel
10
11
01
00
FIFO
32x16x3
Interrupt
generator
I2C
SPI
SCR REG
CONF REG
INT1
AM07230v1
The L3GD20 embeds 32 slots of 16-bit data FIFO for each of the three output channels:
yaw, pitch and roll. This allows consistent power saving for the system, since the host
processor does not need to continuously poll data from the sensor, but can wake up only
when needed and burst the significant data out from the FIFO. This buffer can work
accordingly in five different modes: Bypass mode, FIFO mode, Stream mode, Bypass-toStream mode and Stream-to-FIFO mode. Each mode is selected by the FIFO_MODE bits in
the FIFO_CTRL_REG (2Eh). Programmable Watermark level, FIFO_empty or FIFO_Full
events can be enabled to generate dedicated interrupts on the DRDY/INT2 pin (configured
through CTRL_REG3 (22h) and event detection information is available in FIFO_SRC_REG
(2Fh). Watermark level can be configured to WTM4:0 in FIFO_CTRL_REG (2Eh).
16/44Doc ID 022116 Rev 1
L3GD20Digital main blocks
4.2.1 Bypass mode
In Bypass mode, the FIFO is not operational and for this reason it remains empty. As
described in Figure 7 below, for each channel only the first address is used. The remaining
FIFO slots are empty. When new data is available, the old data is overwritten.
Figure 7.Bypass mode
xi,yi,z
empty
4.2.2 FIFO mode
In FIFO mode, data from the yaw, pitch and roll channels is stored in the FIFO. A watermark
interrupt can be enabled (I2_WMK bit into CTRL_REG3 (22h)) in order to be raised when
the FIFO is filled to the level specified in the WTM 4:0 bits of FIFO_CTRL_REG (2Eh). The
FIFO continues filling until it is full (32 slots of 16-bit data for yaw, pitch and roll). When full,
the FIFO stops collecting data from the input channels. To restart data collection, the
FIFO_CTRL_REG (2Eh) must be written back to Bypass mode.
i
x
0
x
1
x
2
x
31
y
y
i
0
y
1
y
2
y
31
l
z
0
z
1
z
2
z
31
AM07231v1
FIFO mode is represented in Figure 8: FIFO mode.
Doc ID 022116 Rev 117/44
Digital main blocksL3GD20
Figure 8.FIFO mode
xi,yi,z
i
4.2.3 Stream mode
In Stream mode, data from yaw, pitch and roll measurement are stored in the FIFO. A
watermark interrupt can be enabled and set as in the FIFO mode.The FIFO continues filling
until it is full (32 slots of 16-bit data for yaw, pitch and roll). When full, the FIFO discards the
older data as the new data arrives. Programmable watermark level events can be enabled to
generate dedicated interrupts on the DRDY/INT2 pin (configured through CTRL_REG3
(22h).
x
0
x
1
x
2
x
31
y
y
i
0
y
1
y
2
y
31
z
0
z
1
z
2
z
31
AM07232v1
Stream mode is represented in Figure 9: Stream mode.
18/44Doc ID 022116 Rev 1
L3GD20Digital main blocks
Figure 9.Stream mode
xi,yi,z
i
x
0
y
0
z
0
x
1
x
2
x
30
x
31
y
1
y
2
y
30
y
31
z
1
z
2
z
30
z
31
AM07234v1
Doc ID 022116 Rev 119/44
Digital main blocksL3GD20
4.2.4 Bypass-to-stream mode
In Bypass-to-stream mode, the FIFO begins operating in Bypass mode and once a trigger
event occurs (related to INT1_CFG (30h) register events), the FIFO starts operating in
Stream mode. Refer to Figure 10 below.
Figure 10. 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
xi,yi,z
i
x
x
x
x
x
y
0
y
1
y
2
y
30
y
31
z
0
1
2
30
31
0
z
1
z
2
z
30
z
31
Bypass mode
4.2.5 Stream-to-FIFO mode
In Stream-to-FIFO mode, data from yaw, pitch and roll measurement is stored in the FIFO. A
watermark interrupt can be enabled on pin DRDY/INT2 by setting the I2_WTM bit in
CTRL_REG3 (22h) in order to be raised when the FIFO is filled to the level specified in the
WTM4:0 bits of FIFO_CTRL_REG (2Eh). The FIFO continues filling until it is full (32 slots of
16-bit data for yaw, pitch and roll). When full, the FIFO discards the older data as the new
data arrives. Once a trigger event occurs (related to INT1_CFG (30h) register events), the
FIFO starts operating in FIFO mode. Refer to Figure 11 below.
Figure 11. 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
Trigge r ev e nt
xi,yi,z
z
0
z
1
z
2
z
30
z
31
i
x
0
x
1
x
2
x
31
y
y
i
0
y
1
y
2
y
31
AM07235v1
z
0
z
1
z
2
z
31
Stream Mode
Trigger event
20/44Doc ID 022116 Rev 1
FIFO Mode
AM07236v1
L3GD20Digital main blocks
4.2.6 Retrieve data from FIFO
FIFO data is read through OUT_X (Addr reg 28h,29h), OUT_Y (Addr reg 2Ah,2Bh) and
OUT_Z (Addr reg 2Ch,2Dh). When the FIFO is in Stream, Trigger or FIFO mode, a read
operation of the OUT_X, OUT_Y or OUT_Z registers provides the data stored in the FIFO.
Each time data is read from the FIFO, the oldest pitch, roll and yaw data is placed in the
OUT_X, OUT_Y and OUT_Z registers and both single read and read_burst (X,Y & Z with
auto-incrementing address) operations can be used. When data included in OUT_Z_H
(2Dh) is read, the system restarts to read information from addr OUT_X_L (28h).
Doc ID 022116 Rev 121/44
Digital interfacesL3GD20
5 Digital interfaces
The registers embedded in the L3GD20 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.
The serial interfaces are mapped onto the same pins. To select/exploit the I
CS line must be tied high (i.e connected to Vdd_IO).
I2C serial data (SDA)
SPI serial data input (SDI)
3-wire interface serial data output (SDO)
SPI serial data output (SDO)
I2C less significant bit of the device address
2
C interface, the
5.1 I2C serial interface
The L3GD20 I2C is a bus slave. The I2C is employed to write data into registers whose
content can also be read back.
The relevant I
Table 10.I2C terminology
TransmitterThe device which sends data to the bus
ReceiverThe device which receives data from the bus
Master
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. Both lines must be connected to Vdd_IO through external pull-up
resistors. When the bus is free, both lines are high.
2
The I
C interface is compliant with fast mode (400 kHz) I2C standards as well as with normal
mode.
2
C terminology is given in the table below.
TermDescription
The device which initiates a transfer, generates clock signals and terminates a
transfer
SlaveThe device addressed by the master
22/44Doc ID 022116 Rev 1
L3GD20Digital interfaces
5.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.
The Slave ADdress (SAD) associated with the L3GD20 is 110101xb. The SDO pin can be
used to modify the less significant bit of the device address. If the SDO pin is connected to
voltage supply, LSb is ‘1’ (address 1101011b). Otherwise, if the SDO pin is connected to
ground, the LSb value is ‘0’ (address 1101010b). This solution allows to connect and
address two different gyroscopes to the same I
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 obligated to generate an acknowledge after each byte of data
received.
2
The I
C embedded in the L3GD20 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 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 incremented to
allow multiple data read/write.
2
C bus.
The slave address is completed with a Read/Write bit. If the bit was ‘1’ (Read), a repeated
START (SR) condition must be issued after the two sub-address bytes; if the bit is ‘0’ (Write)
the master will transmit to the slave with direction unchanged. Table 11 explains how the
SAD+Read/Write bit pattern is composed, listing all the possible configurations.
Table 11.SAD+read/write patterns
CommandSAD[6:1]SAD[0] = SDOR/WSAD+R/W
Read1101010111010101 (D1h)
Write1101010011010100 (D0h)
Read1101011111010111 (D3h)
Write1101011011010110 (D2h)
Table 12.Transfer when master is writing one byte to slave
MasterSTSAD + WSUBDATASP
SlaveSAKSAKSAK
Doc ID 022116 Rev 123/44
Digital interfacesL3GD20
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+RMAKMAKNMAKSP
SlaveSAKSAKSAK DATADATADATA
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.
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 the first register to be read.
In the communication format presented, MAK is Master Acknowledge and NMAK is No
Master Acknowledge.
5.2 SPI bus interface
The SPI is a bus slave. The SPI allows writing and reading the registers of the device.
The serial interface interacts with the outside world through 4 wires: CS, SPC, SDI and SDO.
24/44Doc ID 022116 Rev 1
L3GD20Digital interfaces
Figure 12. Read and write protocol
CS
SPC
SDI
DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0
DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0
AM10129V1
SDO
RW
MS
AD5 AD4 AD3 AD2 AD1 AD0
CS is the Serial Port Enable and is controlled by the SPI master. It goes low at the start of
the transmission and goes back high at the end. SPC is the Serial Port Clock and it 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. Those 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 bytes 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 will drive 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 will be auto-incremented in multiple read/write commands.
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 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 incremented at every block.
The function and the behavior of SDI and SDO remain unchanged.
Doc ID 022116 Rev 125/44
Digital interfacesL3GD20
5.2.1 SPI read
Figure 13. SPI read protocol
CS
SPC
SDI
RW
MS
AD5 AD4 AD3 AD2 AD1 AD0
SDO
DO7 DO6 DO5 DO4 DO3DO2 DO1DO0
AM10130V1
The SPI read command is performed with 16 clock pulses. The 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.
The SPI Write command is performed with 16 clock pulses. The 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.
DI7 DI6 DI5 DI4 DI3 DI 2 DI1 DI 0
AM10132V1
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.
DI7 DI6 DI 5 D I4 DI 3 DI2 DI1 DI 0 DI15 D I1 4 DI13 DI12 DI11 DI 10 DI9 DI8
AM10133V1
3-wire mode is entered by setting the bit SIM (SPI serial interface mode selection) to ‘1’ in
CTRL_REG2.
Doc ID 022116 Rev 127/44
Digital interfacesL3GD20
Figure 17. SPI read protocol in 3-wire mode
CS
SPC
SDI/O
RW
AD5 AD4 AD3 AD2 AD1 AD 0MS
The SPI Read command is performed with 16 clock pulses:
bit 0: READ bit. The value is 1.
DO7 DO6 DO5 DO4 DO3 DO2 DO 1 DO0
AM10134V1
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.
28/44Doc ID 022116 Rev 1
L3GD20Output register mapping
6 Output register mapping
The table below provides a listing of the 8-bit registers embedded in the device, and the
related addresses:
Table 16.Register address map
Register address
NameType
HexBinary
Reserved-00-0E--
WHO_AM_Ir0F000 111111010100
Reserved-10-1F--
CTRL_REG1rw20010 000000000111
CTRL_REG2rw21010 000100000000
CTRL_REG3rw22010 001000000000
CTRL_REG4rw23010 001100000000
CTRL_REG5rw24010 010000000000
REFERENCErw25010 010100000000
OUT_TEMPr26010 0110output
Default
STATUS_REGr27010 0111output
OUT_X_Lr28010 1000output
OUT_X_Hr29010 1001output
OUT_Y_Lr2A010 1010output
OUT_Y_Hr2B010 1011output
OUT_Z_Lr2C010 1100output
OUT_Z_Hr2D010 1101output
FIFO_CTRL_REGrw2E010 111000000000
FIFO_SRC_REGr2F010 1111output
INT1_CFGrw30011 000000000000
INT1_SRCr31011 0001output
INT1_TSH_XHrw32011 001000000000
INT1_TSH_XLrw33011 001100000000
INT1_TSH_YHrw34011 010000000000
INT1_TSH_YLrw35011 010100000000
INT1_TSH_ZHrw36011 011000000000
INT1_TSH_ZLrw37011 011100000000
INT1_DURATIONrw38011 100000000000
Doc ID 022116 Rev 129/44
Output register mappingL3GD20
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 calibration values. Their content is automatically restored when the device is
powered up.
30/44Doc ID 022116 Rev 1
L3GD20Register description
7 Register description
The device contains a set of registers which are used to control its behavior and to retrieve
angular rate data. The register address, consisting of 7 bits, is used to identify them and to
write the data through the serial interface.
7.1 WHO_AM_I (0Fh)
Table 17.WHO_AM_I register
11010100
Device identification register.
7.2 CTRL_REG1 (20h)
Table 18.CTRL_REG1 register
DR1DR0BW1BW0PDZenXenYen
Table 19.CTRL_REG1 description
DR1-DR0Output data rate selection. Refer to Table 20
BW1-BW0Bandwidth selection. Refer to Table 20
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 for ODR selection. BW <1:0> is used for Bandwidth selection.
In the Table 20all frequencies resulting in combinations of DR / BW bits are reported.
Table 20.DR and BW configuration setting
DR <1:0>BW <1:0>ODR [Hz]Cut-Off
00009512.5
00019525
00109525
Doc ID 022116 Rev 131/44
Register descriptionL3GD20
Table 20.DR and BW configuration setting (continued)
DR <1:0>BW <1:0>ODR [Hz]Cut-Off
00119525
010019012.5
010119025
011019050
011119070
100038020
100138025
101038050
1011380100
110076030
110176035
111076050
1111760100
A combination of PD, Zen, Yen, Xen is used to set device to different modes (power-down /
normal / sleep mode) in accordance with Table 21 below.
Table 21.Power mode selection configuration
ModePDZenYenXen
Power-down0---
Sleep1000
Normal1---
7.3 CTRL_REG2 (21h)
Table 22.CTRL_REG2 register
(1)
0
1. These bits must be set to ‘0’ to ensure proper operation of the device
INT1 selection configuration. Default value: 0
(See Figure 20)
Out selection configuration. Default value: 0
(See Figure 20)
34/44Doc ID 022116 Rev 1
L3GD20Register description
Figure 18. INT1_Sel and Out_Sel configuration block diagram
Out_Sel <1:0>
0
LPF2
ADC
LPF1
HPF
1
HPen
7.7 REFERENCE/DATACAPTURE (25h)
Table 32.REFERENCE register
Ref7Ref6Ref5Ref4Ref3Ref2Ref1Ref0
00
01
10
11
INT1_Sel <1:0>
10
11
01
00
DataReg
FIFO
32x16x3
Interrupt
generator
AM07949V2
Table 33.REFERENCE register description
Ref 7-Ref0Reference value for interrupt generation. Default value: 0
7.8 OUT_TEMP (26h)
Table 34.OUT_TEMP register
Temp7Temp6Temp5Temp4Temp3Temp2Temp1Temp0
Table 35.OUT_TEMP register description
Temp7-Temp0Temperature data
Temperature data (1LSB/deg - 8-bit resolution). The value is expressed as two's
complement.
Doc ID 022116 Rev 135/44
Register descriptionL3GD20
7.9 STATUS_REG (27h)
Table 36.STATUS_REG register
ZYXORZORYORXORZYXDAZDAYDAXDA
Table 37.STATUS_REG description
X, Y, Z -axis data overrun. Default value: 0
ZYXOR
(0: no overrun has occurred; 1: new data has overwritten the previous data before it was
read)
ZOR
YOR
XOR
ZYXDA X, Y, Z -axis new data available. Default value: 0
ZDAZ axis new data available. Default value: 0
YDAY axis new data available. Default value: 0
XDAX axis new data available. Default value: 0
Z axis data overrun. Default value: 0
(0: no overrun has occurred; 1: new data for the Z-axis has overwritten the previous data)
Y axis data overrun. Default value: 0
(0: no overrun has occurred; 1: new data for the Y-axis has overwritten the previous data)
X axis data overrun. Default value: 0
(0: no overrun has occurred; 1: new data for the X-axis has overwritten the previous data)
(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)
(0: new data for the Y-axis is not yet available;1: new data for the Y-axis is available)
(0: new data for the X-axis is not yet available; 1: new data for the X-axis is available)
7.10 OUT_X_L (28h), OUT_X_H (29h)
X-axis angular rate data. The value is expressed as two’s complement.
7.11 OUT_Y_L (2Ah), OUT_Y_H (2Bh)
Y-axis angular rate data. The value is expressed as two’s complement.
7.12 OUT_Z_L (2Ch), OUT_Z_H (2Dh)
Z-axis angular rate data. The value is expressed as two’s complement.
7.13 FIFO_CTRL_REG (2Eh)
Table 38.REFERENCE register
FM2FM1FM0WTM4WTM3WTM2WTM1WTM0
36/44Doc ID 022116 Rev 1
L3GD20Register description
Table 39.REFERENCE register description
FM2-FM0FIFO mode selection. Default value: 00 (see Table 40)
WTM4-WTM0FIFO threshold. Watermark level setting
Table 40.FIFO mode configuration
FM2FM1FM0FIFO mode
000Bypass mode
001FIFO mode
010Stream mode
011Stream-to-FIFO mode
100Bypass-to-Stream mode
7.14 FIFO_SRC_REG (2Fh)
Table 41.FIFO_SRC register
WTMOVRNEMPTYFSS4FSS3FSS2FSS1FSS0
Table 42.FIFO_SRC register description
WTMWatermark status. (0: FIFO filling is lower than WTM level; 1: FIFO filling is equal
or higher than WTM level)
OVRNOverrun bit status.
(0: FIFO is not completely filled; 1:FIFO is completely filled)
EMPTYFIFO empty bit.
(0: FIFO not empty; 1: FIFO empty)
FSS4-FSS1FIFO stored data level
7.15 INT1_CFG (30h)
Table 43.INT1_CFG register
AND/ORLIRZHIEZLIEYHIEYLIEXHIEXLIE
Doc ID 022116 Rev 137/44
Register descriptionL3GD20
Table 44.INT1_CFG description
AND/OR
LIR
ZHIE
ZLIE
YHIE
YLIE
XHIE
AND/OR combination of interrupt events. Default value: 0
(0: OR combination of interrupt events 1: AND combination of interrupt events
Latch interrupt request. Default value: 0
(0: interrupt request not latched; 1: interrupt request latched)
Cleared by reading INT1_SRC reg.
Enable interrupt generation on Z high event. Default value: 0
(0: disable interrupt request; 1: enable interrupt request on measured 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 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 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 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 value higher
than preset threshold)
Enable interrupt generation on X low event. Default value: 0
XLIE
(0: disable interrupt request; 1: enable interrupt request on measured value lower than
preset threshold)
7.16 INT1_SRC (31h)
Interrupt source register. Read only register.
Table 45.INT1_SRC register
0 IA ZHZLYHYLXHXL
Table 46.INT1_SRC description
IA
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)
Interrupt active. Default value: 0
(0: no interrupt has been generated; 1: one or more interrupts have been generated)
38/44Doc ID 022116 Rev 1
L3GD20Register description
Reading at this address clears INT1_SRC IA bit (and eventually the interrupt signal on the
INT1 pin) and allows the refresh of data in the INT1_SRC register if the latched option was
chosen.
The D6 - D0 bits set the minimum duration of the interrupt event to be recognized. Duration
steps and maximum values depend on the ODR chosen.
The WAIT bit has the following definitions:
Wait = ‘0’: the interrupt falls immediately if the 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.
40/44Doc ID 022116 Rev 1
L3GD20Register description
Figure 19. Wait disabled
Figure 20. Wait enabled
Doc ID 022116 Rev 141/44
Package informationL3GD20
8 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 21. LGA-16: mechanical data and package dimensions
Dimensions
Ref.
A11.0000.0394
A20.7850.0309
A30.2000.0079
d0.3000.0118
D13.850 4.000 4.150 0.1516 0.1575 0.1634
E13.850 4.000 4.150 0.1516 0.1575 0.1634
L21.9500.0768
M0.1000.0039
N10.6500.0256
N20.9750.0384
P11.7500.0689
P21.5250.0600
T10.4000.0157
T20.3000.0118
k0.0500.0020
mminch
Min. Typ. Max. Min. Typ. Max.
Land Grid Array Package
Outline and
mechanical data
LGA-16 (4x4x1mm)
42/44Doc ID 022116 Rev 1
8125097_A
L3GD20Revision history
9 Revision history
Table 61.Document revision history
DateRevisionChanges
18-Aug-20111Initial release.
Doc ID 022116 Rev 143/44
L3GD20
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.