Data sheet BMG250 Low noise, low power triaxial gyroscope Bosch Sensortec BMG250 - Data sheet Document revision 1.2 Document release date July 2016 Document number BST-BMG250-DS000-02 Technical reference code(s) 0 273 142 064 Notes Data and descriptions in this document are subject to change without notice. Product photos and pictures are for illustration purposes only and may differ from the real product appearance. BMG250 Data sheet Page 2 BMG250 Low noise, low power triaxial gyroscope The BMG250 is a low noise, low power three axial gyroscope that provides a precise angular rate (gyroscopic) measurement at market leading low power consumption. The BMG250 is a 16 bit digital, triaxial gyroscope sensor. Key features High performance low noise and low offset gyroscope Very low power consumption: typ. 850 A (gyroscope in full operation) Very small 2.5 x 3.0 mm2 footprint, height 0.83 mm Secondary high speed interface for OIS application o Optimized for low latency and high Output Data Rate Parallel use for OIS and standard UI applications o UI Primary Interface (IC) o OIS Secondary Interface (SPI) Built-in power management unit (PMU) for advanced power management Power saving with fast start-up mode of gyroscope Wide power supply range: 1.71V ... 3.6V Allocatable FIFO buffer of 1024 bytes Hardware sensor time-stamps for accurate sensor data fusion Flexible digital interface to connect to host over I2C or SPI Extended I2C mode with clock frequencies up to 1 MHz Typical applications Optical Image Stabilization Electronic Image Stabilization Optical/Electronic Video Stabilization Augmented Reality Indoor navigation 3D scanning / indoor mapping Advanced gesture recognition Immersive gaming 3-axis motion detection, e.g. Air mouse applications and pointers Advanced system power management for mobile applications warranty logging Target Devices Smart phones, tablet and transformer PCs Camera modules for Smartphones Digital Still Cameras / Digital Video Cameras Game controllers, remote controls and pointing devices Head tracking devices Wearable devices, e.g. smart watches or augmented reality glasses Sport and fitness devices Toys, e.g. toy helicopters BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 3 General Description The BMG250 is a three axial gyroscope consisting of a state-of-the-art low power 3-axis gyroscope. It has been designed for low power, high precision multi-axis applications in mobile phones, tablets, wearable devices, remote controls, game controllers, head-mounted devices and toys. The BMG250 is available in a compact 2.5 x 3.0 x 0.83 mm3 LGA package. When the gyroscope is in full operation mode, power consumption is typically 850 A, enabling always-on applications in battery driven devices. The BMG250 offers a wide VDD voltage range from 1.71V to 3.6V and a VDDIO range from 1.2V to 3.6V, allowing the BMG250 to be powered at 1.8V for both VDD and VDDIO. The BMG250 provides high precision sensor data together with the accurate timing of the corresponding data. The timestamps have a resolution of up to 39 s. The integrated 1024 byte FIFO buffer supports low power applications and prevents data loss in non-real-time systems. The intelligent FIFO architecture allows dynamic reallocation of FIFO space. For typical applications, this is sufficient for approx. 1.4s of data capture at an output data rate of 100Hz in FIFO mode with data header. The smart built-in power management unit (PMU) can be configured, for example, to further lower the power consumption by automatically sending the gyroscope temporarily into fast start-up mode and waking it up again by externally triggering this function from the host device's logical unit. Besides the flexible primary interface (I2C or SPI) that is used to connect to the host, BMG250 provides an additional secondary interface. This secondary interface can be used in SPI mode for OIS (optical image stabilization) applications in conjunction with camera modules, or in advanced gaming use cases. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 4 Index of Contents 1. Contents 2. SPECIFICATION.................................................................................................................... 7 2.1 ELECTRICAL SPECIFICATION ................................................................................................ 7 2.2 ELECTRICAL AND PHYSICAL CHARACTERISTICS, MEASUREMENT PERFORMANCE ...................... 8 2.3 ABSOLUTE MAXIMUM RATINGS ........................................................................................... 10 3. FUNCTIONAL DESCRIPTION ............................................................................................. 11 3.1 BLOCK DIAGRAM ............................................................................................................... 11 3.2 POWER MODES ................................................................................................................. 12 3.2.1 SUSPEND MODE ........................................................................................................................... 12 3.2.2 FAST START-UP MODE .................................................................................................................. 12 3.2.3 TRANSITIONS BETWEEN POWER MODES ......................................................................................... 13 3.2.4 PMU (POWER MANAGEMENT UNIT) .............................................................................................. 13 3.3 SENSOR TIMING AND DATA SYNCHRONIZATION ................................................................... 14 3.3.1 SENSOR TIME .............................................................................................................................. 14 3.4 DATA PROCESSING ........................................................................................................... 15 3.4.1 DATA PROCESSING ...................................................................................................................... 15 3.5 FIFO................................................................................................................................ 16 3.5.1 FIFO FRAMES ............................................................................................................................. 16 3.5.2 FIFO CONDITIONS AND DETAILS .................................................................................................... 19 3.6 INTERRUPT CONTROLLER .................................................................................................. 21 3.6.1 DATA READY DETECTION ............................................................................................................. 21 3.6.2 PMU TRIGGER (GYRO) ................................................................................................................ 21 3.6.3 FIFO INTERRUPTS ....................................................................................................................... 21 3.7 DEVICE SELF TEST ............................................................................................................ 22 3.8 OFFSET COMPENSATION ................................................................................................... 23 3.8.1 FAST OFFSET COMPENSATION....................................................................................................... 23 3.8.2 MANUAL OFFSET COMPENSATION .................................................................................................. 23 3.8.3 INLINE CALIBRATION ..................................................................................................................... 23 3.9 NON-VOLATILE MEMORY ................................................................................................... 24 3.10 REGISTER MAP ............................................................................................................... 25 3.10.1 REGISTER (0X00) CHIPID ......................................................................................................... 26 3.10.2 REGISTER (0X02) ERR_REG .................................................................................................... 27 3.10.3 REGISTER (0X03) PMU_STATUS ............................................................................................. 28 3.10.4 REGISTER (0X12-0X17) DATA ................................................................................................... 29 3.10.5 REGISTER (0X18-0X1A) SENSORTIME .................................................................................... 30 3.10.6 REGISTER (0X1B) STATUS ....................................................................................................... 31 3.10.7 REGISTER (0X1D) INT_STATUS_1 ........................................................................................... 31 BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 5 3.10.8 REGISTER (0X20-0X21) TEMPERATURE ................................................................................. 32 3.10.9 REGISTER (0X22-0X23) FIFO_LENGTH ................................................................................... 33 3.10.10 REGISTER (0X24) FIFO_DATA ................................................................................................ 34 3.10.11 REGISTER (0X42) GYR_CONF................................................................................................ 35 3.10.12 REGISTER (0X43) GYR_RANGE ............................................................................................. 36 3.10.13 REGISTER (0X45) FIFO_DOWNS ........................................................................................... 37 3.10.14 REGISTER (0X46-0X47) FIFO_CONFIG .................................................................................. 38 3.10.15 REGISTER (0X51) INT_EN ....................................................................................................... 39 3.10.16 REGISTER (0X53) INT_OUT_CTRL ......................................................................................... 40 3.10.17 REGISTER (0X54) INT_IN_CTRL ............................................................................................. 41 3.10.18 REGISTER (0X56) INT_MAP .................................................................................................... 41 3.10.19 REGISTER (0X6A) CONF ......................................................................................................... 42 3.10.20 REGISTER (0X6B) IF_CONF .................................................................................................... 42 3.10.21 REGISTER (0X6C) PMU_TRIGGER ........................................................................................ 44 3.10.22 REGISTER (0X6D) SELF_TEST ............................................................................................... 45 3.10.23 REGISTER (0X70) NV_CONF .................................................................................................. 46 3.10.24 REGISTER (0X74-0X77) OFFSET ............................................................................................ 47 3.10.25 REGISTER (0X7E) CMD ........................................................................................................... 48 4. DIGITAL INTERFACES ....................................................................................................... 50 4.1 INTERFACE ....................................................................................................................... 50 4.1.1 INTERFACE IC/SPI PROTOCOL SELECTION................................................................................... 51 4.1.2 SPI INTERFACE ............................................................................................................................ 52 4.1.3 IC INTERFACE ............................................................................................................................. 55 4.1.4 SPI AND IC ACCESS RESTRICTIONS ............................................................................................ 59 5. PIN-OUT AND CONNECTION DIAGRAMS ......................................................................... 61 5.1 PIN-OUT BMG250 ............................................................................................................ 61 5.2 CONNECTION DIAGRAMS ................................................................................................... 62 5.2.1 I2C INTERFACE ............................................................................................................................. 62 5.2.2 SPI 3-WIRE INTERFACE ................................................................................................................ 62 5.2.3 SPI 4-WIRE INTERFACE ................................................................................................................ 63 6. PACKAGE ........................................................................................................................... 65 6.1 OUTLINE DIMENSIONS ....................................................................................................... 65 6.2 SENSING AXES ORIENTATION ............................................................................................. 66 6.3 LANDING PATTERN RECOMMENDATION ............................................................................... 67 6.4 MARKING.......................................................................................................................... 68 6.4.1 MASS PRODUCTION MARKING........................................................................................................ 68 6.4.2 ENGINEERING SAMPLES ................................................................................................................ 68 6.5 SOLDERING GUIDELINES .................................................................................................... 69 6.6 HANDLING INSTRUCTIONS .................................................................................................. 70 6.7 TAPE AND REEL SPECIFICATION ......................................................................................... 71 6.7.1 ORIENTATION WITHIN THE REEL..................................................................................................... 71 6.8 ENVIRONMENTAL SAFETY .................................................................................................. 72 6.8.1 HALOGEN CONTENT ..................................................................................................................... 72 BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 6 6.8.2 MULTIPLE SOURCING .................................................................................................................... 72 7. LEGAL DISCLAIMER .......................................................................................................... 73 7.1 ENGINEERING SAMPLES .................................................................................................... 73 7.2 PRODUCT USE .................................................................................................................. 73 7.3 APPLICATION EXAMPLES AND HINTS ................................................................................... 73 8. DOCUMENT HISTORY AND MODIFICATIONS .................................................................. 74 BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 7 2. Specification If not stated otherwise, the given values are over lifetime and full performance temperature and voltage ranges, minimum/maximum values are 3. 2.1 Electrical specification VDD and VDDIO can be ramped in arbitrary order without causing the device to consume significant currents. The values of the voltage at VDD and the VDDIO pins can be chosen arbitrarily within their respective limits. The device only operates within specifications if the both voltages at VDD and VDDIO pins are within the specified range. The voltage levels at the digital input pins must not fall below GNDIO-0.3V or go above VDDIO+0.3V to prevent excessive current flowing into the respective input pin. BMG250 contains a brownout detector, which ensures integrity of data in the non-volatile memory under all operating conditions. Table 1: Electrical parameter specification Parameter Supply Voltage Internal Domains Supply Voltage I/O Domain Voltage Input Low Level Voltage Input High Level Symbol Max Unit 1.71 3.0 3.6 V VDDIO 1.2 2.4 3.6 V 0.3VDDIO - VIL,a SPI VIH,a SPI VOL,a Voltage Output High Level VOH,a Current consumption Typ VDD Voltage Output Low Level Operating Temperature NVM write-cycles OPERATING CONDITIONS BMG250 Condition Min IDD BST-BMG250-DS000-02 | Revision 1.2 | July 2016 - VDDIO=1.62V, IOL=3mA, SPI 0.2VDDIO - VDDIO=1.2V, IOL=3mA, SPI 0.23VDDIO - VDDIO=1.62V, IOH=3mA, SPI 0.8VDDIO - VDDIO=1.2V, IOH=3mA, SPI 0.62VDDIO - TA nNVM 0.7VDDIO -40 Non-volatile memory Gyro in fast start-up, TA=25C Gyro full operation mode TA=25C Gyro in suspend mode, TA=25C +85 14 C Cycles 500 850 A 3 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 8 2.2 Electrical and physical characteristics, measurement performance Table 3: Electrical characteristics gyroscope OPERATING CONDITIONS GYROSCOPE Parameter Symbol Condition Min RFS125 Range (Secondary interface) Max Unit 125 /s 250 /s 500 /s RFS1000 1,000 /s RFS2000 2,000 /s /s RFS250 Range Typ RFS500 Selectable via serial digital interface RFSOIS Fixed range setting 2,000 tG,su Suspend to normal mode ODRG=1600Hz 55 80 ms tG,FS Fast start-up to normal mode 10 15 ms Start-up time OUTPUT SIGNAL GYROSCOPE Sensitivity Sensitivity change over temperature Nonlinearity RFSOIS Ta=25C 16.4 LSB//s RFS2000 Ta=25C 16.4 LSB//s RFS1000 Ta=25C 32.8 LSB//s RFS500 Ta=25C 65.6 LSB//s RFS250 Ta=25C 131.2 LSB//s RFS125 Ta=25C 262.4 LSB//s TCSG RFS2000, Nominal VDD supplies best fit straight line 0.02 %/K NLG Best fit straight line RFS1000, RFS2000 0.1 %FS g- Sensitivity Zero-rate offset Off x y and z Zero-Rate offset Over temperature Off x, oT y, oT and z,oT Zero-rate offset change over temperature TCOG BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Sensitivity to acceleration stimuli in all three axis (frequency <20kHz) T =25C, A 0.1 /s/g fast offset compensation off 3 /s -40C T +85C 3 /s 0.05 /s/K A -40C T +85C, A best fit straight line Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet nG,nD @10 Hz 0.007 /s/ Hz nG,rms Filter setting 74.6Hz, ODR 200 Hz 0.07 /s rms 10 /h Output Noise Bias stability Output Data Rate (set of x,y,z rate) Output Data Rate (set of x,y,z rate) Output Data rate accuracy (set of x,y,z rate) Cross Axis Sensitivity Page 9 BSG ODRG 25 3200 Hz ODROIS Fixed setting 6400 Hz AODRG Over whole operating temperature range 1 % XG,S Sensitivity to stimuli in non-sense-direction 2 % Table 4: Electrical characteristics temperature sensor OPERATING CONDITIONS AND OUTPUT SIGNAL OF TEMPERATURE SENSOR Parameter Symbol Temperature Sensor Measurement Range TS Condition Min Typ -40 Max Unit 85 C Temperature Sensor Slope dTS 0.002 K/LSB Temperature Sensor Offset OTS 2 K Output Data Rate ODRT gyro in fast start-up 0.8 Hz Gyro active 100 Hz Resolution nT gyro in fast start-up 8 bit Gyro active 16 Bit BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 10 2.3 Absolute maximum ratings Table 5: Absolute maximum ratings Parameter Condition Min Max Units VDD Pin -0.3 4.25 V VDDIO Pin -0.3 4.25 V Voltage at any Logic Pin Non-Supply Pin -0.3 VDDIO+0.3 V Passive Storage Temp. Range 65% rel. H. -50 +150 C None-volatile memory (NVM) Data Retention T = 85C, after 15 cycles 10 Voltage at Supply Pin Mechanical Shock ESD y Duration 200 s, half sine 10,000 g Duration 1.0 ms, half sine 2,000 g Free fall onto hard surfaces 1.8 m HBM, at any Pin 2 kV CDM 500 V MM 200 V Note: Stress above these limits may cause damage to the device. Exceeding the specified electrical limits may affect the device reliability or cause malfunction. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 11 3. Functional Description 3.1 Block diagram The figure below depicts the dataflow in BMG250: SENSORTIME select Gyro SENSOR DATA AND SENSORTIME REGISTER SPI / I2C DIGITAL SIGNAL CONDITIONING ADC FIFO ENGINE GYRO PREFILTERED DATA INTERRUPT ENGINE INT1, INT2 PRIMARY DIGITAL INTERFACE RAW DATA INTERRUPTS SECONDARY DIGITAL INTERFACE CONFIGURABLE AS: GYRO OIS (SPI SLAVE) OIS Controller (SPI) Figure 1: Block diagram of data flow The pre-filtered input data may be already temperature compensated or other low level correction operations may be applied to them. The data from the sensor are always sampled with a data rate of 6400 Hz. The data are low pass filtered at an output data rate as configured in the Register (0x42) GYR_CONF. In addition further down sampling for the interrupt engines and the FIFO is possible and configured in the Register (0x45) FIFO_DOWNS. This down sampling discards data frames. The sensor time is synchronized with the update of the data register. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 12 3.2 Power modes By default the BMG250 is in suspend mode after powering up the device. From there, the device will start-up to normal mode within 50ms typically. Alternatively, the device may be also held in Fast Start-up mode. The device is powering up from Fast Start-up mode in less than 10ms. Three power modes are supported: Gyroscope Normal mode: full chip operation Suspend mode: No sampling takes place, all data is retained, and delays between subsequent I2C operations are allowed. FIFO data readout is not supported in suspend mode. Fast start-up mode: start-up delay time to normal mode 10 ms. FIFO data readout is supported in fast start-up mode, although the data will only be generated during normal mode. This means data generated in normal mode can be read after the BMG250 has been switched to fast start-up mode. After the end of valid data is reached only values of 0x8000 can be read, which should be interpreted as "FIFO empty". If the measured rate would be 0x8000 in reality, a 0x8001 is generated. Table 6: Power modes of BMG250 full operation mode Normal mode Sleep modes Fast Start-up mode Suspend mode Suspend and fast start-up modes are sleep modes. Switching between normal and fast start-up mode will stop sampling of data. No valid data can be sampled in fast start-up mode. However, previously collected data in normal mode can still be read. The system can be switched from fast start-up mode to normal mode within 10ms to again sample data. 3.2.1 Suspend mode In suspend mode, the MEMS sensor is powered off but the digital circuitry is still active. Note: When the sensor is in suspend or fast start-up mode, burst writes are not supported, normal writes need wait times after the write command is issued (~400 s), and burst reads are not supported on Register (0x24) FIFO_DATA. 3.2.2 Fast start-up mode In fast start-up mode the sensing analog part is powered down, while the drive and the digital part remains largely operational. No data acquisition is performed. The latest rate data and the content of all configuration registers are kept. The fast start-up mode allows a fast transition (10 ms) into normal mode while keeping power consumption significantly lower than in normal mode. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 13 3.2.3 Transitions between power modes With regard to the below diagram, transitions are allowed between any power mode. Table 7: Typical total current consumption in A according to the gyroscope's modes Gyroscope Mode Suspend Current consumption in A 3 Fast Start-up 500 Normal 850 The power mode setting can be configured independently from the output data rate set. The main difference between normal and Fast Start-up mode is the power consumption which is in the Fast Start-up mode determined by the drive circuitry and the IO communication. 3.2.4 PMU (Power Management Unit) The integrated PMU (Power Management Unit) allows advanced power management features by combining power management features of the sensor and externally available wake-up devices. See chapter 3.6.2 PMU Trigger (Gyro). 3.2.4.1 Automatic gyroscope power mode changes To further lower the power consumption, the gyroscope may be configured to be temporarily put into sleep mode, which is in BMG250 configurable as suspend or fast-start-up mode. To configure this feature Register (0x6C) PMU_TRIGGER is used. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 14 3.3 Sensor Timing and Data synchronization 3.3.1 Sensor Time The Register (0x18-0x1A) SENSORTIME is a free running counter, which increments with a resolution of 39 s. All sensor events e.g. updates of data registers are synchronous to this register as defined in the table below. With every update of the data register or the FIFO, a bit m in the Register (0x18-0x1A) SENSORTIME toggles where m depends on the output data rate for the data register and the output data rate and the FIFO down sampling rate for the FIFO. The table below shows which bit toggles for which update rate of data register and FIFO. The time stamps in Register (0x18-0x1A) SENSORTIME are available independent of the power mode the device is in. Table 11: Sensor time Bit m in sensor_time 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Resolution [ms] 0.039 0.078 0.156 0.3125 0.625 1.25 2.5 5 10 20 40 80 160 320 640 1280 2560 5120 10240 20480 40960 81920 163840 327680 Update rate [Hz] 25641 12820 6400 3200 1600 800 400 200 100 50 25 12.5 6.25 3.125 1.56 0.78 0.39 0.20 0.10 0.049 0.024 0.012 0.0061 0.0031 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 15 3.4 Data Processing The digital filter can be configured through the parameters: gyr_bwp and gyr_odr. There is no undersampling parameter for the gyroscope. Note: Illegal settings in configuration registers will result in an error code in the Register (0x02) ERR_REG. The content of the data register is undefined, and if the FIFO is used, it may contain no value. 3.4.1 Data Processing The gyroscope data can only be processed in normal power mode. There are three data processing modes defined by gyr_bwp. Normal mode, OSR2, OSR4. For details see chapter 3.4.1.1. 3.4.1.1 Gyroscope data processing for normal power mode When the filter mode is set to normal (gyr_bwp=0b010), the gyroscope data is sampled at equidistant points in the time, defined by the gyroscope output data rate parameter (gyr_odr). The output data rate can be configured in one of eight different valid ODR configurations going from 25Hz up to 3200Hz. Note: Lower ODR values than 25Hz are not allowed. If they are used they result in an error code in Register (0x02) ERR_REG. The filter bandwidth as configured by gyr-odr shows a 3db cutoff frequency shown in the following table: Gyroscope ODR [Hz] 25 3dB Cutoff frequency [Hz] 10.7 50 20.8 100 39.9 200 74.6 400 136.6 800 254.6 1600 523.9 3200 890 When the filter mode is set to OSR2 (gyr_bwp=0b001), both stages of the digital filter are used and the data is oversampled with an oversampling rate of 2. That means that for a certain filter configuration, the ODR has to be 2 times higher than in the normal filter mode. Conversely, for a certain filter configuration, the filter bandwidth will be the approximately half of the bandwidth achieved for the same ODR in the normal filter mode. For example, for ODR=50Hz we will have a 3dB cutoff frequency of 10.7Hz. When the filter mode is set to OSR4 (gyr_bwp=0b000), both stages of the digital filter are used and the data is oversampled with an oversampling rate of 4. That means that for a certain filter configuration, the ODR has to be 4 times higher than in the normal filter mode. Conversely, for a certain filter configuration, the filter bandwidth will be approximately 4 times smaller than the bandwidth achieved for the same ODR in the normal filter mode. For example, for ODR=100Hz we will have a 3dB cutoff frequency of 10.7Hz. There is no undersampling mode for the gyroscope data processing. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 16 3.5 FIFO A FIFO is integrated in BMG250 to support low power applications and prevent data loss in nonreal-time systems. The FIFO has a size of 1024 bytes. The FIFO architecture supports to dynamically allocate FIFO space. For typical applications, this is sufficient for approx. 1.4s of data capture (ODR=100Hz). If a lower ODR is used, the FIFO size will be sufficient for capturing data longer, increasing ODR will reduce available capturing time. The FIFO features a FIFO full and watermark interrupt. Details can be found in chapter 3.6.3. A schematic of the data path when the FIFO is used is shown in the figure below. Select Sensortime Sensor ADC FIFO engi ne Digital Signal Conditioning FIFO configuration Ext Interrupts FIFO full/ water-level INT FIFO frames from FIFO_DATA register Figure 3: Block diagram of FIFO data path 3.5.1 FIFO Frames When using the FIFO, the stored data can be read out by performing a burst read on the register (0x24) FIFO_DATA. The data is stored in units called frames. 3.5.1.1 Frame rates The frame rate for the FIFO is defined by the maximum output data rate of the sensor via the Register (0x46-0x47) FIFO_CONFIG. If pre-filtered data are selected in Register (0x45) FIFO_DOWNS, a data rate of 6400 Hz is used. The frame rate can be reduced further via downsampling (Register (0x45) FIFO_DOWNS). This can be done independently for each sensor. Downsampling just drops sensor data; no data processing or filtering is performed. 3.5.1.2 Frame format When using the FIFO, the stored data can be read out by performing a burst read on the register (0x24) FIFO_DATA. The data will be stored in frames. The frame format is configurable. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 17 The FIFO can be configured to store data in either header mode or in headerless mode (see figure below). The headerless mode is usually used when the structure of data does not change during data acquisition. In this case, the number of storable frames can be maximized. In contrast, the header mode is intended for situations where flexibility in the data structure is required, e.g. when the sensor runs at different ODRs or when switching the sensor on or off during operation. Headerless mode (only data) Regular frames FIFO Frame Format Configuration Regular frames Header mode (header+data) Skip frame Control frames Sensortime frame FIFO Input Config frame Figure 4: FIFO frame configurations In headerless mode no header byte is used and the frames consist only of data bytes. The data bytes will always be sensor data. This mode has the advantage of an easy frame format and an optimized usage of the 1024 bytes of FIFO storage. It can be selected by disabling fifo_header in Register (0x46-0x47) FIFO_CONFIG. In case of overreading the FIFO, non-valid frames always contain the fixed expression (magic number) 0x80 in the data frame. In header mode every frame consists of a header byte followed by one or more data bytes. The header defines the frame type and contains parameters for the frame. The data bytes may be sensor data or control data. Header mode supports different ODRs for the gyroscope data and external interrupt flags. It is activated by enabling fifo_header in Register (0x46-0x47) FIFO_CONFIG. 3.5.1.3 Header byte format The header format is shown below: Bit Content 7 fh_mode 6 5 fh_parm<3:2> 4 Bit Read/Write 3 fh_parm<1:0> 2 1 fh_ext 0 BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 18 The fh_mode, fh_opt and fh_ext fields are defined as fh_mode<1:0> 0b10 Definition Regular fh_parm <3:0> Frame content 0b01 0b00 0b11 Control Reserved Reserved Control Opcode Na Na fh_ext<1:0> Tag of INT2 and INT1 f_parm=0b0000 is invalid for regular mode, a header of 0x80 indicates an uninitialized frame. 3.5.1.4 Data bytes Format When the FIFO is set to "headerless mode", only sensor data will be saved into the FIFO (in the same order as in the data register). External interrupt tags are not supported in headerless mode. When the FIFO is set to "header mode", the data byte format is different depending on the type of frame. There are two basic frame types, control frames and regular data frames. Each different type of control frame has its own data byte format. It can contain skipped frames, sensortime data or FIFO configuration information as explained in the following chapters. If the frame type is a regular frame (sensor data), the data byte section of the frame depend on how the data is being transmitted in this frame (as specified in the header byte section). The data byte part for regular data frames is identical to the format defined for the Register (0x120x17) DATA. Control frame (fh_mode=0b01): Control frames, which are only available in header mode, are used for special or exceptional information. All control frames contribute to the fifo_byte _counter in Register (0x22-0x23) FIFO_LENGTH. In detail, there are three types of control frame, which can be distinguished by the fh_parm field: Skip frame (fh_parm=0b000): In case of a FIFO overflow, a skip frame is prepended to the FIFO content when the next readout is performed. A skip frame indicates the number of skipped frames since the last readout. In the header byte of a skip frame, fh_mode equals 0b01 (since it is a control frame) and the fh_param equals 0b000 (indicating skip frame). The data byte part of a skip frame consists of one byte and contains the number of skipped frames. When more than 0xFF frames have been skipped, 0xFF is returned. Sensortime frame (fh_parm=0b001): If the sensortime frame functionality is activated (see description of Register (0x46-0x47) FIFO_CONFIG) and the FIFO is overread, the last data frame is followed by a sensortime frame. This frame contains the BMG250 timestamp content corresponding to the time at which the last data frame was read. In the header byte of a sensortime frame, fh_mode = 0b01 (since is a control frame) and fh_param = 0b001 (indicating sensortime frame). The data byte part of a sensortime frame BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 19 consists of 3 bytes and contains the 24-bit sensortime. A sensortime frame does not consume memory in the FIFO. FIFO_input_config frame (fh_parm=0b010): Whenever the configuration of the FIFO input data sources changes, a FIFO input config frame is inserted into the FIFO in front of the data to which the configuration change is applied. In the header byte of a config frame, fh_mode = 0b01 (since it is a control frame) and fh_param = 0b010 (indicating FIFO_input_config frame). The data byte part of a FIFO_Input_Config Frame consists of one byte and contains data corresponding to the following table: Bit Content 7 Bit Read/Write gyr_range_ch: gyr_conf_ch: 3 gyr_range_ch 6 5 reserved 2 gyr_conf_ch 1 4 0 reserved A change in Register (0x43) GYR_RANGE becomes active. A change in Register (0x42) GYR_CONF or gyr_fifo_filt_data or gyr_fifo_downsampling in Register (0x45) FIFO_DOWNS becomes active. 3.5.2 FIFO conditions and details 3.5.2.1 Overflows In the case of overflows the FIFO will overwrite the oldest data. A skip frame will be prepended at the next FIFO readout if the available FIFO space falls below the maximum size frame. 3.5.2.2 Overreads If more data bytes are read from the FIFO than valid data bytes are available, `0x80' is returned. Since a header `0x80' indicates an invalid frame, the SW can recognize the end of valid data. After the invalid header the data is undefined. This is valid in both headerless and header mode. In addition, if header mode and the sensortime frame are enabled, the last data frame is followed by a sensortime frame. After this frame, a 0x80 header will be returned that indicates the end of valid data. 3.5.2.3 Partial frame reads When a frame is only partially read through, it will be repeated within the next reading operation (including the header). 3.5.2.4 FIFO synchronization with external events External events can be synchronized with the FIFO data by connecting the event source to one of the BMG250 interrupt pins (which needs to be configured as an input interrupt pin). External events can be generated e.g. by a camera module. Each frame contains the value of the interrupt input pin at the time of the external event. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 20 The fh_ext<1:0> field is set when an external interrupt is triggered. External interrupt tags are configured using int_output_en in Register (0x53) INT_OUT_CTRL. 3.5.2.5 FIFO Reset A reset of the BMG250 is triggered by writing the opcode 0xB0 "fifo_flush" to the Register (0x7E) CMD. This will clear all data in the FIFO while keeping the FIFO settings unchanged. Automatic resets are only done in two exceptional cases where the data would not be usable without a reset: a sensor is enabled or disabled in headerless mode, or a transition between headerless and header mode occurred. 3.5.2.6 Error Handling In case of a configuration error in Register (0x46-0x47) FIFO_CONFIG, no data will be written into the FIFO and the error is reported in Register (0x02) ERR_REG. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 21 3.6 Interrupt Controller There are 2 interrupt output pins, to which 3 different interrupt signals can be mapped independently via user programmable parameters. Available interrupts in normal mode are: Data ready ("new-data") for synchronizing sensor data read-out with the MCU / host controller FIFO full / FIFO watermark allows FIFO fill level and overflow handling. All Interrupts are available only in normal (low-noise) mode, but not in suspend mode. Input Interrupt Pins: For special applications (e.g. PMU Trigger, FIFO Tag) interrupt pins can be configured as input pins. For all other cases (standard interrupts), the pin must be configured as an output. Note: The direction of the interrupt pins is controlled with int_output_en and int_x_input_en in Register (0x53) INT_OUT_CTRL and Register (0x54) INT_IN_CTRL. If both are enabled, the input (e.g. marking fifo) is driven by the interrupt output. 3.6.1 Data Ready Detection This interrupt is enabled whenever a new data sample is complete. This allows a low latency data readout. The data update detection monitors the data_update signals for all axes. It generates an interrupt as soon as the values for all axes which are required for the configured output data rates have been updated. The interrupt is cleared automatically when the update for the next sample starts or the data is read out from the data register. 3.6.2 PMU Trigger (Gyro) Whenever a PMU (power management unit) trigger (either wakeup or sleep) is issued, wakeup_int in Register (0x6C) PMU_TRIGGER configures if an interrupt is send to the application processor. If the AP wants to trigger sleeps itself for the gyro, the gyr_wakeup_trigger is configured accordingly and no wakeup triggers are issued. 3.6.3 FIFO Interrupts The FIFO supports two interrupts, a FIFO full interrupt and a watermark interrupt. The FIFO full interrupt is issued when the FIFO is full and the next full data sample would cause a FIFO overflow, which may lead to samples being deleted. Technically, that means that a FIFO full interrupt is issued, whenever less space than two maximum size frames is left in the FIFO. The FIFO watermark interrupt is fired, when the FIFO fill level in fifo_byte_counter in Register (0x220x23) FIFO_LENGTH is above a pre-configured watermark, defined in fifo_watermark in Register (0x46-0x47) FIFO_CONFIG. Note: The unit of fifo_watermark is 4 bytes whereas the unit of fifo_byte_counter is single bytes. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 22 3.7 Device self test This feature permits to check the sensor functionality via a built-in self-test (BIST). The BIST can be triggered during normal operation mode. It checks the sensors drive amplitude, its frequency and the stability of the drive control loop. Hence, disturbances of the movement by particles, mechanical damage or pressure loss can be detected. The self-test for the gyroscope will be started by writing a `1' to gyr_self_test_enable in Register (0x6D) SELF_TEST. The result will be in gyr_self_test_ok in Register (0x1B) STATUS. In addition, any particles or damages can be easily identified in a Manual Performance Check". Due to the outstanding offset and noise performance the measured values at zero-rate fit the specified performance. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 23 3.8 Offset Compensation BMG250 offers fast and manual compensation as well as inline calibration. Fast offset compensation is performed with pre-filtered data, and the offset is then applied to both, pre-filtered and filtered data. If necessary the result of this computation is saturated to prevent any overflow errors (the smallest or biggest possible value is set, depending on the sign). The public offset compensation Register (0x74-0x77) OFFSET are images of the corresponding registers in the NVM. With each image update the contents of the NVM registers are written to the public registers. The public registers can be overwritten by the user at any time. Offset compensation needs to be enabled through gyr_off_en (Register 0x77). 3.8.1 Fast offset compensation Fast offset compensation (FOC) is a one-shot process that compensates offset errors by setting the offset compensation registers to the negated offset error. This is best suited for "end-of-line trimming" with the customers device positioned in a well-defined orientation. The Gyroscope target value is always 0 dps at rest. FOC is triggered by issuing a start_foc command to Register (0x7E) CMD. Once triggered, the status of the fast correction process is reflected in the status bit foc_rdy in Register (0x1B) STATUS. foc_rdy is `0' while the measurement is in progress. Preset filter settings apply. This will take a maximum time of 250 ms. The negated measured values are written to Register (0x74-0x77) OFFSET automatically (overwriting previous offset register values), cancelling out offset errors. Fast compensation can only be used in normal mode. The fast offset compensation does not automatically clear the data ready bit in Register (0x1B) STATUS. It is recommended to read the Register (0x12-0x17) DATA after FOC completes, to remove a stall data ready bit from before the FOC. In this way the data ready bit can be made functional again to indicate that the next sample is available for reading, while using data from the FOC mechanism. 3.8.2 Manual offset compensation The contents of the public compensation Register (0x74-0x77) OFFSET may be set manually via the digital interface. After modifying the Register (0x74-0x77) OFFSET the next data sample is not valid. Writing to the offset compensation registers is not allowed while the fast compensation procedure is running. 3.8.3 Inline calibration For certain applications, it is often desirable to calibrate the offset once and to store the compensation values permanently. This can be achieved by using fast or manual offset compensation to determine the proper compensation values and then storing these values permanently in the NVM. Each time the device is reset, the compensation values are loaded from the non-volatile memory into the image registers and used for offset compensation. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 24 3.9 Non-Volatile Memory The memory of the BMG250 consists of volatile and non-volatile registers. Part of it can be both read and written by the user. Access to non-volatile memory is only possible through (volatile) image registers. A maximum number of write cycles to non-volatile memory of equal or less than 14 is supported. The Register (0x70) NV_CONF and Register (0x74-0x77) OFFSET have NVM backups which are accessible by the user. The content of the NVM is loaded to the image registers after a reset (either POR or softreset). As long as the image update is in progress, bit nvm_rdy in Register (0x1B) STATUS is 0, otherwise it is 1. The image registers can be read and written like any other register. Writing to the NVM is a four-step procedure: Write "0x11" into CMD (0x7E) register to make sensor enter NORMAL power state. Write the new contents to the image registers. Write 1 to bit nvm_prog_en in the Register (0x6A) CONF register in order to unlock the NVM. Write prog_nvm (0xA0) to the Register (0x7E) CMD to trigger the write process. Writing to the NVM always renews the entire NVM contents. It is possible to check the write status by reading bit nvm_rdy. While nvm_rdy = 0, the write process is still in progress; if nvm_rdy = 1, then writing is completed. As long as the write process is ongoing, no change of power mode and image registers is allowed. After nvm_rdy turns to be 1, user can optionally write "0x10" into CMD (0x7E) register to switch power status back into suspend mode, if needed. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 25 3.10 Register Map This chapter contains register definitions. REG[x] denotes bit y in byte x in register REG. Val(Name) is the value contained in the register interpreted as non-negative binary number. When writing to reserved bits, `0' should be written when not stated different. read/write Register Address Register Name 0x007D 0x0078 0x0077 0x0076 0x0075 0x0074 0x0073 0x0071 0x0070 - 0x006F 0x006E 0x006D 0x006C 0x006B 0x006A 0x0069 0x0057 0x0056 0x0055 0x0054 0x0053 0x0052 0x0051 0x0050 0x0048 0x0047 0x0046 0x0045 0x0044 0x0043 0x0042 0x0041 0x0025 0x0024 0x0023 0x0022 0x0021 0x0020 0x001F 0x001E 0x001D 0x001C 0x001B 0x001A 0x0019 0x0018 0x0017 0x0016 0x0015 0x0014 0x0013 0x0012 0x0011 0x0004 0x0003 0x0002 0x0001 0x0000 OFFSET_6 OFFSET_5 OFFSET_4 OFFSET_3 NV_CONF SELF_TEST PMU_TRIGGER IF_CONF CONF INT_MAP_1 INT_LATCH INT_OUT_CTRL INT_EN_1 FIFO_CONFIG_1 FIFO_CONFIG_0 FIFO_DOWNS GYR_RANGE GYR_CONF FIFO_DATA FIFO_LENGTH_1 FIFO_LENGTH_0 TEMPERATURE_1 TEMPERATURE_0 INT_STATUS_1 STATUS SENSORTIME_2 SENSORTIME_1 SENSORTIME_0 DATA_19 DATA_18 DATA_17 DATA_16 DATA_15 DATA_14 PMU_STATUS ERR_REG CHIP_ID read only Defaul t Value 0x00 0x00 0x00 0x00 0x00 0x00 0x10 0x00 0x00 0x00 0x00 0x00 0x00 0x10 0x80 0x88 0x00 0x28 0x00 0x00 0x00 0x80 0x00 0x00 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xD5 bit7 write only bit6 bit5 bit4 reserved bit3 bit2 bit1 bit0 reserved reserved gyr_off_en reserved off_gyr_z_9_8 off_gyr_y_9_8 off_gyr_x_9_8 off_gyr_z_7_0 off_gyr_y_7_0 off_gyr_x_7_0 reserved reserved reserved i2c_wdt_e n i2c_wdt_sel spi_en reserved reserved gyr_self_test_start reserved gyr_sleep_state reserved reserved int1_drdy reserved int1_fwm reserved if_mode reserved int1_ffull int2_output_en reserved int2_od int2_input_en int2_lvl reserved int_fwm_en int_ffull_en fifo_gyr_en reserved reserved reserved reserved gyr_wakeup_trigg er reserved reserved int2_drdy reserved int1_input_en int2_edge_ctrl int1_output_en reserved int_drdy_en reserved reserved fifo_header_en fifo_tag_int1_e fifo_water_markn gyr_fifo_filt_dat a reserved reserved gyr_bwp reserved reserved reserved gyr_sleep_trigger spi3 nvm_prog_en reserved int2_fwm int1_od int2_ffull reserved int1_lvl reserved int1_edge_ctrl reserved fifo_tag_int2 _en fifo_time_en fifo_stop_on_full gyr_fifo_downs gyr_range gyr_odr reserved reserved fifo_data reserved reserved fwm_int reserved drdy_gyr reserved drop_cmd_e reserved rr BST-BMG250-DS000-02 | Revision 1.2 | July 2016 fifo_byte_counter_10_8 fifo_byte_counter_7_0 temperature_15_8 temperature_7_0 reserved reserved ffull_int drdy_int reserved reserved gyr_self_test_ok reserved nvm_rdy foc_rdy reserved reserved sensor_time_23_16 sensor_time_15_8 sensor_time_7_0 gyr_z_15_8 gyr_z_7_0 gyr_y_15_8 gyr_y_7_0 gyr_x_15_8 gyr_x_7_0 reserved reserved tmp_pmu_status gyr_pmu_status reserved reserved err_code fatal_err reserved chip_id Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 26 3.10.1 Register (0x00) CHIPID ADDRESS 0x00 RESET 0xD5 MODE R DESCRIPTION The register contains the chip identification code. DEFINITION Name Bit Read/Write Reset Value Content 7 R 1 chip_id<7:4> Bit Read/Write Reset Value Content 3 R 0 chip_id<3:0> BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Register (0x00) CHIPID 6 5 R R 1 0 4 R 1 2 R 1 0 R 1 1 R 0 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 27 3.10.2 Register (0x02) ERR_REG ADDRESS 0x02 RESET 0b00000000 MODE RW DESCRIPTION Reports sensor error flags. Flags are reset when read. DEFINITION Bit 7 6 5 4:1 0 Acronym Reserved drop_cmd_err Reserved error_code fatal_err Definition Dropped command to Register 0000: no error 0001: reserved 0010: gyr conf error 0010-1111: reserved The first reported error will be shown in the error code. Chip not operable. The only way to clear the flag is a POR or soft-reset. The register is meant for debug purposes, not for regular verification if an operation completed successfully. Error flags (bits 4:1) store error event until they are reset by reading the register. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 28 3.10.3 Register (0x03) PMU_STATUS ADDRESS 0x03 RESET 0b0000-0000 MODE R DESCRIPTION Shows the current power mode of the sensor. DEFINITION Name Bit Read/Write Reset Value Content 7 R 0 reserved Bit 3 Read/Write R Reset Value 0 Content gyr_pmu_status Register (0x03) PMU_STATUS 6 5 R R 0 0 4 R 0 2 R 0 0 R 0 gyr_pmu_status 0b00 0b01 0b10 0b11 1 R 0 reserved Gyro Mode Suspend Normal Reserved Fast Start-Up The register reflects the current power modes of all sensor configured as soon as they are effective. If a sensor is enabled, the new sensor mode is reported as soon as the MEMS is up and before digital filters have settled. The settling time depends on filter settings. The power modes may be changed through the Register (0x7E) CMD. In addition, for the gyroscope through register events may be defined, which change the gyro power mode. In suspend mode the FIFO is not accessible. For read outs of the FIFO the sensor has to be set to normal mode, after read-out the sensor can be set back suspend or fast start-up mode. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 29 3.10.4 Register (0x12-0x17) DATA ADDRESS 0x12 (6 bytes) RESET (BYTEWISE) 0b0000-0000 MODE R DESCRIPTION Register for gyroscope data. DATA[0-5] are treated as atomic update unit with respect to an IC/SPI operation. A read operation on the Register (0x12-0x17) DATA resets the appropriate *_drdy bits in Register (0x1B) STATUS. E.g. when only [0] is read, only drdy_gyr is reset. DEFINITION DATA[0-5] contains the latest data for the gyroscope GYR_[X-Z]. If the secondary interface (OIS interface, working in SPI protocol) is connected, the OIS data are accessible through Register (0x012-0x17) for OIS_DATA_[X/Y/Z]_[0/1]. DATA[X] X=0 X=1 X=2 X=3 X=4 X=5 Acronym GYR_X<7:0> (LSB) GYR_X<15:8> (MSB) GYR_Y<7:0> (LSB) GYR_Y<15:8> (MSB) GYR_Z<7:0> (LSB) GYR_Z<15:8> (MSB) OIS_DATA[AXIS]_[MSB] AXIS = X, MSB = 0 AXIS = X, MSB = 1 AXIS = Y, MSB = 0 AXIS = Y, MSB = 1 AXIS = Z, MSB = 0 AXIS = Z, MSB = 1 Acronym OIS_DATA_X<7:0> (LSB) OIS_DATA _X<15:8> (MSB) OIS_DATA _Y<7:0> (LSB) OIS_DATA _Y<15:8> (MSB) OIS_DATA _Z<7:0> (LSB) OIS_DATA _Z<15:8> (MSB) BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 30 3.10.5 Register (0x18-0x1A) SENSORTIME ADDRESS 0x18 (3 byte) RESET 0x00_0000 MODE R DESCRIPTION Sensortime is a 24 bit counter available in suspend, low power, and normal mode. The value of the register is shadowed when it is read in a burst read with the data register at the beginning of the operation and the shadowed value is returned. When the FIFO is read the register is shadowed whenever a new frame is read. DEFINITION The sensortime increments with 39 s. The accuracy of the counter is the same as for the output data rate as described in section 2.2. The sensortime is unique for approx. 10 min and 54 seconds. I.e. the register value starts at 0x000000 and wraps after 0xFFFFFF has been reached. Name Bit Read/Write Reset Value Content 7 W 0 sensor_time<7:4> Bit Read/Write Reset Value Content 3 R/W 0 sensor_time<3:0> Name Bit Read/Write Reset Value Content Register (0x18-0x1A) SENSORTIME [1] 7 6 5 4 W R/W R/W R/W 0 0 0 0 sensor_time<15:11> Bit Read/Write Reset Value Content 3 2 R/W R/W 0 0 sensor_time<10:8> Name Bit Read/Write Reset Value Content Register (0x18-0x1A) SENSORTIME [2] 7 6 5 4 W R/W R/W R/W 0 0 0 0 sensor_time<23:19> Bit Read/Write Reset Value Content 3 2 R/W R/W 0 0 sensor_time<19:16> BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Register (0x18-0x1A) SENSORTIME [0] 6 5 4 R/W R/W R/W 0 0 0 2 R/W 0 1 R/W 0 1 R/W 0 1 R/W 0 0 R/W 0 0 R/W 0 0 R/W 0 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 31 3.10.6 Register (0x1B) STATUS ADDRESS 0x1B RESET 0b00000000 MODE RW DESCRIPTION Reports sensor status flags. DEFINITION Bit 7 6 5 4 3 2 1 Acronym reserved drdy_gyr reserved nvm_rdy foc_rdy reserved gyr_self_test_ok 0 por_detected drdy_*: nvm_rdy: foc_rdy: Definition Data ready (DRDY) for gyroscope in register NVM controller status FOC completed `0' when gyroscope self-test is running or failed. `1' when gyroscope self-test completed successfully. `0' after read, `1' after software reset or power on gets reset when one byte of the register for sensor * is read. status of NVM controller: 0 NVM write operation is in progress; 1 NVM is ready to accept a new write trigger Fast offset compensation completed 3.10.7 Register (0x1D) INT_STATUS_1 ADDRESS 0x1D (1 byte) RESET MODE RW DESCRIPTION The register contains interrupt status flags. DEFINITION Each flag is associated with a specific interrupt function. It is set when the associated interrupt triggers. The interrupt function associated with a specific status flag must be enabled. Register (0x1D) INT_STATUS_1 6 5 4 fwm_int ffull_int drdy_int definition Fifo watermark Fifo full Data ready `0' interrupt inactive, `1' interrupt active. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 32 3.10.8 Register (0x20-0x21) TEMPERATURE ADDRESS 0x20 (2 byte) RESET 0x8000 (-128C) MODE R DESCRIPTION Contains the temperature of the sensor DEFINITION The output word of the 16-bit temperature sensor is only valid if the gyroscope is in normal mode, i.e. gyr_pmu_status=0b01. The resolution is typically 1/29 K/LSB. Value Temperature 0x7FFF 87 - 1/29 C ... ... 0x0000 23 C ... ... 0x8001 -41 + 1/29 C 0x8000 Invalid If the gyroscope is in normal mode (see Register (0x03) PMU_STATUS), the temperature is updated every 10 ms (+-12%). Otherwise, when the gyroscope is in suspend mode and TMP power state is in normal mode, the temperature is updated every 1.28s aligned with bit 15 of the Register (0x20-0x21) TEMPERATURE. Another configuration is that, when the gyroscope is in fast-power up mode, but TMP power state is set to suspend mode, the temperature measurement will also be executed every 1.28s and Register (0x20-0x21) TEMPERATURE will be updated accordingly. Comparatively, when both the gyroscope and TMP power states are set to suspend mode, the temperature measurement will be disabled and will not be executed. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 33 3.10.9 Register (0x22-0x23) FIFO_LENGTH ADDRESS 0x22 (2 byte) RESET 0x0000 MODE R DESCRIPTION FIFO data readout register. DEFINITION The register contains FIFO status flags. Name Bit Read/Write Reset Value Content Register (0x22-0x23) FIFO_LENGTH [0] 7 6 5 4 R R R R 0 0 0 0 fifo_byte_counter<7:4> Bit Read/Write Reset Value Content 3 2 R R 0 0 fifo_byte_counter<3:0> Name Bit Read/Write Reset Value Content 7 R 0 Reserved 1 R 0 0 R 0 Register (0x22-0x23) FIFO_LENGTH [1] 6 5 4 R R R 0 0 0 Bit 3 2 1 0 Read/Write R R R R Reset Value 0 0 0 0 Content reserved fifo_byte_counter<10:8> fifo_byte_counter: Current fill level of FIFO buffer. This includes the skip frame for a full FIFO. The FIFO counter also includes the number of skipped frames. E.g. after the FIFO is full, the counter may also reach values larger than what can actually be stored in the FIFO. An empty FIFO corresponds to 0x000. The byte counter may be reset by reading out all frames from the FIFO buffer or when the FIFO is reset through the Register (0x7E) CMD. The byte counter is updated, when a complete frame is read or written. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 34 3.10.10 Register (0x24) FIFO_DATA ADDRESS 0x24 RESET 0x00 MODE R DESCRIPTION FIFO data readout register. DEFINITION The FIFO data are organized in frames as described in chapter 3.5.1. The new data flag is preserved. Read burst access must be used, the address will not increment when the read burst reads at the address of FIFO_DATA. When a frame is only partially read out it will be retransmitted (including the header in header mode) at the next readout. New data will only be present after the complete frame has been read. Name Bit Read/Write Reset Value Content 7 R 0 fifo_data<7:4> Bit Read/Write Reset Value Content 3 R 0 fifo_data<3:0> Register (0x24) FIFO_DATA 6 5 R R 0 0 4 R 0 2 R 0 0 R 0 fifo_data<7:0>: FIFO data readout; Register (0x46-0x47) FIFO_CONFIG. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 1 R 0 data format depends on the setting of Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 35 3.10.11 Register (0x42) GYR_CONF ADDRESS 0x42 RESET 0b00101000 MODE RW DESCRIPTION Sets the output data rate, the bandwidth, and the read mode of the gyroscope in the sensor. DEFINITION Name Bit Read/Write Reset Value Content 7 R/W 0 reserved Bit Read/Write Reset Value Content 3 R/W 1 gyr_odr Register (0x42) GYR_CONF 6 5 R/W R/W 0 1 gyr_bwp 4 R/W 0 2 R/W 0 0 R/W 0 1 R/W 0 gyr_odr: defines the output data rate of the gyro in the sensor. This is independent of the power mode setting for the sensor. Settings below = ODR 25 Hz are illegal. The output data rate in Hz is given by 100/28-val(gyr_odr). gyr_odr Output data rate in Hz 0b0000 Reserved 0b0001 Reserved 0b0010 Reserved ... (all reserved) 0b0101 Reserved 0b0110 25 ... 0b1000 100 ... 0b1100 1600 0b1101 3200 0b111x Reserved gyr_bwp: the gyroscope bandwidth coefficient defines the 3 dB cutoff frequency of the low pass filter for the sensor data. For details see Section 3.4.1. Configurations without a bandwidth number are illegal settings and will result in an error code in the Register (0x02) ERR_REG. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 36 3.10.12 Register (0x43) GYR_RANGE ADDRESS 0x43 RESET 0b00000000 MODE RW DESCRIPTION Defines the BMG250 angular rate measurement range DEFINITION A measurement range is selected by setting the range bits as follows: Name Bit Read/Write Reset Value Content 7 R/W 0 Reserved Bit Read/Write Reset Value Content 3 R/W 0 reserved Register (0x43) GYR_RANGE 6 5 R/W R/W 0 0 4 R/W 0 0 range[2:0] `000' `001' `010' `011' `100' `101', 110, 111 2 R/W 0 gyr_range<2:0> Full Scale 2000/s 1000/s 500/s 250/s 125/s reserved 1 R/W 0 0 R/W 0 Resolution 16.4 LSB//s 61.0 m/s / LSB 32.8 LSB//s 30.5 m/s / LSB 65.6 LSB//s 15.3 m/s / LSB 131.2 LSB//s 7.6 m/s / LSB 262.4 LSB//s 3.8m/s / LSB gyr_range<2:0>: Angular Rate Range and Resolution. reserved: write `0' Changing the range of the gyroscope does not clear the data ready bit in the Register (0x1B) STATUS. It is recommended to read the Register (0x12-0x17) DATA after the range change to remove a stall data ready bit from before the range change. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 37 3.10.13 Register (0x45) FIFO_DOWNS ADDRESS 0x45 (1 byte) RESET 0b0000-0000 MODE RW DESCRIPTION Used to configure the down sampling ratios of the data for FIFO. DEFINITION The downsampling ratio for the data are given by 2Val(gyr_fifo_downs). [gyr]_fifo_filt_data=0 (1) selects pre-filtered (filtered) data for the FIFO, respectively. Name Bit Read/Write Reset Value Content Bit Read/Write Reset Value Content 7 n/a 0 3 R/W 1 gyr_fifo_filt_data BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Register (0x45) FIFO_DOWNS 6 5 n/a n/a 0 0 reserved 2 1 R/W R/W 0 0 gyr_fifo_downs 4 n/a 0 0 R/W 0 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 38 3.10.14 Register (0x46-0x47) FIFO_CONFIG ADDRESS 0x46 (2 bytes) RESET 0x80 (FIFO_CONFIG[0]), 0x10 (FIFO_CONFIG[1]) MODE RW DESCRIPTION The Register (0x46-0x47) FIFO_CONFIG is a read/write register and can be used for reading or setting the current FIFO watermark level. This register can also be used for setting the different modes of operation of the FIFO, e.g. which data is going to be stored in it and which format is going to be used (header or headerless mode). DEFINITION Name Bit 7 Read/Write R/W Reset Value 1 Register (0x46-0x47) FIFO_CONFIG [0] 6 5 4 R/W R/W R/W 0 0 0 Content fifo_water_mark <7:4> Bit Read/Write Reset Value Content 3 2 R/W R/W 0 0 fifo_water_mark <3:0> 1 R/W 0 0 R/W 0 fifo_water_mark <7:0>: fifo_water_mark defines the FIFO watermark level. An interrupt will be generated, when the number of entries in the FIFO exceeds fifo_water_mark. The unit of fifo_water_mark are 4 bytes. Name Bit Read/W rite Reset Value Content 7 R/W Register (0x46-0x47) FIFO_CONFIG [1] 4 3 2 R/W R/W R/W 1 R/W 0 R/W 0 1 0 0 0 fifo_gyr_en fifo_header _en fifo_tag_int1 fifo_tag_int2 _en _en fifo_time_en fifo_stop_on _full 0 When all the sensors are disabled, the FIFO is disabled and no headers are written. The sensors can be disabled via fifo_gyr_en respectively. fifo_gyr_en: `0' no gyro data are stored in FIFO, `1' gyro data are stored in FIFO (all 3 axes) fifo_header_en: If `1' each frame contains a header as defined in section 3.5.1. If `0' the frame format will be headerless. fifo_tag_int1_en: 1' (`0') enables (disables) FIFO tag (interrupt) fifo_tag_int2_en: 1' (`0') enables (disables) FIFO tag (interrupt) fifo_time_en: `1'(`0') returns (does not return) a sensortime frame after the last valid frame when more data are read than valid frames are in the FIFO. fifo_stop_on_full: stop writing samples into FIFO when FIFO is full. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 39 3.10.15 Register (0x51) INT_EN ADDRESS 0x51 (1 byte) RESET 0b0000-0000 MODE RW DESCRIPTION Controls which interrupt engines are enabled. DEFINITION Register (0x51) INT_EN [1] 7 6 5 4 BST-BMG250-DS000-02 | Revision 1.2 | July 2016 acronym int_fwm_en int_ffull_en int_drdy_en definition Reserved FIFO watermark FIFO full Data ready Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 40 3.10.16 Register (0x53) INT_OUT_CTRL ADDRESS 0x53 RESET 0b0000-0000 MODE RW DESCRIPTION Contains the behavioral configuration (electrical definition of the interrupt pins. DEFINITION Register (0x53) INT_OUT_CTRL 7 Acronym definition int2_output_en 6 int2_od 5 int2_lvl 4 3 int2_edge_crtl int1_output_en 2 int1_od 1 int1_lvl Output enable for INT2 pin, select `0'output disabled, or `1' output enabled select `0'push-pull, or `1' open drain behavior for INT2 pin. Only valid if int2_output_en=1. `0'active low, or `1'active high level for INT2 pin. If int2_output_en=1 this applies for interrupt outputs, if int2_output_en=0 this applies to trigger PMU configured in Register (0x6C) PMU_TRIGGER. For tagging a frame in FIFO through fifo_tag_int2_en in Register (0x46-0x47) FIFO_CONFIG the setting of int2_lvl is not relevant. `1' (`0') is edge (level) triggered for INT2 pin Output enable for INT1 pin, select `0'output disabled, or `1' output enabled select `0'push-pull, or `1' open drain behavior for INT1 pin. Only valid if int1_output_en=1 select `0'active low, or`1'active high level for INT1 pin. If int1_output_en=1 this applies for interrupt outputs, if int1_output_en=0 this applies to trigger PMU configured in Register (0x6C) PMU_TRIGGER. For tagging in FIFO through fifo_tag_int2_en in Register (0x46-0x47) FIFO_CONFIG the setting of int2_lvl is not relevant. For tagging a frame in FIFO through fifo_tag_int1_en in Register (0x46-0x47) FIFO_CONFIG the setting of int1_lvl is not relevant. 0 int1_edge_crtl `1' (`0') is edge (level) triggered for INT1 pin int_edge_crtl is only relevant for int_output_en ='1' BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 41 3.10.17 Register (0x54) INT_IN_CTRL ADDRESS 0x54 RESET 0b0000-0000 MODE RW DESCRIPTION Contains the interrupt input mode selection. DEFINITION Not applied to new data Register (0x54) INT_IN_CTRL <7:6> 5 MODE n/a RW 4 RW <3:0> RW Definition Reserved Input enable for INT2 pin, select `0'input disabled, or `1' input enabled Input enable for INT1 pin, select `0'input disabled, or `1' input enabled Reserved 3.10.18 Register (0x56) INT_MAP ADDRESS 0x56 (1 byte) RESET 0b0000-0000 MODE RW DESCRIPTION Controls which interrupt signals are mapped to the INT1 and INT2 pin. DEFINITION The tables show bit number of a register and meaning of the interrupt pin. Register (0x56) INT_MAP [1]<7:4> 7 6 5 4 Interrupt mapped to pin INT1 Data ready FIFO watermark FIFO full reserved Register (0x56) INT_MAP [1]<3:0> 3 2 1 0 Interrupt mapped to pin INT2 Data ready FIFO watermark FIFO full reserved `1' means mapping is active, `0' means mapping is inactive. When the external interrupt is mapped to an interrupt pin, all other interrupt mappings are disabled for this interrupt. When an external interrupt is mapped to an interrupt pin, no other interrupts may be enabled. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 42 3.10.19 Register (0x6A) CONF ADDRESS 0x6A RESET 0b00000000 MODE RW DESCRIPTION Configuration of the sensor DEFINITION Register (0x6A) CONF Bit 7 6 5 4 3 2 1 0 nvm_prog_en: Acronym Definition Reserved Reserved Reserved Reserved Reserved Reserved nvm_prog_en Reserved Enable NVM programming `1'(`0') enables (disables) that the NVM may be programmed 3.10.20 Register (0x6B) IF_CONF ADDRESS 0x6B RESET 0x00 MODE RW DESCRIPTION Contains settings for the digital interface. DEFINITION Name Bit Read/Write Reset Value Content 7 R/W 0 Reserved Bit Read/Write Reset Value Content 3 R/W 0 Reserved reserved: spi3: if_mode: Register (0x6B) IF_CONF 6 5 R/W R/W 0 0 if_mode 2 R/W 0 1 R/W 0 4 R/W 0 0 R/W 0 spi3 write `0' select 0 4-wire SPI, or 1 3-wire SPI mode 00: primary interface: autoconfig / secondary interface: off 01: Primary interface: I2C / secondary interface:OIS 10: reserved 11: reserved BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Page 43 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 44 3.10.21 Register (0x6C) PMU_TRIGGER ADDRESS 0x6C RESET 0b0001-0000 MODE RW DESCRIPTION Used to set the trigger conditions to change the gyro power modes DEFINITION The pmu_gyr_mode in Register (0x03) PMU_STATUS is updated with each transition triggered. Name Bit Read/Write Reset Value Content Bit Read/Write Reset Value Content Register (0x6C) PMU_TRIGGER 6 5 RW RW 0 0 wakeup_int gyr_sleep_state 7 RW 0 Reserved 3 RW 0 gyr_wakeup_trigg er<0> 2 RW 0 Reserved 1 RW 0 gyr_sleep_trigger 4 RW 0 Reserved 0 RW 0 gyr_wakeup_trigger: when both trigger conditions are enabled, both conditions must be active to trigger the transition. gyr_wakeup_trigger INT1 pin 0b0 no 0b1 yes gyr_sleep_trigger: when more than one trigger condition is enabled, one is sufficient to trigger the transition. gyr_sleep_trigger Not INT1 pin INT2 pin 0b00 no no 0b01 no yes 0b10 yes no 0b11 yes yes If gyr_sleep_trigger and gyr_wakeup_trigger are active at the same time, the gyr_wakeup_trigger wins. The INTx pin takes into account the edge/level triggered setting in the Register (0x53) INT_OUT_CTRL. gyr_sleep_state: wakeup_int: `1'(`0') transitions to suspend (fast start-up) state `1'(`0') triggers an interrupt, when a gyro wakeup is triggered BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 45 3.10.22 Register (0x6D) SELF_TEST ADDRESS 0x6D RESET 0b0000-0000 MODE RW DESCRIPTION Contains the settings for the sensor self-test configuration and trigger. DEFINITION Name Bit Read/Write Reset Value Content 7 R/W 0 Reserved Bit Read/Write Reset Value Content 3 R/W 0 Reserved Register (0x6D) SELF_TEST 6 5 R/W R/W 0 0 2 R/W 0 Reserved 1 R/W 0 Reserved 4 R/W 0 gyr_self_test_ enable 0 R/W 0 Reserved reserved: write `0x0' gyr_self_test_enable: starts self-test of the gyroscope. The result can be obtained from Register (0x1B) STATUS. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 46 3.10.23 Register (0x70) NV_CONF ADDRESS 0x70 RESET 0x00 MODE RW DESCRIPTION Contains settings for the digital interface. DEFINITION This register is backed by NVM and loaded from NVM during boot-up. Name Bit Read/Write Reset Value Content 7 R/W 0 Reserved Bit Read/Write Reset Value Content 3 R/W 0 reserved reserved: i2c_wdt_en: i2c_wdt_sel: spi_en: Register (0x70) NV_CONF 6 5 R/W R/W 0 0 4 R/W 0 2 R/W 0 i2c_wdt_en 0 R/W 0 spi_en 1 R/W 0 i2c_wdt_sel write `0' if IC interface mode is selected then `1 enable, or `0' disables the watchdog at the SDI pin (= SDA for IC) select an IC watchdog timer period of `0' 1 ms, or `1' 50 ms disable the IC and only enable SPI for the interface, when it is in autoconfig if_mode. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 47 3.10.24 Register (0x74-0x77) OFFSET ADDRESS 0x74 (4 byte) RESET Reads from NVM MODE RW DESCRIPTION Contains the offset compensation values for the gyroscope DEFINITION Offset values, which are added to the internal filtered and pre-filtered data for the sensor if the function is enabled with gyr_off_en in the register; the offset values are represented with two's complement notation; the content of the register may be written to the NVM; it is automatically restored from the NVM after each power-on or soft reset; offset values may be written directly by the user; it is generated automatically after triggering the fast offset compensation procedure. [3] [4] [5] Name Bit Read/Write Reset Value Content 7 R/W 0 gyr_off_en Bit Read/Write Reset Value Content 3 R/W 0 off_gyr_y<9:8> off_gyr_x<7:0> off_gyr_y<7:0> off_gyr_z<7:0> Register (0x77) OFFSET [6] 5 R/W 0 off_gyr_z<9:8> 4 R/W 0 2 R/W 0 0 R/W 0 1 R/W 0 off_gyr_x<9:8> The offset of the gyroscope off_gyr_[xyz] is a two-complement number in units of 0.12 deg/s*2Val(gyr_range_off), i.e. the resolution may be configured from 0.12 to 0.98 deg/s and the range from 31.25 to 250 deg/s. The configuration is done in the Register (0x70) NV_CONF. The MSBs for the gyro offset setting are also contained in OFFSET[6]. Aside from this, the register also contains the two bits gyr_off_en, which can be set to 1 in order to enable gyro offset compensation. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 48 3.10.25 Register (0x7E) CMD Register (0x7E) CMD ADDRESS 0x7E RESET 0x00 MODE W DESCRIPTION Command register triggers operations like softreset, NVM programming, etc. DEFINITION Name Bit Read/Write Reset Value Content 7 W 0 cmd<7:4> 6 W 0 5 W 0 4 W 0 Bit Read/Write Reset Value Content 3 W 0 cmd<3:0> 2 W 0 1 W 0 0 W 0 During the time a command is executed, it occupies the Register (0x7E) CMD. All new writes to this register are dropped during this time with the exception of the softreset command. If a write to the Register (0x7E) CMD is dropped, drop_cmd_err in Register (0x02) ERR_REG is set. Table 24: Typical and max. execution times for which the CMD register is occupied Description Command code Typ. time in ms Max. time in ms Set PMU mode of gyroscope to normal or fast start-up from suspend mode 0x15; 0x17 55 80 The time it takes to perform a soft reset in conjunction with re-starting a sensor is essentially given by the corresponding PMU command execution time in Table 24 (to be more exact, a system start-up time of 300 s has to be added to the times given for PMU switching). cmd: start_foc: 0x03 Starts Fast Offset Calibration as configured in Register (0x69) FOC_CONF and stores the result into the Register (0x74-0x77) OFFSET register. gyr_set_pmu_mode: 0b0001 01nn Sets the PMU mode for the gyroscope. The encoding for `nn' is identical to gyr_pmu_status in Register (0x03) PMU_STATUS 0x10 tmp_susp Sets the PMU mode to suspend. 0x11 tmp_norm BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Sets the PMU mode to normal. This command is necessary if user want to program NVM. Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 49 0x14 gyr_susp Sets the PMU mode for the Gyroscope to suspend. 0x15 gyr_norm Sets the PMU mode for the Gyroscope to normal. 0x16 gyr_res Reserved 0x17 gyr_fsup Sets the PMU mode for the Gyroscope to fast start-up. prog_nvm: 0xA0 Writes the NVM backed registers into NVM. fifo_flush: 0xB0 clears all data in the FIFO, does not change the Register (0x46-0x47) FIFO_CONFIG and Register (0x45) FIFO_DOWNS registers. softreset: 0xB6 triggers a reset including a reboot. Other values are ignored. Following a delay, all user configuration settings are overwritten with their default state or the setting stored in the NVM, wherever applicable. This register is functional in all operation modes. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 50 4. Digital interfaces 4.1 Interface Beside the standard primary interface (I2C and SPI configurable), where the sensor acts as a slave to the application processor, BMG250 supports a secondary OIS-Interface (SPI). In this mode, the secondary interface can be used as an OIS-Interface to be connected to an external OIS-Control unit, where the OIS controller will act as a master and the BMG250 as a slave. By default, the BMG250 operates in IC mode. The BMG250 interface can also be configured to operate in a SPI 4-wire configuration. It can be re-configured by software to work in 3-wire mode instead of 4-wire mode. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 51 The mapping for the interface of the BMG250 is given in the following table: Table 25: Mapping of the interface pins Pin# Name I/O Type Description 1 SDO Digital I/O Serial data output in SPI Address select in IC mode 4 INT1 9 INT2 12 CSB Digital in 13 SCx Digital in 14 SDx Digital I/O Digital I/O Digital I/O Connect to in in SPI3 in IC SPI4W W SA0 DNC (GND for MISO (float) default addr.) Interrupt pin 1 *) INT1 INT1 INT1 Interrupt pin 2 *) INT2 INT2 INT2 CSB CSB VDDIO SCK SCK SCL MOSI SISO SDA Chip select for SPI mode / Protocol selection pin SCK for SPI serial clock SCL for IC serial clock SDA serial data I/O in IC SDI serial data input in SPI 4W SDA serial data I/O in SPI 3W The following table shows the electrical specifications of the interface pins: Table 26: Electrical specification of the interface pins Parameter Symbol Condition Min Typ Max Units Pull-up Resistance, CSB pin Rup Internal Pull-up Resistance to VDDIO 75 100 150 k Input Capacitance Cin 5 pF IC Bus Load Capacitance (max. drive capability) CI2C_Load 400 pF 4.1.1 Interface IC/SPI Protocol Selection The protocol is automatically selected based on the chip select CSB pin behavior after power-up. At reset / power-up, BMG250 is in IC mode. If CSB is connected to VDDIO during power-up and not changed the sensor interface works in IC mode. For using IC, it is recommended to hardwire the CSB line to VDDIO. Since power-on-reset is only executed when, both VDD and VDDIO are established, there is no risk of incorrect protocol detection due to power-up sequence. If CSB sees a rising edge after power-up, the BMG250 interface switches to SPI until a reset or the next power-up occurs. Therefore, a CSB rising edge is needed before starting the SPI BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 52 communication. Hence, it is recommended to perform a SPI single read access to the ADDRESS 0x7F before the actual communication is started in order to use the SPI interface. If toggling of the CSB bit is not possible without data communication, there is in addition the spi_en bit in Register (0x70) NV_CONF, which can be used to permanently set the interface to SPI without the need to toggle the CSB pin at every power-up or reset. 4.1.2 SPI Interface The timing specification for SPI of the BMG250 is given in the following table: Table 27: SPI timing, valid at VDDIO 1.71V, if not stated otherwise Parameter Clock Frequency SCK Low Pulse SCK High Pulse SDI Setup Time SDI Hold Time Symbol fSPI Condition Min Max. Load on SDI or SDO = 25pF, VDDIO 1.71 V VDDIO < 1.71V tSCKL tSCKH Max Units 10 MHz 7.5 MHz 48 48 20 20 45 52 45 ns ns ns ns ns ns ns tIDLE_wacc_nm 20 40 2 ns ns s tIDLE_wacc_sum 450 s tSDI_setup tSDI_hold SDO Output Delay tSDO_OD CSB Setup Time CSB Hold Time Idle time between write accesses, normal mode Idle time between write accesses, suspend mode tCSB_setup tCSB_hold BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Load = 30pF, VDDIO 1.62V Load = 25pF, VDDIO < 1.62V Load = 250pF, VDDIO > 2.4V Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 53 The following figure shows the definition of the SPI timings: tCSB_setup tCSB_hold CSB SCK tSCKL tSCKH SDI SDO tSDI_setup tSDI_hold tSDO_OD Figure 22: SPI timing diagram The SPI interface of the BMG250 is compatible with two modes, 00 [CPOL = 0 and CPHA = 0] and 11 [CPOL = 1 and CPHA = 1]. The automatic selection between 00 and 11 is controlled based on the value of SCK after a falling edge of CSB. Two configurations of the SPI interface are supported by the BMG250: 4-wire and 3-wire. The same protocol is used by both configurations. The device operates in 4-wire configuration by default. It can be switched to 3-wire configuration by writing 1 to Register (0x6B) IF_CONF spi3. Pin SDI is used as the common data pin in 3-wire configuration. For single byte read as well as write operations, 16-bit protocols are used. The BMG250 also supports multiple-byte read and write operations. In SPI 4-wire configuration CSB (chip select low active), SCK (serial clock), SDI (serial data input), and SDO (serial data output) pins are used. The communication starts when the CSB is pulled low by the SPI master and stops when CSB is pulled high. SCK is also controlled by SPI master. SDI and SDO are driven at the falling edge of SCK and should be captured at the rising edge of SCK. The basic write operation waveform for 4-wire configuration is depicted in the following figure. During the entire write cycle SDO remains in high-impedance state. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 54 CSB SCK SDI R/W AD6 AD5 AD4 AD3 AD2 AD1 SDO AD0 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0 Z tri-state Figure 23: 4-wire basic SPI write sequence (mode 11) The basic read operation waveform for 4-wire configuration is depicted in the figure below: CSB SCK SDI R/W AD6 AD5 AD4 AD3 AD2 AD1 AD0 SDO DO7 DO6 DO5 DO4 DO3 DO2 DO1 DO0 tri-state Figure 24: 4-wire basic SPI read sequence (mode 11) The data bits are used as follows: Bit0: Read/Write bit. When 0, the data SDI is written into the chip. When 1, the data SDO from the chip is read. Bit1-7: Address AD(6:0). BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 55 Bit8-15: when in write mode, these are the data SDI, which will be written into the address. When in read mode, these are the data SDO, which are read from the address. Multiple read operations are possible by keeping CSB low and continuing the data transfer. Only the first register address has to be written. Addresses are automatically incremented after each read access as long as CSB stays active low. The principle of multiple read is shown in figure below: Control byte Start RW CSB = 0 1 Register adress (02h) 0 0 0 0 0 1 0 X X Data byte Data byte Data byte Data register - adress 02h Data register - adress 03h Data register - adress 04h X X X X X X X X X X X X X X X X X X X X Stop X X CSB = 1 Figure 25: SPI multiple read In SPI 3-wire configuration CSB (chip select low active), SCK (serial clock), and SDI (serial data input and output) pins are used. While SCK is high, the communication starts when the CSB is pulled low by the SPI master and stops when CSB is pulled high. SCK is also controlled by SPI master. SDI is driven (when used as input of the device) at the falling edge of SCK and should be captured (when used as the output of the device) at the rising edge of SCK. The protocol as such is the same in 3-wire configuration as it is in 4-wire configuration. The basic operation wave-form (read or write access) for 3-wire configuration is depicted in the figure below: CSB SCK SDI RW AD6 AD5 AD4 AD3 AD2 AD1 AD0 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0 Figure 26: 3-wire basic SPI read or write sequence (mode 11) 4.1.3 IC Interface The IC bus uses SCL (= SCx pin, serial clock) and SDA (= SDx pin, serial data input and output) signal lines. Both lines are connected to VDDIO externally via pull-up resistors so that they are pulled high when the bus is free. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 56 The IC addresses are identical to BMG160. The default IC address of the device is 0b1101000 (0x68). It is used if the SDO pin is pulled to GND. The alternative address 0b1101001 (0x69) is selected by pulling the SDO pin to VDDIO. The IC interface of the BMG250 is compatible with the IC Specification UM10204 Rev. 03 (19 June 2007), available at http://www.nxp.com. The BMG250 supports IC standard mode and fast mode, only 7-bit address mode is supported. For VDDIO = 1.2V to 1.62 V the guaranteed voltage output levels are slightly relaxed as described in Table 1 of the electrical specification section. BMG250 also supports an extended IC mode that allows using clock frequencies up to 1 MHz. In this mode all timings of the fast mode apply and it additionally supports clock frequencies up to 1MHz. The timing specification for IC of the BMG250 is given in the following table: Table 28: IC timings Parameter Clock Frequency SCL Low Period SCL High Period SDA Setup Time SDA Hold Time Setup Time for a repeated Start Condition Hold Time for a Start Condition Setup Time for a Stop Condition Time before a new Transmission can start Idle time between write accesses, normal mode, suspend mode Idle time between write accesses, suspend mode, suspend mode BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Symbol fSCL tLOW tHIGH tSUDAT tHDDAT Condition Min Units kHz 1.3 0.6 0.1 0.0 tSUSTA 0.6 tHDSTA 0.6 tSUSTO 0.6 tBUF Max 1000 suspend mode 400 normal mode 1.3 suspend mode 400 normal mode 1.3 s tIDLE_wacc_n m tIDLE_wacc_s um 400 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 57 The figure below shows the definition of the IC timings given in Table 28: SDA tBUF tf tLOW SCL tHIGH tr tHDSTA tHDDAT tSUDAT SDA tSUSTA tSUSTO Figure 27: IC timing diagram The IC protocol works as follows: START: Data transmission on the bus begins with a high to low transition on the SDA line while SCL is held high (start condition (S) indicated by IC bus master). Once the START signal is transferred by the master, the bus is considered busy. STOP: Each data transfer should be terminated by a Stop signal (P) generated by master. The STOP condition is a low to HIGH transition on SDA line while SCL is held high. ACKS: Each byte of data transferred must be acknowledged. It is indicated by an acknowledge bit sent by the receiver. The transmitter must release the SDA line (no pull down) during the acknowledge pulse while the receiver must then pull the SDA line low so that it remains stable low during the high period of the acknowledge clock cycle. In the following diagrams these abbreviations are used: S P ACKS ACKM NACKM RW Start Stop Acknowledge by slave Acknowledge by master Not acknowledge by master Read / Write A START immediately followed by a STOP (without SCL toggling from VDDIO to GND) is not supported. If such a combination occurs, the STOP is not recognized by the device. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 58 IC write access: IC write access can be used to write a data byte in one sequence. The sequence begins with start condition generated by the master, followed by 7 bits slave address and a write bit (RW = 0). The slave sends an acknowledge bit (ACKS = 0) and releases the bus. Then the master sends the one byte register address. The slave again acknowledges the transmission and waits for the 8 bits of data which shall be written to the specified register address. After the slave acknowledges the data byte, the master generates a stop signal and terminates the writing protocol. Example of an IC write access: Control byte Slave Adress Start S 1 1 0 1 0 Register adress (0x10) RW ACKS 0 0 0 Data byte 0 1 1 1 0 0 Data (0x09) ACKS 0 0 1 1 0 1 0 ACKS Stop 1 0 1 P Figure 28: IC write IC read access: IC read access also can be used to read one or multiple data bytes in one sequence. A read sequence consists of a one-byte IC write phase followed by the IC read phase. The two parts of the transmission must be separated by a repeated start condition (S). The IC write phase addresses the slave and sends the register address to be read. After slave acknowledges the transmission, the master generates again a start condition and sends the slave address together with a read bit (RW = 1). Then the master releases the bus and waits for the data bytes to be read out from slave. After each data byte the master has to generate an acknowledge bit (ACKS = 0) to enable further data transfer. A NACKM (ACKS = 1) from the master stops the data being transferred from the slave. The slave releases the bus so that the master can generate a STOP condition and terminate the transmission. The register address is automatically incremented and, therefore, more than one byte can be sequentially read out. Once a new data read transmission starts, the start address will be set to the register address specified since the latest IC write command. By default the start address is set at 0x00. In this way repetitive multi-bytes reads from the same starting address are possible. In order to prevent the IC slave of the device to lock-up the IC bus, a watchdog timer (WDT) is implemented. The WDT observes internal IC signals and resets the IC interface if the bus is locked-up by the BMG250. The activity and the timer period of the WDT can be configured through the bits i2c_wdt_en and i2c_wdt_sel at Register (0x70) NV_CONF. Writing 1 (0) to Register (0x70) NV_CONF i2c_wdt_en activates (de-activates) the WDT. Writing 0 (1) to Register (0x70) NV_CONF i2c_wdt_en selects a timer period of 1 ms (50 ms). BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 59 Example of an IC read access (reading gyro data): Slave Adress Start S 1 1 0 1 0 RW ACKS 0 0 0 dummy Control byte X Register adress (0x02) 0 0 0 1 1 0 ACKS 0 Data byte Slave Adress Start Sr 1 1 0 1 0 Read Data (0x02) RW ACKS 0 0 1 Data byte X X X X X X Read Data (0x03) ACKM X X X X X Data byte X X X X X X X X X X X X X ... X X X X X X X ACKM X ... X Data byte Read Data (0x06) X X Read Data (0x05) ACKM Data byte ... X Data byte Read Data (0x04) ... X ACKM X Read Data (0x07) ACKM X X X X X X X X NACK X X Stop P Figure 29: IC multiple read 4.1.4 SPI and IC Access Restrictions In order to allow for the correct internal synchronization of data written to the BMG250, certain access restrictions apply for consecutive write accesses or a write/read sequence through the SPI as well as I2C interface. The required waiting period depends on whether the device is operating in normal mode or other modes. As illustrated in the figure below, an interface idle time of at least 2 s is required following a write operation when the device operates in normal mode. In suspend mode an interface idle time of least 450 s is required1. X-after-Write Write-Operation X-Operation Register Update Period (> 2us / 450us) Figure 30: Post-Write Access Timing Constraints 1 The times are preliminary and need to be verified. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 60 4.2 Secondary Interface OIS Interface (SPI) for connecting to a OIS control unit: Secondary interface for OIS application can be enabled by writing `01' to Register (0x6B) IF_CONF if_mode. In this case the secondary interface is used as a SPI interface where an external control unit is connected as a master to BMG250. The external control unit can be e.g. an OIS controller. If secondary interface is used, primary interface is limited to IC mode. The mapping for the secondary interface of the BMG250 is given in the following table: Table 29: Mapping of the secondary interface pins Pin# 10 11 Name OSCB OSDO I/O Type Digital I/O Digital I/O Description Secondary OIS interface Secondary OIS interface Connect to (secondary IF) in SPI4W CSB MISO in SPI3W CSB DNC in IC DNC DNC 4.2.1 Camera module connected to secondary interface for OIS BMG250 supports specific optical image stabilization (OIS) applications with a dedicated interface. This interface is used for direct access to pre-filtered gyroscope data with minimum latency. Pre-filtered gyroscope data is available at output data rate (ODR) of 6.4 kHz and can be read out via OIS SPI interface at 10MHz maximum speed. The OIS SPI interface supports 3-wire SPI as well as 4-wire SPI. The timings of the secondary SPI interface are the same as for the primary SPI interface, see chapter 4.1.2. The connection diagrams are depicted in chapter. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 61 5. Pin-out and Connection diagrams 5.1 Pin-out BMG250 Pin1 marker 12 (CSB) 13 (SCX) Top View BMI160 Top View (Pads not visible) 10(DNC) 11 (DNC) 7 (GND) 9 (INT2) 9 (INT2) 8 (VDD) 8 (VDD) Figure 31: Pin-out top view 5 (VDDIO) 6 (GNDIO) (Pads visible!) 6 (GNDIO) 5 (VDDIO) 2 (DNC) Bottom View BMI160 Bottom View (Pads visible) 7 (GND) 4 (INT1) 1 (SDO) 10 (DNC) (Pads not visible!) 3(DNC) 14 (SDX) 11(DNC) 13 (SCX) 1 (SDO) 2(DNC) 12 (CSB) 14 (SDX) Pin1 3 (DNC) 4 (INT1) Figure 32: Pin-out bottom view Table 30: BMG250 Pin-out and pin connections are described in the table below Pin# Name I/O Type 1 SDO Digital I/O 2 ASDx Digital I/O 3 ASCx Digital in 4 INT1 Digital I/O 5 VDDIO Supply 6 7 8 GNDIO GND VDD 9 INT2 10 OSCB 11 OSCO 12 CSB Ground Ground Supply Digital I/O Digital I/O Digital I/O Digital in 13 SCx Digital in 14 SDx Digital I/O Description Serial data output in SPI Address select in IC mode MOSI serial data input in SPI 4W 2ndary Interface SISO serial data I/O in SPI 3W 2ndary Interface Other configuration: Do not connect (or GND) SPI serial clock for 2ndary Interface Other configuration: Do not connect (or GND) Interrupt pin 1 *) Digital I/O supply voltage (1.2 ... 3.6V) Ground for I/O Ground for digital & analog Power supply analog & digital domain (1.62V - 3.6V) Interrupt pin 2 *) CSB in SPI as 2ndary Interface Other configuration: Do not connect (or GND) MISO in SPI 4W 2ndary Interface Other configuration: Do not connect (or GND) Chip select for SPI mode / Protocol selection pin SCK for SPI serial clock SCL for IC serial clock SDA serial data I/O in IC MOSI serial data input in SPI 4W (without 2ndary Interface) SISO serial data I/O in SPI 3W (without 2ndary Interface) *) If INT1 and/or INT2 are not used, please do not connect them (DNC) NOTE: all pins must be soldered to the PCB even if they are electrically not connected BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 62 5.2 Connection diagrams 5.2.1 I2C interface without using secondary OIS interface SA0 SDA CSB 11 R 7 100nF R VDDIO 9 8 INT1 INT2 INT2 VDD 100nF VDDIO GNDIO 5 4 10 GND 3 6 Top View BMI160 (Pads not Top View visible) (Pads not visible!) 2 INT1 12 1 13 14 SDO SCX SDX SCL VDD Figure 33: IC as interface 5.2.2 SPI 3-wire interface without using secondary OIS interface SDA SCK CSB 12 7 10 9 8 100nF VDDIO 100nF VDDIO 5 4 6 BMI160 Top View (Pads not Top View (Pads not visible!) visible) 11 INT1 INT2 INT2 VDD GND 3 13 SDX 2 INT1 14 1 GNDIO SDO SCX CSB VDD Figure 34: Only SPI 3-wire as interface BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 63 5.2.3 SPI 4-wire interface without using secondary OIS interface MISO MOSI CSB SCX 12 9 8 INT1 INT2 INT2 VDD 100nF 100nF VDDIO 10 7 5 4 VDDIO INT1 11 Top View BMI160 (Pads not Top View visible) (Pads not visible!) 6 3 CSB GND 2 13 1 GNDIO SDO 14 SDX SCK VDD Figure 35: Only SPI 4-wire as interface 5.2.4 Primary I2C and secondary 4-wire SPI as OIS interface Figure 36: Using I2C and 4-wire SPI as OIS interface SA0 SDA SCX CSB 12 1 13 SDO 14 SDX SCL 11 MISO OSDO OIS Interface ASDx OIS Interface ASCx 2 3 Top View BMI160 (Pads not Top View visible) (Pads not visible!) 7 OSCB CSB INT1 9 8 INT2 INT2 VDD GND GNDIO R VDDIO BST-BMG250-DS000-02 | Revision 1.2 | July 2016 5 VDDIO R 4 100nF INT1 6 SCK 10 100nF MOSI VDD Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 64 5.2.5 Primary I2C and secondary 3-wire SPI as OIS interface Figure 37: Using I2C and 3-wire SPI as OIS interface SA0 SDA SCX CSB 12 1 13 SDO 14 SDX SCL 11 OSDO OIS Interface ASDx 2 OIS Interface ASCx 3 Top View BMI160 (Pads not Top View visible) (Pads not visible!) 7 CSB OSCB INT1 9 8 INT2 INT2 VDD GND GNDIO R VDDIO BST-BMG250-DS000-02 | Revision 1.2 | July 2016 5 VDDIO R 4 100nF INT1 6 SCK 10 100nF SISO VDD Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 65 6. Package 6.1 Outline Dimensions The package dimension is LGA 2.5mm x 3.0mm x 0.83mm. Unit of the following drawing is mm. Note: Unless otherwise specified tolerance = decimal 0.05 mm. Figure 38: Packaging outline dimensions BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 66 Note: Pin1 marker is internally connected to Pin1. It must not be connected to a different signal than Pin1. 6.2 Sensing axes orientation If the sensor is rotated in the indicated directions, the corresponding channels of the device will deliver a positive yaw rate signal. If the sensor is at rest without any rotation the output of the corresponding gyroscope channel will be "zero" (static acceleration). Example: If the sensor would be placed on a seconds hand of a watch with the arrows of the following Fig. pointing towards the watch's dial, the output signals are: * * * + 6/sec for the X GYR channel + 6/sec for the Y GYR channel + 6/sec for the Z GYR channel Z X Y Figure 39: definition of sensing axes orientation For reference the figure below shows the Android device orientation with an integrated BMG250. BMG250 Figure 40: Android axis definition with BMG250 BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 67 6.3 Landing pattern recommendation The following landing pad recommendation is given for maximum stability of the solder connections. 0.675 14 13 12 2 10 3 9 4 8 2.5 0.5 11 0.25 1 6 0.675 5 7 0.925 3.0 Figure 41: Landing pattern recommendation for BMG250 Note: Pin1 marker is internally connected to Pin1. It must not be connected to a different signal than Pin1. The size of the landing pads may be further reduced in order to minimize solder-stress induced effects if sufficient control over the soldering process is given. Please contact your sales representative for further details. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 68 6.4 Marking 6.4.1 Mass production marking Table 31: Marking of mass samples Labeling CCC Wx Name Symbol Remark Counter ID CCC 3 alphanumeric digits, variable to generate trace-code W Product identifier W, denoting BMG250 First letter second row of Second letter of x second row Pin 1 identifier * Internal use - various digits possible -- 6.4.2 Engineering samples Table 32: Marking of engineering samples Labeling VLE CC Name Symbol Remark Internal ID VLE Various digits - internal "E" denotes engineering status Second row CC CC - internal revision ID Pin 1 identifier * -- BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 69 6.5 Soldering guidelines The moisture sensitivity level of the BMG250 sensors corresponds to JEDEC Level 1, see also IPC/JEDEC J-STD-020C "Joint Industry Standard: Moisture/Reflow Sensitivity Classification for non-hermetic Solid State Surface Mount Devices" IPC/JEDEC J-STD-033A "Joint Industry Standard: Handling, Packing, Shipping and Use of Moisture/Reflow Sensitive Surface Mount Devices" The sensor fulfils the lead-free soldering requirements of the above-mentioned IPC/JEDEC standard, i.e. reflow soldering with a peak temperature up to 260C. 260 C Figure 42: Soldering profile BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 70 6.6 Handling instructions Micromechanical sensors are designed to sense rotations with high accuracy even at low turn rates and contain highly sensitive structures inside the sensor element. The MEMS sensor can tolerate mechanical shocks up to several thousand g's. However, these limits might be exceeded in conditions with extreme shock loads such as e.g. hammer blow on or next to the sensor, dropping of the sensor onto hard surfaces etc. We recommend to avoid g-forces beyond the specified limits during transport, handling and mounting of the sensors in a defined and qualified installation process. This device has built-in protections against high electrostatic discharges or electric fields (e.g. 2kV HBM); however, anti-static precautions should be taken as for any other CMOS component. Unless otherwise specified, proper operation can only occur when all terminal voltages are kept within the supply voltage range. Unused inputs must always be tied to a defined logic voltage level. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 71 6.7 Tape and reel specification The BMG250 is shipped in a standard cardboard box. The box dimension for 1 reel is: L x W x H = 35 cm x 35 cm x 6 cm. BMG250 quantity: 5,000pcs per reel, please handle with care. A0 = 3.30, B0 = 2.80, K0 = 1.10 Note: Tolerances unless noted: 0.1 Sprocket hole pitch cumulative tolerance 0.1 Camber in compliance with EIA481 Pocket position relative to sprocket hole measured as true position of pocket, not pocket hole A0 and B0 are calculated on a plane at a distance "R" above the bottom of the pocket Figure 43: Tape and reel dimensions in mm 6.7.1 Orientation within the reel Processing direction Figure 44: Orientation of the BMG250 devices relative to the tape BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 72 6.8 Environmental safety The BMG250 sensor meets the requirements of the EC restriction of hazardous substances (RoHS) directive, see also: Directive 2002/95/EC of the European Parliament and of the Council of 27 January 2003 on the restriction of the use of certain hazardous substances in electrical and electronic equipment. 6.8.1 Halogen content The BMG250 is halogen-free. For more details on the analysis results please contact your Bosch Sensortec representative. 6.8.2 Multiple sourcing Within the scope of Bosch Sensortec's ambition to improve its products and secure the mass product supply, Bosch Sensortec employs multiple sources in the supply chain. While Bosch Sensortec takes care that all of technical parameters are described above are 100% identical for all sources, there can be differences in device marking and bar code labeling. However, as secured by the extensive product qualification process of Bosch Sensortec, this has no impact to the usage or to the quality of the product. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 73 7. Legal disclaimer 7.1 Engineering samples Engineering Samples are marked with an asterisk (*) or (e) or (E). Samples may vary from the valid technical specifications of the product series contained in this data sheet. They are therefore not intended or fit for resale to third parties or for use in end products. Their sole purpose is internal client testing. The testing of an engineering sample may in no way replace the testing of a product series. Bosch Sensortec assumes no liability for the use of engineering samples. The Purchaser shall indemnify Bosch Sensortec from all claims arising from the use of engineering samples. 7.2 Product use Bosch Sensortec products are developed for the consumer goods industry. They may only be used within the parameters of this product data sheet. They are not fit for use in life-sustaining or security sensitive systems. Security sensitive systems are those for which a malfunction is expected to lead to bodily harm or significant property damage. In addition, they are not fit for use in products which interact with motor vehicle systems. The resale and/or use of products are at the purchaser's own risk and his own responsibility. The examination of fitness for the intended use is the sole responsibility of the Purchaser. The purchaser shall indemnify Bosch Sensortec from all third party claims arising from any product use not covered by the parameters of this product data sheet or not approved by Bosch Sensortec and reimburse Bosch Sensortec for all costs in connection with such claims. The purchaser must monitor the market for the purchased products, particularly with regard to product safety, and inform Bosch Sensortec without delay of all security relevant incidents. 7.3 Application examples and hints With respect to any examples or hints given herein, any typical values stated herein and/or any information regarding the application of the device, Bosch Sensortec hereby disclaims any and all warranties and liabilities of any kind, including without limitation warranties of non-infringement of intellectual property rights or copyrights of any third party. The information given in this document shall in no event be regarded as a guarantee of conditions or characteristics. They are provided for illustrative purposes only and no evaluation regarding infringement of intellectual property rights or copyrights or regarding functionality, performance or error has been made. BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice. BMG250 Data sheet Page 74 8. Document history and modifications Rev. No 1.0 1.1 1.2 Chapter Description of modification/changes Initial release Update secondary Interface Final Release Date Sept 2015 May 2016 July 2016 Bosch Sensortec GmbH Gerhard-Kindler-Strae 9 72770 Reutlingen / Germany contact@bosch-sensortec.com www.bosch-sensortec.com Modifications reserved | Printed in Germany Preliminary - specifications subject to change without notice Document number: BST-BMG250-DS000-02 Revision_1.2_072016 BST-BMG250-DS000-02 | Revision 1.2 | July 2016 Bosch Sensortec (c) Bosch Sensortec GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany. Note: Specifications within this document are preliminary and subject to change without notice.