![]() |
|
If you can't view the Datasheet, Please click here to try to view without PDF Reader . |
|
Datasheet File OCR Text: |
this is preliminary information on a new product foreseen to be developed. details are subject to change without notice. november 2013 docid025603 rev 1 1/66 LSM6DB0 inemo advanced inertial module: 3d accelerometer, 3d gyroscope and signal processor datasheet - target specification features ? motion sensors: ? 2/4/8 g full scale ? 245/500/2000 dps full scale ? 6-axis eco power mode down to 1.8 ma ? 3 independent acceleration channels and 3 angular rate channels ? embedded temperature sensor ? 20 kbyte data batching ? 6-axis and 9-axis quaternions ? self-test ? ecopack ? , rohs and ?green? compliant ? signal processor: ? brain: arm-based, 32-bit cortex-m0 core ? flash memory and sram including a bank with error code correction (ecc) ?i 2 c master port ?i 2 c slave port ? spi master/slave ? 4-wire uart ? 11 programmable gpios ? low-power features ? 8 x 32-bit dual timers, watchdog timer (wdg), cortex-m0 system tick (systick) timer ? standard 4-wire jtag and 2-wire swd ? 80 mhz / 32 khz rc / up to 80 mhz from single-ended external clock applications ? sensor hubs and sensor fusion ? significant motion-detection and gesture recognition ? gaming and geomagnetic rotation vectors ? pedometers, step counters and step detectors ? calibrated compasses ? enhanced navigation and motion tracking description the LSM6DB0 is an advanced low-power high- performance smart sensor system available in a plastic 3x3x1 mm lga (land grid array) package. the module includes a three-axis accelerometer, 3-axis gyroscope and cortex-m0 core with flash, sram, dual timers, 2 i 2 c (master/slave), 1 spi (master/slave) and 1 uart (transmitter/receiver). the LSM6DB0 has a full-scale acceleration range of 2/4/8 g and an angular rate range of 245/500/2000 dps. the LSM6DB0 has two operating modes in that the accelerometer and gyroscope sensors can be either activated at the same odr or the accelerometer can be enabled while the gyroscope is in power-down. the module collects inputs from the accelerometer, gyroscope, compass and several other sensors and elaborates/fuses together 9 or 10 axes (inemo engine software) which are provided to the main application processor. for example, quaternions achieve the best compromise in terms of power saving for the overall system. the LSM6DB0 is fully compliant with the android kitkat os. lga-22 (3x3x1 mm) table 1. device summary order codes temp. range [ c] package packaging LSM6DB0 -40 to +85 lga-22 tray LSM6DB0tr -40 to +85 lga-22 tape and reel www.st.com
contents LSM6DB0 2/66 docid025603 rev 1 contents 1 block diagrams and pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.1 block diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2 pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2 LSM6DB0 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3 mechanical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.1 accelerometer and gyroscope mechanical characteristics . . . . . . . . . . . . 15 3.2 accelerometer and gyroscope electrical characteristics . . . . . . . . . . . . . . 16 3.3 microprocessor electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4 temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4 motion sensor communication interface characteristics . . . . . . . . . . 19 4.1 i 2 c - inter-ic control interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 5 terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.1 sensitivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5.2 zero-g and zero rate level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 6 device operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 6.1 accelerometer and gyroscope operating modes . . . . . . . . . . . . . . . . . . . 21 6.2 gyroscope power modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 6.3 microprocessor operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7 accelerometer and gyroscope functionality . . . . . . . . . . . . . . . . . . . . . 25 7.1 multiple reads (burst) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.2 fifo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.2.1 bypass mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.2.2 fifo mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 7.2.3 continuous mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 7.2.4 continuous-to-fifo mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 7.2.5 bypass-to-continuous mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 docid025603 rev 1 3/66 LSM6DB0 contents 66 8 microprocessor functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.1 arm cortex-m0 core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.1.1 nested vectored interrupt controller (nvic) . . . . . . . . . . . . . . . . . . . . . . 30 8.2 power supply scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 8.3 reset management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 8.4 boot mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 8.5 clock management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 8.6 general-purpose inputs/outputs (gpios) . . . . . . . . . . . . . . . . . . . . . . . . . 33 8.7 memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 8.8 timers and watchdogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.8.1 dual timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.8.2 watchdog (wdg) timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.8.3 system tick (systick) timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 8.9 communication interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 8.10 i2c bus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 8.11 universal asynchronous receiver transmitter (uart) . . . . . . . . . . . . . . . 35 8.12 serial peripheral interface (spi) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 8.13 jtag and sw debug support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 9 absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 9.1 accelerometer and gyroscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 9.2 microprocessor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 10 register mapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 11 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 11.1 int_gen_cfg2_xl (01h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 11.2 int_gen_ths2_xl (02h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 11.3 int_gen_dur2_xl (03h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 11.4 act_ths (04h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 11.5 act_dur (05h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 11.6 int_gen_cfg1_xl (06h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.7 int_gen_ths1_x_xl (07h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 11.8 int_gen_ths1_y_xl (08h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 contents LSM6DB0 4/66 docid025603 rev 1 11.9 int_gen_ths1_z_xl (09h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 11.10 int_gen_dur1_xl (0ah) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 11.11 reference_g (0bh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 11.12 int1_ctrl (0ch) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 11.13 int2_ctrl (0dh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 11.14 who_am_i (0fh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 11.15 ctrl_reg1_g (10h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 11.16 ctrl_reg2_g (11h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 11.17 ctrl_reg3_g (12h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 11.18 orient_cfg_g (13h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 11.19 int_gen_src_g (14h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 11.20 out_temp_l (15h), out_temp_h (16h) . . . . . . . . . . . . . . . . . . . . . . . 50 11.21 status_reg (17h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 11.22 out_x_g (18h - 19h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 11.23 out_y_g (1ah - 1bh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 11.24 out_z_g (1ch - 1dh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 11.25 ctrl_reg4 (1eh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 11.26 ctrl_reg5_xl (1fh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 11.27 ctrl_reg6_xl (20h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 11.28 ctrl_reg7_xl (21h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 11.29 ctrl_reg8 (22h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 11.30 ctrl_reg9 (23h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 11.31 ctrl_reg10 (24h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 11.32 int_gen_src_xl (26h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 11.33 status_reg (27h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 11.34 out_x_xl (28h - 29h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 11.35 out_y_xl (2ah - 2bh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 11.36 out_z_xl (2ch - 2dh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 11.37 fifo_ctrl (2eh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 11.38 fifo_src (2fh) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 11.39 int_gen_cfg_g (30h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 11.40 int_gen_ths_x_g (31h - 32h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 11.41 int_gen_ths_y_g (33h - 34h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 docid025603 rev 1 5/66 LSM6DB0 contents 66 11.42 int_gen_ths_z_g (35h - 36h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 11.43 int_gen_dur_g (37h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 12 soldering information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 13 package information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 14 revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 list of tables LSM6DB0 6/66 docid025603 rev 1 list of tables table 1. device summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 table 2. pin description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 table 3. mechanical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 table 4. electrical characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 table 5. dc and ac parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 table 6. temperature sensor characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 8 table 7. i 2 c slave timing values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 table 8. gyroscope operating mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22 table 9. operating mode current consumption. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 table 10. gyroscope turn-on time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 table 11. accelerometer turn-on time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 table 12. LSM6DB0 operating modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .24 table 13. alternate function input/output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 table 14. debug mode selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 table 15. absolute maximum ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 16. absolute maximum ratings for microprocessor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 table 17. motion sensor registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 table 18. int_gen_cfg2_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 0 table 19. int_gen_cfg2_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 table 20. int_gen_ths2_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 21. int_gen_ths2_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 22. int_gen_dur2_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1 table 23. int_gen_dur2_xl register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 24. act_ths register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 25. act_ths register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 table 26. act_dur register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 table 27. act_dur register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .41 table 28. int_gen_cfg1_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 table 29. int_gen_cfg1_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 table 30. int_gen_ths1_x_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 table 31. int_gen_ths1_x_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 table 32. int_gen_ths1_y_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 33. int_gen_ths1_y_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 34. int_gen_ths1_z_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 35. int_gen_ths_z_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 36. int_gen_dur1_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 3 table 37. int_gen_dur1_xl register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 38. reference_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43 table 39. reference_g register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 table 40. int1_ctrl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 table 41. int1_ctrl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44 table 42. int2_ctrl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 table 43. int2_ctrl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45 table 44. who_am_i register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 table 45. ctrl_reg1_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 table 46. ctrl_reg1_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 table 47. odr and bw configuration setting (after lpf1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 table 48. odr and bw configuration setting (after lpf2). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 docid025603 rev 1 7/66 LSM6DB0 list of tables 66 table 49. ctrl_reg2_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 table 50. ctrl_reg2_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 table 51. ctrl_reg3_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 table 52. ctrl_reg3_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 table 53. gyroscope high-pass filter cutoff frequency configuration [hz]. . . . . . . . . . . . . . . . . . . . . . 49 table 54. orient_cfg_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 table 55. orient_cfg_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 table 56. int_gen_src_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49 table 57. int_gen_src_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 table 58. out_temp_l register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 table 59. out_temp_h register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 table 60. out_temp register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 table 61. status_reg register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 table 62. status_reg register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 table 63. ctrl_reg4 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 table 64. ctrl_reg4 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 table 65. ctrl_reg5_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 table 66. ctrl_reg5_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 table 67. ctrl_reg6_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52 table 68. ctrl_reg6_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 table 69. odr register setting (accelerometer only mode) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 table 70. ctrl_reg7_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53 table 71. ctrl_reg7_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 72. low-pass cutoff frequency in high resolution mode (hr = 1) . . . . . . . . . . . . . . . . . . . . . . . 54 table 73. ctrl_reg8 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 table 74. ctrl_reg8 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 4 table 75. ctrl_reg9 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 76. ctrl_reg9 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 table 77. ctrl_reg10 register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 78. ctrl_reg10 register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 table 79. int_gen_src_xl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 80. int_gen_src_xl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 81. status_reg register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 82. status_reg register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 table 83. fifo_ctrl register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 table 84. fifo_ctrl register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57 table 85. fifo mode selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 table 86. fifo_src register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 table 87. fifo_src register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 table 88. fifo_src example: ovr/fss details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 table 89. int_gen_cfg_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58 table 90. int_gen_cfg_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 table 91. int_gen_ths_xh_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 table 92. int_gen_ths_xl_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 table 93. int_gen_ths_x_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 table 94. int_gen_ths_yh_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 95. int_gen_ths_yl_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 96. int_gen_ths_y_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 97. int_gen_ths_zh_g register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 98. int_gen_ths_zl_g register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 99. int_gen_ths_z_g register description. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 table 100. int_gen_dur_g register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60 list of tables LSM6DB0 8/66 docid025603 rev 1 table 101. int_gen_dur_g register description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 table 102. document revision history. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 docid025603 rev 1 9/66 LSM6DB0 list of figures 66 list of figures figure 1. LSM6DB0 application block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 figure 2. accelerometer and gyroscope block diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 figure 3. microprocessor block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11 figure 4. pin connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 figure 5. i 2 c slave timing diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 figure 6. switching operating modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 figure 7. multiple reads: accelerometer only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 figure 8. multiple reads: accelerometer and gyroscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 figure 9. bypass mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 figure 10. fifo mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 figure 11. continuous mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 figure 12. continuous-to-fifo mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 figure 13. bypass-to-continuous mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 figure 14. LSM6DB0 digital power supply generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 figure 15. clock tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 figure 16. debug mode selection timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 figure 17. int_sel and out_sel configuration gyroscope block diagram . . . . . . . . . . . . . . . . . . . 48 figure 18. wait bit disabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 figure 19. wait bit enabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 figure 20. lga-22: mechanical data and package dimensions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 block diagrams and pin description LSM6DB0 10/66 docid025603 rev 1 1 block diagrams and pin description 1.1 block diagrams the LSM6DB0 includes a 3-axis accelerometer and 3-axis gyroscope combined with a low- power microprocessor arm-based cortex-m0. the reference block diagram is described in figure 1 while the motion sensor and microprocessor block diagrams are described in figure 2 and figure 3 , respectively. figure 1. LSM6DB0 application block diagram magnetometer pressure sensor other sensors accelerometer and gyroscope fifos brain arm cortex-m0 ram data fusion algorithms application processor i 2 c i 2 c i 2 c int int LSM6DB0 int1 int2 dio7 dio8 dio12 dio11 docid025603 rev 1 11/66 LSM6DB0 block diagrams and pin description 66 figure 2. accelerometer and gyroscope block diagram figure 3. microprocessor block diagram legend: nvic = nested vectored interrupt controller, gpio = general-purpose input/output charge amplifier y+ z+ y- z- a x+ x- mux x,y,z y+ z+ y- z- x+ x- m u x adc lpf1 1 0 hp_en lpf2 hpf data reg interrupt generator i2c spi out_sel int_sel src registers cfg registers gyro fifo lpf1 adc 1 0 hpf hpis1 fds xl gyro lpf2 hr interrupt generator xl 0 0 1 1 xl xl xl gyro gyro gyro + block diagrams and pin description LSM6DB0 12/66 docid025603 rev 1 1.2 pin description figure 4. pin connections table 2. pin description pin# name function i/o level 1 vdd1.8 power supply for i/o pins 2 dio0 gpio0 / sw_tdio / jtag tms / uart_cts vdd1.8 3 dio1 gpio1 / sw_tck / jtag tck / uart_rts vdd1.8 4 dio2 gpio2 / i 2 c2_scl (slave) / uart_txd vdd1.8 5 reset microcontroller reset vdd 6 dio3 gpio3 / i 2 c2_sda (slave) / uart_rxd vdd1.8 7 dio4 gpio4 / jtag tdo vdd1.8 8 dio5 gpio5 / jtag tdi / clock input vdd1.8 9 dio8 gpio8 / i 2 c1_sda (master) / spi_out vdd 10 dio6 gpio6 / 16 mhz clock output / clock 32khz vdd 11 dio7 gpio7 / i 2 c1_scl (master) / spi_clock vdd 12 gnd 0 v supply 13 ld01.2 connect to decoupling capacitor for 1.2 v digital regulator to gnd 14 vdd (1) analog and i/o pins power supply (top view) directions of the detectable angular rates x z x y (top view) direction of the detectable accelerations vdd1.8 dio0 dio1 dio2 gnd dio8 dio4 reset dio6 1 10 7 5 16 ldo1.2 vdd dio10 dio9 6 dio5 11 17 20 res cap res res bottom view 21 22 dio3 dio7 res res + + + y x z docid025603 rev 1 13/66 LSM6DB0 block diagrams and pin description 66 15 dio10 gpio10 / spi_input vdd 16 dio9 gpio9 / spi_cs vdd 17 res connect to gnd 18 res connect to gnd 19 res connect to vdd 20 cap connect to gnd with ceramic capacitor (2) 21 res leave unconnected 22 res leave unconnected 1. recommended 100 nf filter capacitor. 2. 10 nf (10%), 16 v. 1 nf minimum value has to be guaranteed under 12 v bias condition. the int1 and int2 pins of the motion sensor are internally connected to the dio12 and dio11 pins of the microcontroller, refer to figure 1 . table 2. pin description (continued) pin# name function i/o level LSM6DB0 features LSM6DB0 14/66 docid025603 rev 1 2 LSM6DB0 features in the LSM6DB0 a complete sensor networking has been created with three additional external sensor connections supported by the i 2 c bus (eg. compass, pressure sensors, others). external data acquisition is totally configurable with a different data rate selection and different data reads for each slave sensor. to minimize the core?s (brain) power consumption, dedicated fifo buffers are available in the inertial sensors to maximize the temporary data storage. the LSM6DB0 can manage standard hub functionalities together with the implementation of complex algorithms for the following applications: ? sensor batching with combination of sensors based on different odr and related time-stamp information; ? sensor fusion with the support of quaternions, gravity, linear acceleration and orientation data; ? pedometers; ? game rotation vectors; ? geomagnetic rotation vectors (3-axis accelerometer and 3-axis magnetometer); ? compass calibration; ? gyroscope bias estimation and offset compensation; ? accelerometer background calibration; ? significant motion; ? gesture recognition; the device provides optimal flexibility, modularity and scalability in the customization of software routines for the customer. the LSM6DB0 completely offloads the application processor from the computation of sensor fusion, delivering unparalleled low-power consumption at the system level. owing to the embedded core (brain) in the device, there is no need for an external processing unit nor storage. the LSM6DB0 is compliant with android kitkat os. docid025603 rev 1 15/66 LSM6DB0 mechanical characteristics 66 3 mechanical characteristics 3.1 accelerometer and gyroscope mechanical characteristics t = 25 c unless otherwise noted (a) a. the operational power supply range is from 1.71 v to 3.6 v. table 3. mechanical characteristics symbol parameter test conditions min. typ. (1) max. unit la_fs linear acceleration measurement range 2 g 4 8 g_fs angular rate measurement range 245 dps 500 2000 la_so linear acceleration sensitivity fs = 2 g 0.061 mg/lsb fs = 4 g 0.122 fs = 8 g 0.244 g_so angular rate sensitivity fs = 245 dps 8.75 mdps/lsb fs = 500 dps 17.50 fs = 2000 dps 70 la_tyoff linear acceleration typical zero- g level offset accuracy (2) fs = 8 g 90 m g g_tyoff angular rate typical zero-rate level (3) fs = 2000 dps 30 dps la_odr linear acceleration output data rate gyro on 952 476 238 119 59.5 14.9 hz gyro off 952 476 238 119 50 10 hz mechanical characteristics LSM6DB0 16/66 docid025603 rev 1 3.2 accelerometer and gyroscope electrical characteristics t = 25 c unless otherwise noted table 4. electrical characteristics g_odr angular digital output data rate 952 476 238 119 59.5 14.9 hz top operating temperature range -40 +85 c 1. typical specifications are not guaranteed. 2. typical zero-g level offset value after soldering. 3. typical zero-rate level offset value after msl3 preconditioning. table 3. mechanical characteristics (continued) symbol parameter test conditions min. typ. (1) max. unit symbol parameter test conditions min. typ. (1) max. unit vdd core and i/o pins supply voltage 1.71 3.6 v la_idd accelerometer current consumption in normal mode odr = 10 hz 60 a odr = 50 hz 160 odr ? 119 hz 330 g_idd gyroscope current consumption in eco power mode 1.8 ma top operating temperature range -40 +85 c 1. typical specifications are not guaranteed. docid025603 rev 1 17/66 LSM6DB0 mechanical characteristics 66 3.3 microprocessor electrical characteristics characteristics measured in table 5 are for recommended operating conditions unless otherwise specified. typical values are in reference to t a = 25 ? c, v dd =1.8 v. table 5. dc and ac parameters symbol parameter test conditions min. typ. max. unit vdd operating supply voltage master serial port (dio6 to dio10) 1.71 3.6 v vdd1.8 operating supply voltage (dio0 to dio5) 1.75 1.8 1.95 v power consumption (dhrystone without compiler options) i supply supply current reset 50 na active (cpu, flash, and ram) 20 ma from ram 80 mhz (0.79 dmips/mhz) 40 mhz (0.79 dmips/mhz) 20 mhz (0.79 dmips/mhz) 16 mhz (0.79 dmips/mhz) 10 mhz (0.79 dmips/mhz) 10.3 5.95 3.85 3.48 2.9 from flash 80 mhz (0.3 dmips/mhz) 40 mhz (0.43 dmips/mhz) 20 mhz (0.56 dmips/mhz) 16 mhz (0.79 dmips/mhz) 10 mhz (0.79 dmips/mhz) 7.5 5.5 4.74 4.34 3.7 digital input and output (1.8 v supply) c in (1) port i/o capacitance 1.3 1.4 1.7 pf r pd (1) pull-down value 117 211 334 kw t rise (1) rise time 0.1*v dd to 0.9*v dd , c l = 50 pf 10.3 19 ns t fall (1) fall time 0.9*v dd to 0.1*v dd , c l = 50 pf 11 22 v ih (1) logic high-level input voltage 0.65 v dd v v il (1) logic low-level input voltage 0.35 v dd digital input and output (3.3 v supply) c in (1) port i/o capacitance 1.3 1.4 1.7 pf r pd (1) pull-down value 53 84 144 kw r pu (1) pull-up value 57 81 122 t rise (1) rise time 0.1*v dd to 0.9*v dd , c l = 50 pf 1.4 12 ns t fall (1) fall time 0.9*v dd to 0.1*v dd , c l = 50 pf 1.5 12.5 mechanical characteristics LSM6DB0 18/66 docid025603 rev 1 3.4 temperature sensor characteristics @ vdd = 3v, t = 25 c unless otherwise noted (b) v ih (1) logic high-level input voltage 0.65 v dd v v il (1) logic low-level input voltage 0.35 v dd t a operating ambient temperature range -40 85 c 1. guaranteed by design b. the product is factory calibrated at 3.0 v. table 6. temperature sensor characteristics symbol parameter test condition min. typ. (1) max. unit todr temperature refresh rate gyro off (2) 50 hz gyro on 59.5 tsen temperature sensitivity (3) 16 lsb/c top operating temperature range -40 +85 c 1. typical specifications are not guaranteed. 2. when the accelerometer odr is set to 10 hz and the gyroscope block is turned off, the todr value is 10 hz. 3. the output of the temperature sensor is 0 (typ.) at 25 c docid025603 rev 1 19/66 LSM6DB0 motion sensor communication interface characteristics 66 4 motion sensor communication interface characteristics 4.1 i 2 c - inter-ic control interface subject to general operating conditions for vdd and top. figure 5. i 2 c slave timing diagram note: measurement points are done at 0.2vdd and 0.8vdd, for both ports. 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.01 3.45 0.01 0.9 s 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. sd a scl t su(sp) t w(scll) t su(sda) t su(sr) t h(st) t w(sclh) t h(sda) t w(sp:sr) start repea ted sta rt stop sta rt terminology LSM6DB0 20/66 docid025603 rev 1 5 terminology 5.1 sensitivity linear acceleration sensitivity can be determined, for example, by applying 1 g acceleration to the device. because the sensor can measure dc accelerations, this can be done easily by pointing the selected axis towards the ground, noting the output value, rotating the sensor 180 degrees (pointing towards the sky) and noting the output value again. by doing so, 1 g acceleration is applied to the sensor. subtracting the larger output value from the smaller one, and dividing the result by 2, leads to the actual sensitivity of the sensor. this value changes very little over temperature and over time. the sensitivity tolerance describes the range of sensitivities of a large number of sensors. an angular rate gyroscope is device that produces a positive-going digital output for counterclockwise rotation around the 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. 5.2 zero- g and zero rate level linear acceleration zero- g level offset (tyoff) describes the deviation of an actual output signal from the ideal output signal if no acceleration is present. a sensor in a steady state on a horizontal surface will measure 0 g on both the x-axis and y-axis, whereas the z-axis will measure 1 g . ideally, the output is in the middle of the dynamic range of the sensor (content of out registers 00h, data expressed as two?s complement number). a deviation from the ideal value in this case is called zero- g offset. offset is to some extent a result of stress to mems sensor and therefore the offset can slightly change after mounting the sensor onto a printed circuit board or exposing it to extensive mechanical stress. offset changes little over temperature, see ?linear acceleration zero- g level change vs. temperature? in table 3 . the zero- g level tolerance (tyoff) describes the standard deviation of the range of zero- g levels of a group of sensors. zero-rate level describes the actual output signal if there is no angular rate present. the zero-rate level of precise mems sensors is, to some extent, a result of stress to the sensor and therefore the 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. docid025603 rev 1 21/66 LSM6DB0 device operating modes 66 6 device operating modes 6.1 accelerometer and gyroscope operating modes the LSM6DB0 has two operating modes available: only accelerometer active and gyroscope in power down or both accelerometer and gyroscope sensors active at the same odr. switching from one mode to the other requires one write operation: writing to ctrl_reg6_xl (20h) the accelerometer operates in normal mode and the gyroscope is powered down, writing to ctrl_reg1_g (10h) both the accelerometer and gyroscope are activated at the same odr. figure 6 depicts both modes of operation from power down. figure 6. switching operating modes 6.2 gyroscope power modes in the LSM6DB0, the gyroscope can be configured in three different operating modes: power-down, low-power and normal mode. low-power mode is available for lower odr (14.9, 59.5, 119 hz) while for greater odr (238, 476, 952 hz), the device is automatically in normal mode. table 8 summarizes the odr configuration (odr_g[2:0] bits set in ctrl_reg1_g (10h) ) and corresponding power modes. to enable low-power mode, the lp_mode bit in ctrl_reg3_g (12h) has to be set to ?1?. low-power mode allows reaching low power consumption while maintaining the device always on, refer to table 9 . the turn-on time to change from all operating modes for the gyroscope and accelerometer is indicated in table 10 and table 11 . accelerometer only accelerometer + gyro power down write ctrl_reg1_g write ctrl_reg1_g with ctrl_reg6_xl = pd write ctrl_reg6_xl device operating modes LSM6DB0 22/66 docid025603 rev 1 table 8. gyroscope operating mode odr_g [2:0] odr [hz] power mode (1) 1. gyroscope low-power mode is available for g_fs = 2000 dps. 000 power-down power-down 001 14.9 low-power 010 59.5 low-power 011 119 low-power 100 238 normal mode 101 476 normal mode 110 952 normal mode table 9. operating mode current consumption odr [hz] power mode current consumption (1) [ma] 1. gyroscope and accelerometer current consumption typical values based on characterization data. 14.9 low-power 1.8 59.5 low-power 2.3 119 low-power 2.9 238 normal mode 4.3 476 normal mode 4.3 952 normal mode 4.3 table 10. gyroscope turn-on time odr [hz] lpf1 only (1) 1. the table contains the number of samples to be discarded after switching between low-power mode and normal mode. lpf1 and lpf2 (1) 14.9 2 lpf2 not available 59.5 or 119 3 13 238 4 14 476 5 15 952 8 18 docid025603 rev 1 23/66 LSM6DB0 device operating modes 66 6.3 microprocessor operating modes several microprocessor operating modes are defined for the LSM6DB0: ? reset mode ? two low-power modes: low-power wait-for-interrupt (wfi) mode and high-power wait- for-interrupt (wfi) mode ? active mode in reset mode the LSM6DB0 is in ultra-low-power consumption: no voltage regulators, nor clocks are powered. the LSM6DB0 enters reset mode by asserting the external reset signal. while in low-power wfi mode, the LSM6DB0 cpu is stopped and the high-frequency 80 mhz rc oscillator is powered down. all peripherals, apart from one timer, are disabled. the power consumption is about 800 a with a 1 khz clock. in high-power wfi mode, the cpu is stopped and the high-frequency 80 mhz rc oscillator is powered up. this mode allows a faster response time for an interrupt to wake up the cpu. all peripherals are enabled and can wake up the cpu with an interrupt. the power consumption in this mode is around 2 ma with an 80 mhz clock. in active mode the LSM6DB0 is fully operational: all interfaces, including spi, i 2 c, jtag and uart, are active as well as all internal power supplies together with the high-speed frequency oscillator. the mcu core is also running. table 11. accelerometer turn-on time odr [hz] bw = 400 hz (1) 1. the table contains the number of samples to be discarded after switching between power-down mode and normal mode. bw = 200 hz (1) bw = 100 hz (1) bw = 50 hz (1) 14.9 0 0 0 0 59.5 0 0 0 0 119 1 1 1 2 238 1 1 2 4 476 1 2 4 7 952 2 4 7 14 device operating modes LSM6DB0 24/66 docid025603 rev 1 table 12 summarizes the modes of operation and transition times. table 12. LSM6DB0 operating modes ip active mode high-power wfi mode low-power wfi mode cpu yes yes yes flash sram bor yes por high-speed internal osc. no low-speed internal osc. yes timer yes spi no i2c uart wdg yes gpios yes wake-up time to active mode 0 s 50 ns 300 s consumption (typ) 10 ma 3 ma 800 a docid025603 rev 1 25/66 LSM6DB0 accelerometer and gyroscope functionality 66 7 accelerometer and gyroscope functionality 7.1 multiple reads (burst) when only the accelerometer is activated and the gyroscope is in power down, starting from out_x_xl (28h - 29h) multiple reads can be performed. once out_z_xl (2ch - 2dh) is read, the system automatically restarts from out_x_xl (28h - 29h) (see figure 7 ). figure 7. multiple reads: accelerometer only when both accelerometer and gyroscope sensors are activated at the same odr, starting from out_x_g (18h - 19h) multiple reads can be performed. once out_z_xl (2ch - 2dh) is read, the system automatically restarts from out_x_g (18h - 19h) (see figure 8 ). figure 8. multiple reads: accelerometer and gyroscope 7.2 fifo the LSM6DB0 embeds a 32 slots of 16-bit data fifo for each of the gyroscope?s three output channels, yaw, pitch and roll, and 16-bit data fifo for each of the accelerometer?s three output channels, x, y and z. this allows consistent power saving for the system, since the host processor does not need to continuously poll data from the sensor, but it can wake up only when needed and burst the significant data out from the fifo. this buffer can work accordingly to five different modes: bypass mode, fifo-mode, continuous mode, continuous-to-fifo mode and bypass-to-continuous. each mode is selected by the fmode [2:0] bits in the fifo_ctrl (2eh) register. programmable fifo threshold status, fifo overrun events and the number of unread samples stored are available in the fifo_src (2fh) register and can be set to generate dedicated interrupts on the int1 pin using the int1_ctrl (0ch) register. x,y,z out_z_xl read #1 (2c-2d) (2a-2b) out_y_xl (28-29) out_x_xl x,y,z read #n out_z_xl (2c-2d) (2a-2b) out_y_xl (28-29) out_x_xl (15-16) out_temp x,y,z out_z_xl read #1 (2c-2d) (2a-2b) out_y_xl (28-29) out_x_xl x,y,z read #n out_z_g (1c-1d) (1a-1b) out_y_g (18-19) out_x_g out_z_xl (2c-2d) (2a-2b) out_y_xl (28-29) out_x_xl out_z_g (1c-1d) (1a-1b) out_y_g (18-19) out_x_g (15-16) out_temp accelerometer and gyroscope functionality LSM6DB0 26/66 docid025603 rev 1 fifo_src (2fh) (fth) goes to '1' when the number of unread samples ( fifo_src (2fh) (fss5:0)) is greater than or equal to fth [4:0] in fifo_ctrl (2eh) . if fifo_ctrl (2eh) (fth[4:0]) is equal to 0, fifo_src (2fh) (fth) goes to ?0?. fifo_src (2fh) (ovrn) is equal to '1' if a fifo slot is overwritten. fifo_src (2fh) (fss [5:0]) contains stored data levels of unread samples. when fss [5:0] is equal to ?000000?, fifo is empty, when fss [5:0] is equal to ?100000?, fifo is full and the unread samples are 32. the fifo feature is enabled by writing '1' in ctrl_reg9 (23h) (fifo_en). to guarantee the correct acquisition of data during the switching into and out of fifo mode, the first sample acquired must be discarded. 7.2.1 bypass mode in bypass mode ( fifo_ctrl (2eh) (fmode [2:0]= 000), the fifo is not operational and it remains empty. bypass mode is also used to reset the fifo when in fifo mode. as described in figure 9 , for each channel only the first address is used. when a new data is available the old data is overwritten. figure 9. bypass mode 7.2.2 fifo mode in fifo mode ( fifo_ctrl (2eh) (fmode [2:0] = 001) data from the output channels are stored in the fifo until it is overwritten. to reset fifo content, bypass mode should be selected by writing fifo_ctrl (2eh) (fmode [2:0]) to '000'. after this reset command, it is possible to restart fifo mode, writing fifo_ctrl (2eh) (fmode [2:0]) to '001'. the fifo buffer memorizes 32 levels of data but the depth of the fifo can be resized by setting the stop_on_fth bit in ctrl_reg9 (23h) . if the stop_on_fth bit is set to '1', fifo depth is limited to fifo_ctrl (2eh) (fth [4:0]) + 1 data. a fifo threshold interrupt can be enabled (int_ovr bit in int1_ctrl (0ch) ) in order to be raised when the fifo is filled to the level specified by the fth[4:0] bits of fifo_ctrl (2eh) . when a fifo threshold interrupt occurs, the first data has been overwritten and the fifo stops collecting data from the input channels. x 0 y z 0 y 0 x 1 y 1 z 1 x 2 y 2 z 2 x 31 y 31 z 31 x i ,y i ,z i empty docid025603 rev 1 27/66 LSM6DB0 accelerometer and gyroscope functionality 66 figure 10. fifo mode 7.2.3 continuous mode continuous mode ( fifo_ctrl (2eh) (fmode[2:0] = 110) provides a continuous fifo update: as new data arrives, the older is discarded. a fifo threshold flag fifo_src (2fh) (fth) is asserted when the number of unread samples in fifo is greater than or equal to fifo_ctrl (2eh) (fth4:0). it is possible to route fifo_src (2fh) (fth) to the int1 pin by writing the int_fth bit to ?1? in register int1_ctrl (0ch) . a full-flag interrupt can be enabled, int1_ctrl (0ch) (int_ fss5)= '1', when the fifo becomes saturated and in order to read the contents all at once. if an overrun occurs, the oldest sample in fifo is overwritten and the ovrn flag in fifo_src (2fh) is asserted. in order to empty the fifo before it is full, it is also possible to pull from fifo the number of unread samples available in fifo_src (2fh) (fss[5:0]). figure 11. continuous mode x 0 y i z 0 y 0 x 1 y 1 z 1 x 2 y 2 z 2 x 31 y 31 z 31 x i ,y i ,z i x 0 y 0 z 0 x 1 y 1 z 1 x 2 y 2 z 2 x 31 y 31 z 31 x i ,y i ,z i x 30 y 30 z 30 accelerometer and gyroscope functionality LSM6DB0 28/66 docid025603 rev 1 7.2.4 continuous-to-fifo mode in continuous-to-fifo mode ( fifo_ctrl (2eh) (fmode [2:0] = 011), fifo behavior changes according to the int_gen_src_xl (26h) (ia_xl) bit. when int_gen_src_xl (26h) (ia_xl) bit is equal to '1' fifo operates in fifo mode, when int_gen_src_xl (26h) (ia_xl) bit is equal to '0' fifo operates in continuous mode. the interrupt generator should be set to the desired configuration by means of int_gen_cfg1_xl (06h) , int_gen_ths1_x_xl (07h) , int_gen_ths1_y_xl (08h) and int_gen_ths1_z_xl (09h) . the ctrl_reg4 (1eh) (lir_xl) bit should be set to '1' in order to have latched interrupt. figure 12. continuous-to-fifo mode x 0 y z 0 y 0 x 1 y 1 z 1 x 2 y 2 z 2 x 31 y 31 z 31 x i ,y i ,z i continuous mode fifo mode trigger event x 0 y 0 z 0 x 1 y 1 z 1 x 2 y 2 z 2 x 31 y 31 z 31 x i ,y i ,z i x 30 y 30 z 30 docid025603 rev 1 29/66 LSM6DB0 accelerometer and gyroscope functionality 66 7.2.5 bypass-to-continuous mode in bypass-to-continuous mode ( fifo_ctrl (2eh) (fmode[2:0] = '100'), data measurement storage inside fifo operates in continuous mode when int_gen_src_xl (26h) (ia_xl) is equal to '1', otherwise fifo content is reset (bypass mode). the interrupt generator should be set to the desired configuration by means of int_gen_cfg1_xl (06h) , int_gen_ths1_x_xl (07h) , int_gen_ths1_y_xl (08h) and int_gen_ths1_z_xl (09h) . the ctrl_reg4 (1eh) (lir_xl) bit should be set to '1' in order to have latched interrupt. figure 13. bypass-to-continuous mode x 0 y i z 0 y 0 x 1 y 1 z 1 x 2 y 2 z 2 x 31 y 31 z 31 x i ,y i ,z i empty bypass mode continuous mode trigger event x 0 y 0 z 0 x 1 y 1 z 1 x 2 y 2 z 2 x 31 y 31 z 31 x i ,y i ,z i x 30 y 30 z 30 microprocessor functionality LSM6DB0 30/66 docid025603 rev 1 8 microprocessor functionality 8.1 arm cortex-m0 core the arm cortex-m0 processor is a very low gate count, energy-efficient processor. it has been developed to provide an energy-efficient processor for microcontrollers and embedded applications requiring an area-optimized processor. the arm cortex-m0 32-bit risc processor uses thumb-2 ? technology, providing a blend of 16/32-bit instructions delivering a smaller code size to 8-bit and 16-bit architectures. owing to its embedded arm core, the LSM6DB0 is compatible with all arm tools and software. 8.1.1 nested vectored interrupt controller (nvic) the arm cortex-m0 processor supports up to 32 interrupt requests (irq), a non-maskable interrupt (nmi), and various system exceptions. the nvic and the arm cortex-m0 processor core are closely coupled and provide: ? low-latency interrupt processing ? four interrupt priority levels ? efficient processing of late-arriving interrupts and higher priority interrupts ? support for tail-chaining 8.2 power supply scheme ? vdd (c) = 1.8 v to 3.3 v: external power supply for master serial port (dio6 to dio10). provided through vdd pin. ? vdd1.8 (c) = 1.8 v: external power supply for internal regulator. provided through vdd1.8 pin. the LSM6DB0 integrates an ldo regulator which is used to generate the power supply for the internal digital circuitry. the ldo supplies 1.2 v for the digital blocks and requires a decoupling capacitor for stable operation. figure 14. LSM6DB0 digital power supply generation c. for minimum and maximum operating conditions of vdd and vdd1.8 refer to table 5 . ldo digital logic 1.2v vdd1.8 (pin#1) ldo1.2 (pin#13) gnd 220 nf external decoupling capacitor 1.8 v supply gnd (pin#12) docid025603 rev 1 31/66 LSM6DB0 microprocessor functionality 66 8.3 reset management the device has an integrated brownout reset (bor) circuit and an integrated power-on reset (por). in the LSM6DB0, the bor threshold is 1.5 v. when v dd is below this threshold, the device is in reset. the bor is always active in the LSM6DB0 at power-on. the por circuit is activated when the ldo has stabilized. the startup time of the LSM6DB0 at power-on is typically 1 ms with the bor active. 8.4 boot mode at startup, the LSM6DB0 boots from a reserved section of the flash memory programmed by st during production. it is used to adjust accurately the oscillator frequencies and contains manufacturing information. any interference with this initialization sequence can degrade the performance of the device. at the end of this sequence, the system boots from the main flash which contains the user?s program. 8.5 clock management figure 15. clock tree 1. same clock supply for both i 2 c microprocessor functionality LSM6DB0 32/66 docid025603 rev 1 the clock management block distributes clocks from various clock sources to the cpu and peripherals. the clock management block is comprised of the following circuitry and switches: ? clock divider: the system contains various clock dividers which allow the frequency of the peripherals and cpu clock sources to be changed. ? glitch-free clock switching: the clock sources can be changed dynamically and securely in active mode. ? clock gating: the peripherals can have their clocks gated off to reduce their power consumption. ? three system clock sources: ? rc80m 80 mhz internal rc oscillator which is trimmed at 1% accuracy with factory settings ? rc32k 32 khz internal rc oscillator which is trimmed at 1% accuracy with factory settings ? extclk external clock up to 80 mhz ? watchdog clock sources: the rc32k or extclk. ? i 2 c clock source: system clock divided by 3. ? uart clock source: system clock divided by a programmable division factor between 1 and 127. ? spi clock source: clock synchronous to the processor. ? dual timers: four timers clocked by 32 khz clock pulses synchronous to the system clock sources and four timers clocked on a clock synchronous to the processor clock. ? clock-out capability: either the 32 khz clock or the output of the divide-by-5 clock can be output on a gpio for external use. docid025603 rev 1 33/66 LSM6DB0 microprocessor functionality 66 8.6 general-purpose inputs/outputs (gpios) the LSM6DB0 contains up to 11 gpio pins each of which can be configured by software as output, as input (either pull-up or pull-down), or as an alternate function in serial mode 0 or serial mode1 (see table 13 ). each of the gpios can also be used as an external interrupt source. 8.7 memories the LSM6DB0 has the following memory features: ? flash memory with 0 wait states at 26.66 mhz and 2 wait states at 80 mhz ? sram with ecc for data and program access (read/write) referred to as ram bank0 ? sram for data and program access (read/write) referred to as ram bank1 ? memory protection: the flash and ram memory banks cannot be read from or written to by the jtag link if the debug features are connected. table 13. alternate function input/output pin name serial mode 0 serial mode 1 gpio mode direction function direction function direction function io0 input/output jtag tms / sw_tdio input uart cts input/output gpio io1 input jtag tck / sw_tck output uart rts io2 input/output i 2 c2_scl uart txd io3 i 2 c2_sda input uart rxd io4 output jtag tdo none io5 input jtag tdi clock input io6 output 16 mhz clock output 32 khz clock io7 input/output i 2 c1_scl input/output spi sclk io8 i 2 c1_sda output spi output io9 input irq input input spi cs io10 spi input microprocessor functionality LSM6DB0 34/66 docid025603 rev 1 8.8 timers and watchdogs the LSM6DB0 includes eight dual timers, one wdg timer, and a systick timer. 8.8.1 dual timer the dual-timer features are listed below. they consist of two identical programmable free- running counters (frcs) that can be configured for 32-bit or 16-bit operations. the frcs operate from a common timer clock which must be synchronous to the cpu clock. ? 16/32-bit down counter ? interrupt generation when the counter reaches zero ? free-running mode: the counter operates continuously and wraps around to its maximum value each time it reaches zero. ? periodic mode: the counter operates continuously by reloading the programmed value each time it reaches zero. ? one-shot mode: the counter decrements to zero and then halts until it is reprogrammed ? the timer clock prescaler factors are 1, 16, or 256 8.8.2 watchdog (wdg) timer the wdg timer is a 32-bit down counter which operates on either the rc32k clock or the extclk clock. it can generate an interrupt and/or a reset when the counter reaches zero. 8.8.3 system tick (systick) timer the systick timer provides a 24-bit clear-on-write, decrementing counter which wraps around when it reaches zero. it operates on the cpu clock. docid025603 rev 1 35/66 LSM6DB0 microprocessor functionality 66 8.9 communication interfaces 8.10 i2c bus the LSM6DB0 provides two i2c interfaces which can operate in master and slave modes. they can support standard mode and fast mode. 8.11 universal asynchronous receiver transmitter (uart) the uart interface (io0, io1, io2, io3 pins) of the LSM6DB0 supports the following maximum baud rates: ? 921600 bps in uart mode ? 460800 bps in infrared data association (irda) mode ? 115200 bps in low-power irda mode the interface supports the irda serial infrared (sir) endec and also provides flow control capabilities through the hardware management of the clear-to-send (cts) and request-to- send (rts) signals. for more details, refer to the arm document ?ddio83g_uart_pl011_trm.pdf?. 8.12 serial peripheral interface (spi) the spi interface operates as a master or slave interface. this interface supports 6 mhz bit rate max in slave mode and 16 mhz bit rate max in master mode due to the limitation of the ios. a programmable clock prescaler inside the spi allows the input clock to be divided by a factor of 2 to 254 in steps of two to provide the serial output clock. the spi interface provides data frames between 4 and 16 bits long. for more details, refer to the arm document ?ddio94c_ssp_pl022_trm.pdf?. microprocessor functionality LSM6DB0 36/66 docid025603 rev 1 8.13 jtag and sw debug support the arm jtag debug port is embedded which enables debug using a standard jtag connection. the arm serial wire debug port is also embedded which enables serial wire debug to be connected to the cpu. the jtag tms and tck pins are shared with the sw_tdio and sw_tck respectively. there are two mechanisms to select the debug mode. jtag debug mode is selected by setting the io9 pin to zero. during reset, the sw debug mode is selected by default. figure 16. debug mode selection timing 1. resetn needs an external pull-up if not driven 1. default option depending on software configuration table 14. debug mode selection por io9 debug mode 0 0 jtag: soc (1) + cpu tap (2) selected 1. soc = chip and processor 2. tap = test access port 0 1 sw: cpu tap (2) selected 1x (3) 3. x = don?t care jtag or sw available a ? v , 2 5 ( 6 ( 7 1 3 2 5 * $ 0 6 & |