|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
this is information on a product in full production. april 2013 docid024204 rev 2 1/32 32 LIS3MDL digital output magnetic sensor: ultra low-power, high performance 3-axis magnetometer datasheet - production data features ? wide supply voltage, 1.9 v to 3.6 v ? independent io supply (1.8 v) ? 4/ 8/ 12/ 16 gauss selectable magnetic full-scale ? continuous and single conversion mode ? 16-bit data output ? interrupt generator ? self-test ? i 2 c/spi digital output interface ? power-down mode/ low-power mode ? ecopack ? rohs and ?green? compliant applications ? magnetometer ? compass description the LIS3MDL is an ultra low-power high performance three axis magnetic sensor. the LIS3MDL has user selectable full-scales of 4/ 8/ 12/ 16 gauss. the self-test capability allows the user to check the functioning of the sensor in the final application. the device may be configured to generate interrupt signals for magnetic field detection. the LIS3MDL includes an i 2 c serial bus interface that supports standard and fast mode 100 khz and 400 khz and spi serial standard interface. the LIS3MDL is available in a small thin plastic land grid array package (lga) and is guaranteed to operate over an extended temperature range of -40 c to +85 c. lga-12 (2.0x2.0x1.0 mm) table 1. device summary order codes temperature range [ c] package packaging LIS3MDL -40 to +85 lga-12 tray LIS3MDLtr -40 to +85 lga-12 tape and reel www.st.com
contents LIS3MDL 2/32 docid024204 rev 2 contents 1 block diagram and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1 block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 magnetic and electrical specifications . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.1 magnetic characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 communication interface characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.4.1 spi - serial peripheral interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.4.2 sensor i2c - inter ic control interface . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 3 terminology and functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.1 sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2 zero-gauss level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 factory calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 4 application hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.1 external capacitors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.2 soldering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.3 high current wiring effects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 5 digital interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1 i2c serial interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 5.1.1 i2c operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 5.2 spi bus interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5.2.1 spi read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5.2.2 spi write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2.3 spi read in 3-wire mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6 register mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 docid024204 rev 2 3/32 LIS3MDL contents 7 registers description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.1 who_am_i (0fh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.2 ctrl_reg1 (20h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.3 ctrl_reg2 (21h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.4 ctrl_reg3 (22h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.5 ctrl_reg4 (23h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.6 ctrl_reg5 (24h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.7 status_reg (27h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.8 out_x_l (28h), out_x_h(29h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.9 out_y_l (2ah), out_y_h (2bh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.10 out_z_l (2ch), out_z_h (2dh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.11 temp_out_l (2eh), temp_out_h (2fh) . . . . . . . . . . . . . . . . . . . . . . 27 7.12 int_cfg (30h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.13 int_src (31h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7.14 int_ths_l(32h), int_ths_h(33h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 8 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 9 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 list of tables LIS3MDL 4/32 docid024204 rev 2 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 table 3. mechanical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 table 4. temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 table 5. electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 table 6. spi slave timing values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 table 7. i2c slave timing values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 table 8. absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 table 9. serial interface pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 10. serial interface pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 11. sad+read/write patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 12. transfer when master is writing one byte to slave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 13. transfer when master is writing multiple bytes to slave . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 table 14. transfer when master is receiving (reading) one byte of data from slave . . . . . . . . . . . . . 18 table 15. transfer when master is receiving (reading) multiple bytes of data from slave . . . . . . . . . 18 table 16. register address map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 17. who_am_i register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 18. ctrl_reg1 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 19. ctrl_reg1 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 20. x and y axes operating mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 21. output data rate configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 table 22. ctrl_reg2 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 23. ctrl_reg2 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 24. full-scale selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 25. ctrl_reg3 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 table 26. ctrl_reg3 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 27. system operating mode selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 28. ctrl_reg4 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 29. ctrl_reg4 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 30. z-axis operating mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 table 31. ctrl_reg5 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 table 32. ctrl_reg5 description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 table 33. status_reg register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 table 34. status_reg description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 table 35. int_cfg register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 table 36. int_cfg description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 table 37. int_src register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 38. int_src description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 39. int_ths_l_m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 40. int_ths_h_m . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 table 41. vflga 2x2x1 12ld pitch 0.5 mm mechanical data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 table 42. document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 docid024204 rev 2 5/32 LIS3MDL list of figures list of figures figure 1. block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 figure 2. pin connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 figure 3. spi slave timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 figure 4. i2c slave timing diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 figure 5. LIS3MDL electrical connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 figure 6. read and write protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 figure 7. spi read protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 figure 8. multiple bytes spi read protocol (2 bytes example) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 figure 9. spi write protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 10. multiple bytes spi write protocol (2 bytes example) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 figure 11. spi read protocol in 3-wire mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 figure 12. vflga 2x2x1 12ld pitch 0.5 mm drawing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 block diagram and pin description LIS3MDL 6/32 docid024204 rev 2 1 block diagram and pin description 1.1 block diagram figure 1. block diagram 1.2 pin description figure 2. pin connection gams280120131409fsr i (m) y+ z+ y- z- x+ x- charge amplifier i2c spi cs scl/spc sda/sdi/sdo sdo/sa1 control logic clock trimming circuits a/d control converter mux logic interrupt generator gams280120131415fsr vdd_io c1 sc l/spc res gnd drdy vdd res cs bottom view 4 1 5 6 int 11 12 sda/sdi/sdo 7 10 sd0/sa1 top view direction of detectable magnetic fields x z y docid024204 rev 2 7/32 LIS3MDL block diagram and pin description table 2. pin description pin# name function 1 scl spc i 2 c serial clock (scl) spi serial port clock (spc) 2 reserved connect to gnd 3 gnd connect to gnd 4 c1 capacitor connection (c1=100 nf) 5 vdd power supply 6 vdd_io power supply for i/o pins 7 int interrupt 8 drdy data ready 9 sdo sa1 spi serial data output (sdo) i 2 c less significant bit of the device address (sa1) 10 cs spi enable i 2 c/spi mode selection (1: spi idle mode / i2c communication enabled; 0: spi communication mode / i 2 c disabled) 11 sda sdi sdo i 2 c serial data (sda) spi serial data input (sdi) 3-wire interface serial data output (sdo) 12 reserved connect to gnd magnetic and electrical specifications LIS3MDL 8/32 docid024204 rev 2 2 magnetic and electrical specifications 2.1 magnetic characteristics @ vdd = 2.5 v, t = 25 c unless otherwise noted (a) a. the product is factory calibrated at 2.5 v. the operational power supply range is from 1.9 v to 3.6 v. table 3. mechanical characteristics symbol parameter test conditions min. typ. (1) max. unit fs measurement range 4 gauss 8 12 16 gn sensitivity fs=4 gauss 6842 lsb/ gauss fs=8 gauss 3421 fs=12 gauss 2281 fs=16 gauss 1711 zgauss zero-gauss level fs=4 gauss 1 gauss rms rms noise x-axis; fs=12 gauss; ultra-high performance mode 3.2 mgauss y-axis; fs=12 gauss ultra-high performance mode 3.2 mgauss z-axis; fs=12 gauss ultra-high performance mode 4.1 mgauss nl non-linearity best fit straight line fs=12 gauss happlied = 6 gauss 0.12 %fs st self test (2) x-axis fs = 12 gauss 13 gauss y-ax is fs = 12 gauss 13 z-axis fs = 12 gauss 0.1 1 df magnetic disturbing field zero-gauss offset starts to degrade 50 gauss to p operating temperature range -40 +85 c 1. typical specifications are not guaranteed. 2. absolute value. docid024204 rev 2 9/32 LIS3MDL magnetic and electrical specifications 2.2 temperature sensor characteristics @ vdd = 2.5 v, t = 25 c unless otherwise noted (b) . 2.3 electrical characteristics @ vdd = 2.5 v, t = 25 c unless otherwise noted (c) b. the product is factory calibrated at 2.5 v. table 4. temperature sensor characteristics symbol parameter test conditions min. typ. (1) max. unit tsdr temperature sensor output change vs. temperature - 8 lsb/c todr temperature refresh rate (2) odr hz top operating temperature range -40 +85 c 1. typical specifications are not guaranteed. 2. if temp_en bit in ctrl_reg1 (20h) is set to?1?, a temperature data is ac quired at each conversion cycle. refer to ta b le 2 1 c. the product is factory calibrated at 2.5 v. the operational power supply range is from 1.9 v to 3.6 v. table 5. electrical characteristics symbol parameter test conditions min. typ. (1) max. unit vdd supply voltage 1.9 3.6 v vdd_io power supply for i/o 1.71 1.8 vdd+0.1 idd_hr current consumption in ultra-high resolution mode odr = 20 hz 270 a idd_lp current consumption in low-power mode odr = 20 hz 40 a idd_pd current consumption in power down 1 a top operating temperature range -40 +85 c 1. typical specification are not guaranteed. magnetic and electrical specifications LIS3MDL 10/32 docid024204 rev 2 2.4 communication interface characteristics 2.4.1 spi - serial peripheral interface subject to general operating conditions for vdd and top. figure 3. spi slave timing diagram (d) table 6. spi slave timing values symbol parameter value (1) 1. values are guaranteed at 10 mhz clock frequency for spi with both 4 and 3 wires, based on characterization results, not tested in production. unit min. max. tc(spc) spi clock cycle 100 ns fc(spc) spi clock frequency 10 mhz tsu(cs) cs setup time 5 ns th(cs) cs hold time 20 tsu(si) sdi input setup time 5 th(si) sdi input hold time 15 tv(so) sdo valid output time 50 th(so) sdo output hold time 5 tdis(so) sdo output disable time 50 d. measurement points are done at 0.2? vdd_io and 0.8? vdd_io, for both input and output ports. spc cs sdi sdo 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 docid024204 rev 2 11/32 LIS3MDL magnetic and electrical specifications 2.4.2 sensor i 2 c - inter ic control interface subject to general operating conditions for vdd and top. figure 4. i 2 c slave timing diagram (e) table 7. i 2 c slave timing values symbol parameter i 2 c standard mode (1) i 2 c fast mode (1) unit min. max. min. max. f (scl) scl clock frequency 0 100 0 400 khz t w(scll) scl clock low time 4.7 1.3 s t w(sclh) scl clock high time 4.0 0.6 t su(sda) sda setup time 250 100 ns t h(sda) sda data hold time 0 3.45 0 0.9 s t r(sda) t r(scl) sda and scl rise time 1000 20 + 0.1c b (2) 300 ns t f(sda) t f(scl) sda and scl fall time 300 20 + 0.1c b (2) 300 t h(st) start condition hold time 4 0.6 s t su(sr) repeated start condition setup time 4.7 0.6 t su(sp) stop condition setup time 4 0.6 t w(sp:sr) bus free time between stop and start condition 4.7 1.3 1. data based on standard i 2 c protocol requirement, not tested in production. 2. cb = total capacitance of one bus line, in pf. e. measurement points are done at 0.2? vdd_io and 0.8? vdd_io, for both ports. 6 ' $ 6 & |