Data sheet BMM150 Geomagnetic Sensor Bosch Sensortec BMM150: Data sheet Document revision 1.0 Document release date April 25 , 2013 Document number BST-BMM150-DS001-01 Technical reference code(s) 0 273 141 157 Notes Data in this document are preliminary and subject to change without notice. Product photos and pictures are for illustration purposes only and may differ from the real product's appearance. Advance information - Subject to change without notice th Datasheet BMM150 Geomagnetic Sensor Page 2 BMM150 THREE-AXIS GEOMAGNETIC SENSOR Key features Three-axis magnetic field sensor Ultra-Small package Wafer Level Chip Scale Package (12 pins, 0.4mm diagonal ball pitch) footprint 1.56 x 1.56 mm2, height 0.6 mm Digital interface SPI (4-wire, 3-wire), IC, 4, 2 interrupt pins Low voltage operation VDD supply voltage range: 1.62V to 3.6V VDDIO interface voltage range: 1.2V to 3.6V Flexible functionality Magnetic field range typical: 1300T (x, y-axis), 2500T (z-axis) Magnetic field resolution of ~0.3T On-chip interrupt controller Interrupt-signal generation for - new data - magnetic Low-/High-Threshold detection Ultra-low power Low current consumption (170A @ 10 Hz in low power preset), short wake-up time, advanced features for system power management Temperature range -40 C ... +85 C RoHS compliant, halogen-free Typical applications Magnetic heading information Tilt-compensated electronic compass for map rotation, navigation and augmented reality Gyroscope calibration in 9-DoF applications for mobile devices In-door navigation, e.g. step counting in combination accelerometer Gaming BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 3 General Description The BMM150 is a standalone geomagnetic sensor for consumer market applications. It allows measurements of the magnetic field in three perpendicular axes. Based on Bosch's proprietary FlipCore technology, performance and features of BMM150 are carefully tuned and perfectly match the demanding requirements of all 3-axis mobile applications such as electronic compass, navigation or augmented reality. An evaluation circuitry (ASIC) converts the output of the geomagnetic sensor to digital results which can be read out over the industry standard digital interfaces (SPI and I2C). Package and interfaces of the BMM150 have been designed to match a multitude of hardware requirements. As the sensor features an ultra-small footprint and a flat package, it is ingeniously suited for mobile applications. The wafer level chip scale package (WLCSP) with dimensions of only 1.56 x 1.56 x 0.6 mm3 ensures high flexibility in PCB placement. The BMM150 offers ultra-low voltage operation (VDD voltage range from 1.62V to 3.6V, VDDIO voltage range 1.2V to 3.6V) and can be programmed to optimize functionality, performance and power consumption in customer specific applications. The programmable interrupt engine gives design flexibility to the developer. The BMM150 senses the three axis of the terrestrial field in cell phones, handhelds, computer peripherals, man-machine interfaces, virtual reality features and game controllers. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 4 Index of Contents 1. SPECIFICATION ........................................................................................................................ 6 1.1 ELECTRICAL OPERATION CONDITIONS................................................................................... 6 1.2 MAGNETOMETER OUTPUT SIGNAL SPECIFICATION ................................................................. 7 2. ABSOLUTE MAXIMUM RATINGS ............................................................................................ 9 3. BLOCK DIAGRAM ................................................................................................................... 10 4. FUNCTIONAL DESCRIPTION ................................................................................................. 11 4.1 POWER MANAGEMENT ....................................................................................................... 11 4.2 POWER MODES ................................................................................................................. 11 4.2.1 POWER OFF MODE ....................................................................................................................... 11 4.2.2 SUSPEND MODE ........................................................................................................................... 11 4.2.3 SLEEP MODE ................................................................................................................................ 12 4.2.4 ACTIVE MODE............................................................................................................................... 12 4.3 SENSOR OUTPUT DATA ...................................................................................................... 14 4.3.1 MAGNETIC FIELD DATA.................................................................................................................. 14 4.3.2 MAGNETIC FIELD DATA TEMPERATURE COMPENSATION................................................................... 15 4.4 SELF-TEST ....................................................................................................................... 16 4.4.1 NORMAL SELF TEST ...................................................................................................................... 16 4.4.2 ADVANCED SELF TEST .................................................................................................................. 16 4.5 NON-VOLATILE MEMORY .................................................................................................... 17 4.6 MAGNETOMETER INTERRUPT CONTROLLER ........................................................................ 17 4.6.1 GENERAL FEATURES .................................................................................................................... 18 4.6.2 ELECTRICAL BEHAVIOR OF MAGNETIC INTERRUPT PINS ................................................................... 18 4.6.3 DATA READY / DRDY INTERRUPT .................................................................................................. 19 4.6.4 LOW-THRESHOLD INTERRUPT........................................................................................................ 19 4.6.5 HIGH-THRESHOLD INTERRUPT ....................................................................................................... 21 4.6.6 OVERFLOW .................................................................................................................................. 21 5. REGISTER DESCRIPTION ...................................................................................................... 22 5.1 GENERAL REMARKS .......................................................................................................... 22 5.2 REGISTER MAP ................................................................................................................. 22 5.3 CHIP ID ............................................................................................................................ 23 5.4 MAGNETIC FIELD DATA ...................................................................................................... 23 5.5 INTERRUPT STATUS REGISTER ........................................................................................... 26 5.6 POWER AND OPERATION MODES, SELF-TEST AND DATA OUTPUT RATE CONTROL REGISTERS .. 26 5.7 INTERRUPT AND AXIS ENABLE SETTINGS CONTROL REGISTERS ............................................. 28 5.8 NUMBER OF REPETITIONS CONTROL REGISTERS ................................................................. 30 BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 5 6. DIGITAL INTERFACES ............................................................................................................ 32 6.1 SERIAL PERIPHERAL INTERFACE (SPI) ................................................................................ 33 6.2 INTER-INTEGRATED CIRCUIT (IC) ...................................................................................... 36 7. PIN-OUT AND CONNECTION DIAGRAM............................................................................... 41 7.1 PIN-OUT ........................................................................................................................... 41 7.2 CONNECTION DIAGRAM 4-WIRE SPI ................................................................................... 42 7.3 CONNECTION DIAGRAM 3-WIRE SPI ................................................................................... 43 7.4 CONNECTION DIAGRAM I2C ................................................................................................ 44 8. PACKAGE ................................................................................................................................ 45 8.1 OUTLINE DIMENSIONS ....................................................................................................... 45 8.2 SENSING AXES ORIENTATION ............................................................................................. 46 9. SENSOR ORIENTATION ......................................................................................................... 46 9.1 ANDROID AXES ORIENTATION ............................................................................................. 47 9.2 LANDING PATTERN RECOMMENDATION ............................................................................... 48 9.3 MARKING.......................................................................................................................... 49 9.3.1 MASS PRODUCTION DEVICES ........................................................................................................ 49 9.3.2 ENGINEERING SAMPLES ................................................................................................................ 50 9.4 SOLDERING GUIDELINES .................................................................................................... 51 9.5 HANDLING INSTRUCTIONS .................................................................................................. 52 9.5.1 TAPE AND REEL DIMENSIONS......................................................................................................... 53 9.5.2 ORIENTATION WITHIN THE REEL..................................................................................................... 53 9.6 ENVIRONMENTAL SAFETY .................................................................................................. 54 9.6.1 HALOGEN CONTENT ..................................................................................................................... 54 9.6.2 INTERNAL PACKAGE STRUCTURE ................................................................................................... 54 10. LEGAL DISCLAIMER............................................................................................................. 55 10.1 ENGINEERING SAMPLES................................................................................................... 55 10.2 PRODUCT USE ................................................................................................................ 55 10.3 APPLICATION EXAMPLES AND HINTS ................................................................................. 55 11. DOCUMENT HISTORY AND MODIFICATION ..................................................................... 56 BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 6 1. Specification If not stated otherwise, the given values are over lifetime and full performance temperature and voltage ranges, minimum/maximum values are 3. 1.1 Electrical operation conditions Table 1: Electrical parameter specification OPERATING CONDITIONS Parameter Symbol Supply Voltage Internal Domains Supply Voltage I/O Domain Voltage Input Low Level Voltage Input High Level Voltage Output Low Level Voltage Output High Level Magnetic field range Magnetometer heading accuracy Min Typ Max Unit VDD 1.62 2.4 3.6 V VDDIO 1.2 1.8 3.6 V 0.3VDDIO - VIL,a SPI & IC VIH,a SPI & IC VOL VDDIO = 1. 2V IOL = 3mA, SPI & IC VDDIO = 1.62V IOH = 2mA, SPI & IC TA=25C1 VOH Brg,xy Brg,z Acheading 2 IDD,lp,m Supply Current in Active Mode (average)3 Condition IDD,rg,m IDD,eh,m 30T horizontal geomagnetic field component, TA=25C Low power preset Nominal VDD supplies TA=25C, ODR=10Hz Regular preset Nominal VDD supplies TA=25C, ODR=10Hz Enhanced regular preset Nominal VDD supplies TA=25C, 0.7VDDIO 0.2VDDIO 0.8VDDIO 1200 2000 - 1300 2500 2.5 T T deg 170 A 0.5 mA 0.8 mA 1 Full linear measurement range considering sensor offsets. The heading accuracy depends on hardware and software. A fully calibrated sensor and ideal tilt compensation are assumed. 3 For details on magnetometer current consumption calculation refer to chapter 4.2.1 and 4.2.2. 2 BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor ODR=10Hz High accuracy preset Nominal VDD supplies TA=25C, ODR=20Hz Nominal VDD/VDDIO supplies, TA=25C In measurement phase Nominal VDD supplies TA=25C Only during measurement phase Nominal VDDIO supplies TA=25C from OFF to Suspend; time starts when VDD>1.5V and VDDIO>1.1V from Suspend to sleep IDD,ha,m Supply Current in Suspend Mode Peak supply current in Active Mode IDDsm,m Peak logic supply current in active mode IDDIOpk,m POR time tw_up,m Start-Up Time ts_up,m IDDpk,m Page 7 4.9 mA 1 3 A 18 20 mA A 210 270 1.0 ms 3.0 ms Typ 0.3 Max Unit T 1.2 Magnetometer output signal specification MAGNETOMETER OUTPUT SIGNAL 4 Parameter Device Resolution Gain error4 Symbol Dres,m Condition TA=25C Min Gerr,m 2 5 % Sensitivity Temperature Drift TCSm 0.01 0.03 %/K Zero-B offset OFFm After API compensation TA=25C Nominal VDD supplies After API compensation -40C TA +85C Nominal VDD supplies TA=25C 40 T Zero-B offset OFFm,cal After software 2 T Definition: gain error = ( (measured field after API compensation) / (applied field) ) - 1 BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor ODR (data output rate), normal mode ODR (data output rate), forced mode Full-scale Nonlinearity Output Noise odrlp calibration with Bosch Sensortec eCompass software5 -40C TA +85C Low power preset odrrg Regular preset odreh odrha Enhanced regular preset High accuracy preset odrlp Low power preset 0 >300 Hz odrrg Regular preset 0 100 Hz odreh 0 60 Hz odrha Enhanced regular preset High accuracy preset 0 20 Hz NLm, FS best fit straight line 1 %FS nrms,lp,m,xy Low power preset x, y-axis, TA=25C Nominal VDD supplies Low power preset z-axis, TA=25C Nominal VDD supplies Regular preset TA=25C Nominal VDD supplies 1.0 T 1.4 T 0.6 T Enhanced regular preset TA=25C Nominal VDD supplies High accuracy preset TA=25C Nominal VDD supplies TA=25C Nominal VDD supplies 0.5 T 0.3 T 0.5 T/V nrms,lp,m,z nrms,rg,m nrms,eh,m nrms,ha,m Power Supply Rejection Rate Page 8 PSRRm 10 9.2 10 Hz 10.8 Hz 10 Hz 20 Hz 5 Magnetic zero-B offset assuming calibration with Bosch Sensortec eCompass software. Typical value after applying calibration movements containing various device orientations (typical device usage). BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 9 2. Absolute maximum ratings The absolute maximum ratings are provided in Table 2. At or above these maximum ratings operability is not given. The specification limits in Chapter 1 only apply under normal operating conditions. Table 2: Absolute maximum ratings Parameter Condition Min Max Unit VDD Pin VDDIO Pin -0.3 -0.3 4.0 4.0 V V Voltage at any Logic Pad Non-Supply Pin -0.3 V Operating Temperature, TA Passive Storage Temp. Range None-volatile memory (NVM) Data Retention Mechanical Shock according to JESD22-B111.... Active operation 65% rel. H. T = 85C -40 -50 10 VDDIO + 0.3 +85 +150 Voltage at Supply Pin ESD Magnetic field Duration 200s Duration 1.0ms Free fall onto hard surfaces HBM, at any Pin CDM Any direction 10,000 2,000 1.8 2 500 >7 C C year g g m kV V T Note: Stress above these limits may cause damage to the device. Exceeding the specified limits may affect the device reliability or cause malfunction. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 10 3. Block diagram Figure 1 shows the basic building blocks of the BMM150: VDD Voltage regulator X FlipCore element Y FlipCore element VDDIO Voltage reference FlipCore Drive & Sense ADC Logic Hall Plate Z Hall plate Drive & Sense OSC POR NVM I n t e r f a c e PS INT DRDY SDI SDO SCK CSB GND Figure 1: Block diagram of BMM150 BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 11 4. Functional description BMM150 is a triaxial standalone geomagnetic sensor (Sensing element and ASIC) in chip scale wafer level package and can be operated via I2C or SPI as a slave device. 4.1 Power management The BMM150 has two distinct power supply pins: * VDD is the main power supply for all internal analog and digital functional blocks; * VDDIO is a separate power supply pin, used for the supply of the digital interface as well as the digital logic. The device can be completely switched off (VDD = 0V) while keeping the VDDIO supply on (VDDIO > 0V) or vice versa. It is absolutely prohibited to keep any interface at a logical high level when VDDIO is switched off. Such a configuration will permanently damage the device (i.e. if VDDIO = 0 [SDI & SDO & SCK & CSB] high). The device contains a power on reset (POR) generator. It resets the logic part and the register values of the concerned ASIC after powering-on VDD and VDDIO. Please note, that all application specific settings which are not equal to the default settings (refer to register maps in chapter 5.2), must be re-set to its designated values after POR. In case the IC interface is used, a direct electrical connection between VDDIO supply and the PS pin is recommended in order to ensure reliable protocol selection. 4.2 Power modes The BMM150 features configurable power modes. The BMM150 magnetometer part has four power modes:In the following chapters, power modes are described. 4.2.1 Power off mode In Power off mode, VDD and/or VDDIO are unpowered and the device does not operate. When only one of VDD or VDDIO is supplied, the magnetic sensor will still be in Power off mode. Power on reset is performed after both VDD and VDDIO raised above their detection thresholds. 4.2.2 Suspend mode Suspend mode is the default power mode of BMM150 after the chip is powered. When VDD and VDDIO are turned on the POR (power on reset) circuits operate and the device's registers are initialized. After POR becomes inactive, a start up sequence is executed. In this sequence NVM content is downloaded to shadow registers located in the device core. After the start up sequence the device is put in the Suspend mode. In this mode only registers which store power control bit information and SPI3 wire enable can be accessed by the user. No other registers can be accessed in Suspend mode. All registers lose their content, except the control register (0x4B). In particular, in this mode a Chip ID read (register 0x40) returns "0x00" (IC) or high-Z (SPI). BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 12 4.2.3 Sleep mode The user puts device from suspend into Sleep mode by setting the Power bit to "1", or from active modes (normal or forced) by setting OpMode bits to "11". In this state the user has full access to the device registers. In particular, the Chip ID can be read. Setting the power control bit to "0" (register 0x4B bit0) will bring the device back into Suspend mode. From the Sleep mode the user can put the device back into Suspend mode or into Active mode. 4.2.4 Active mode The device can switch into Active mode from Sleep mode by setting OpMode bits (register 0x4C). In this mode the magnetic field measurements are performed and all registers are accessible. In active mode, two operation modes can be distinguished: Normal mode: selected channels are periodically measured according to settings set in user registers. After measurements are completed, output data is put into data registers and the device waits for the next measurement period, which is set by programmed output data rate (ODR). From normal mode, the user can return to sleep mode by setting OpMode to "11" or by performing a soft reset (see chapter 5.6). Suspend mode can be entered by setting power control bit to "0". Forced mode (single measurement): When set by the host, the selected channels are measured according to settings programmed in user registers. After measurements are completed, output data is put into data registers, OpMode register value returns to "11" and the device returns to sleep mode. The forced mode is useful to achieve synchronized operation between host microcontroller and BMM150. Also, different data output rates from the ones selectable in normal mode can be achieved using forced mode. Figure 2: Magnetometer power mode transition diagram In Active Mode and normal operation, in principle any desired balance between output noise and active time (hence power consumption) can be adjusted by the repetition settings for x/yaxis and z-axis and the output data rate ODR. The average power consumption depends on the ratio of high current phase time (during data acquisition) and low current phase time (between data acquisitions). Hence, the more repetitions are acquired to generate one magnetic field data BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 13 point, the longer the active time ratio in one sample phase, and the higher the average current. Thanks to longer internal averaging, the noise level of the output data reduces with increasing number of repetitions. By using forced mode, it is possible to trigger new measurements at any rate. The user can therefore trigger measurements in a shorter interval than it takes for a measurement cycle to complete. If a measurement cycle is not allowed to complete, the resulting data will not be written into the data registers. To prevent this, the manually triggered measurement intervals must not be shorter than the active measurement time which is a function of the selected number of repetitions. The maximum selectable read-out frequency in forced mode can be calculated as follows: f max,ODR 1 145s nXY 500s nZ 980s Hereby nXY is the number of repetitions on X/Y-axis (not the register value) and nZ the number of repetitions on Z-axis (not the register value) (see description of XY_REP and Z_REP registers in chapter 5). Although the repetition numbers for X/Y and Z axis and the ODR can be adjusted independently and in a wide range, there are four recommended presets (High accuracy preset, Enhanced regular preset, Regular preset, Low power preset) which reflect the most common usage scenarios, i.e. required output accuracy at a given current consumption, of the BMM150. The four presets consist of the below register configurations, which are automatically set by the BMM150 API or driver provided by Bosch Sensortec when a preset is selected. Table 3 shows the recommended presets and the resulting magnetic field output noise and current consumption: Table 3: Recommended presets for repetitions and output data rates: Preset Rep. X/Y Rep. Z recommended ODR nXY nZ [Hz] Max ODR in forced mode fmax,OD R RMS Noise x/y/z [T] [Hz] Low power preset Regular preset Enhanced regular preset High accuracy preset Average current consumption at recommended ODR [mA] 3 3 10 >300 1.0/1.0/1.4 0.17 9 15 10 100 0.6/0.6/0.6 0.5 15 27 10 60 0.5/0.5/0.5 0.8 47 83 20 20 0.3/0.3/0.3 4.9 BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 14 4.3 Sensor output data 4.3.1 Magnetic field data The representation of magnetic field data is different between X/Y-axis and Z-axis. The width of X- and Y-axis magnetic field data is 13 bits each and stored in two's complement. DATAX_LSB (0x42) contains 5-bit LSB part [4:0] of the 13 bit output data of the X-channel. DATAX_MSB (0x43) contains 8-bit MSB part [12:5] of the 13 bit output data of the X-channel. DATAY_LSB (0x44) contains 5-bit LSB part [4:0] of the 13 bit output data of the Y-channel. DATAY_MSB (0x45) contains 8-bit MSB part [12:5] of the 13 bit output data of the Y-channel. The width of the Z-axis magnetic field data is 15 bit word stored in two's complement. DATAZ_LSB (0x46) contains 7-bit LSB part [6:0] of the 15 bit output data of the Z-channel. DATAZ_MSB (0x47) contains 8-bit MSB part [14:7] of the 15 bit output data of the Z-channel. For all axes, temperature compensation on the host is used to get ideally matching sensitivity over the full temperature range. The temperature compensation is based on a resistance measurement of the hall sensor plate. The resistance value is represented by a 14 bit unsigned output word. RHALL_LSB (0x48) contains 6-bit LSB part [5:0] of the 14 bit output data of the RHALLchannel. RHALL_MSB (0x49) contains 8-bit MSB part [13:6] of the 14 bit output data of the RHALLchannel. All signed register values are in twos complement representation. Bits which are marked "reserved" can have different values or can in some cases not be read at all (read will return 0x00 in IC mode and high-Z in SPI mode). Data register readout and shadowing is implemented as follows: After all enabled axes have been measured; complete data packages consisting of DATAX, DATAY, DATAZ and RHALL are updated at once in the data registers. This way, it is prevented that a following axis is updated while the first axis is still being read (axis mix-up) or that MSB part of an axis is updated while LSB part is being read. While reading from any data register, data register update is blocked. Instead, incoming new data is written into shadow registers which will be written to data registers after the previous read sequence is completed (i.e. upon stop condition in IC mode, or CSB going high in SPI mode, respectively). Hence, it is recommended to read out at all data at once (0x42 to 0x49 or 0x4A if status bits are also required) with a burst read. Single bytes or axes can be read out, while in this case it is not assured that adjacent registers are not updated during readout sequence. The "Data ready status" bit (register 0x48 bit0) is set "1" when the data registers have been updated but the data was not yet read out over digital interface. Data ready is cleared (set "0") directly after completed read out of any of the data registers and subsequent stop condition (IC) or lifting of CSB (SPI). In addition, when enabled the "Data overrun" bit (register 0x4A bit7) turns "1" whenever data registers are updated internally, but the old data was not yet read out over digital interface (i.e. data ready bit was still high). The "Data overrun" bit is cleared when the interrupt status register 0x4A is read out. This function needs to be enabled separately by setting the "Data overrun En" bit (register 0x4D bit7)). BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 15 Note: Please also see chapter 5 for detailed register descriptions. 4.3.2 Magnetic field data temperature compensation The raw register values DATAX, DATAY, DATAZ and RHALL are read out from the host processor using the BMM150 API/driver which is provided by Bosch Sensortec. The API/driver performs an off-chip temperature compensation and outputs x/y/z magnetic field data in 16 LSB/T to the upper application layer: Software application level a Software driver level Application Temperature and sensitivity compensated magnetic field data x/y/z available in: Config - short int (16 LSB/T, limited Z range) - long int (16 LSB/T) - float (T) BMM150 API / driver (provided by Bosch Sensortec) Config Hardware level Magnetometer raw register data (DATAX, DATAY, DATAZ, RHALL) BMM150 sensor Figure 3: Calculation flow of magnetic field data from raw BMM150 register data The API/driver performs all calculations using highly optimized fixed-point C-code arithmetic. For platforms that do not support C code, a floating-point formula is available as well. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 16 4.4 Self-test BMM150 supports two self-tests modes: Normal self-test and advanced self-test. 4.4.1 Normal self test During normal self-test, the following verifications are performed: FlipCore signal path is verified by generating signals on-chip. These are processed through the signal path and the measurement result is compared to known thresholds. FlipCore (X and Y) connection to ASIC are checked for connectivity and short circuits Hall sensor connectivity is checked for open and shorted connections Hall sensor signal path and hall sensor element offset are checked for overflow. To perform a self test, the sensor must first be put into sleep mode (OpMode = "11"). Self-test mode is then entered by setting the bit "Self test" (register 0x4C bit0) to "1". After performing self test, this bit is set back to "0". When self-test is successful, the corresponding self-test result bits are set to "1" ("X-Self-Test" register 0x42 bit0, "Y-Self-Test" register 0x44 bit0, "Z-Self-Test" register 0x46 bit0). If self-test fails for an axis, the corresponding result bit returns "0". 4.4.2 Advanced self test Advanced self test performs a verification of the Z channel signal path functionality and sensitivity. An on-chip coil wound around the hall sensor can be driven in both directions with a calibrated current to generate a positive or negative field of around 100 T. Advanced self test is an option that is active in parallel to the other operation modes. The only difference is that during the active measurement phase, the coil current is enabled. The recommended usage of advanced self test is the following: 1. Set sleep mode 2. Disable X, Y axis 3. Set Z repetitions to desired level 4. Enable positive advanced self test current 5. Set forced mode, readout Z and R channel after measurement is finished 6. Enable negative advanced self test current 7. Set forced mode, readout Z and R channel after measurement is finished 8. Disable advanced self test current (this must be done manually) 9. Calculate difference between the two compensated field values. This difference should be around 200 T with some margins. 10. Perform a soft reset of manually restore desired settings Please refer to the corresponding application note for the exact thresholds to evaluate advanced self-test. The table below describes how the advanced self-test is controlled: BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 17 Table 4: Magnetometer advanced self-test control (0x4C) Adv.ST <1:0> 00b 01b 10b 11b Configuration Normal operation (no self-test), default Reserved, do not use Negative on-chip magnetic field generation Positive on-chip magnetic field generation The BMM150 API/driver provided by Bosch Sensortec provides a comfortable way to perform both self-tests and to directly obtain the result without further calculations. It is recommended to use this as a reference. 4.5 Non-volatile memory Some of the memory of the BMM150 magnetometer is non-volatile memory (NVM). This NVM is pre-programmed in Bosch Sensortec fabrication line and cannot be modified afterwards. It contains trimming data which are required for sensor operation and sensor data compensation, thus it is read out by the BMM150 API/driver during initialization. 4.6 Magnetometer interrupt controller Four magnetometer based interrupt engines are integrated in the BMM150: Low-Threshold, High-Threshold, Overflow and Data Ready (DRDY). Each interrupt can be enabled independently. When enabled, an interrupt sets the corresponding status bit in the interrupt status register (0x4A) when its condition is satisfied. When the "Interrupt Pin Enable" bit (register 0x4E bit6) is set, any occurring activated interrupts are flagged on the BMM150's INT output pin. By default, the interrupt pin is disabled (high-Z status). Low-Threshold, High-Threshold and Overflow interrupts are mapped to the INT pin when enabled, Data Ready (DRDY) interrupt is mapped to the DRDY pin of BMM150 when enabled. For High- and Low-Threshold interrupts each axis X/Y/Z can be enabled separately for interrupt detection in the registers "High Int Z en", "High Int Y en", "High Int X en", "Low Int Z en", "Low Int Y En" and "Low Int X En" in register 0x4D bit5-bit0. Overflow interrupt is shared for X, Y and Z axis. When the "Data Ready Pin En" bit (register 0x4E bit7) is set, the Data Ready (DRDY) interrupt event is flagged on the BMM150's DRDY output pin (by default the "Data Ready Pin En" bit is not set and DRDY pin is in high-Z state). The interrupt status registers are updated together with writing new data into the magnetic field data registers. The status bits for Low-/High-Threshold interrupts are located in register 0x4A, the Data Ready (DRDY) status flag is located at register 0x48 bit0. If an interrupt is disabled, all active status bits and pins are reset after the next measurement was performed. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 18 4.6.1 General features An interrupt is cleared depending on the selected interrupt mode, which is common to all interrupts. There are two different interrupt modes: non-latched and latched. All interrupts (except Data Ready) can be latched or non-latched. Data Ready (DRDY) is always cleared after readout of data registers ends. A non-latched interrupt will be cleared on a new measurement when the interrupt condition is not valid anymore, whereas a latched interrupt will stay high until the interrupts status register (0x4A) is read out. After reading the interrupt status, both the interrupt status bits and the interrupt pin are reset. The mode is selected by the "Interrupt latch" bit (register 0x4A bit1), where the default setting of "1" means latched. Figure 4 shows the difference between the modes for the example Low-Threshold interrupt. INT and DRDY pin polarity can be changed by the "Interrupt polarity" bit (register 0x4E bit0) and "DR polarity" (register 0x4E bit2), from the default high active ("1") to low active ("0"). Low threshold a a measurements INT pin (non-latched) INT pin (latched) Readings of interrupt status register (0x4A) Figure 4: Interrupt latched and non-latched mode 4.6.2 Electrical behavior of magnetic interrupt pins Both interrupt pins INT and DRDY are push/pull when the corresponding interrupt pin enable bit is set, and are floating (High-Z) when the corresponding interrupt pin enable bit is disabled (default). BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 19 4.6.3 Data ready / DRDY interrupt This interrupt serves for synchronous reading of magnetometer data. It is generated after storing a new set of values (DATAX, DATAY, DATAZ, RHALL) in the data registers: Active measurement time Inactive time Data write into output registers Preset time Measurement Measurement Data Dataprocessing processing DRDY ='1 ' Measurement phase start Data readout Figure 5: Data acquisition and DRDY operation (DRDY in "high active" polarity) The interrupt mode of the Data Ready (DRDY) interrupt is fixed to non-latched. It is enabled (disabled) by writing "1" ("0") to "Data Ready pin En" in register 0x4E bit7. DRDY pin polarity can be changed by the "DR polarity" bit (register 0x4E bit2), from the default high active ("1") to low active ("0"). 4.6.4 Low-threshold interrupt When the data registers' (DATAX, DATAY and DATAZ) values drop below the threshold level defined by the "Low Threshold register (0x4F), the corresponding interrupt status bits for those axes are set ("Low Int X", "Low Int Y" and "Low Int Z" in register 0x4A). This is done for each axis independently. Please note that the X and Y axis value for overflow is -4096. However, no interrupt is generated on these values. See chapter 4.6.6 for more information on overflow. Hereby, one bit in "Low Threshold" corresponds to roughly 6T (not exactly, as the raw magnetic field values DATAX, DATAY and DATAZ are not temperature compensated). The Low-threshold interrupt is issued on INT pin when one or more values of the data registers DATAX, DATAY and DATAZ drop below the threshold level defined by the "Low Threshold" register (0x4F), and when the axis where the threshold was exceeded is enabled for interrupt generation: Result = (DATAX < "Low Threshold" x 16) AND "Low Int X en" is "0" OR (DATAY < "Low Threshold" x 16) AND "Low Int Y en" is "0" OR (DATAZ < "Low Threshold" x 16) AND "Low Int Z en" is "0" Note: Threshold interrupt enable bits ("Low INT [XYZ] en") are active low and "1" (disabled) by default. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 20 Low threshold a a measurements INT pin (non-latched) INT pin (latched) Read interrupt status register (0x4A) Figure 6: Low-threshold interrupt function BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 21 4.6.5 High-threshold interrupt When the data registers' (DATAX, DATAY and DATAZ) values exceed the threshold level defined by the "High Threshold register (0x50), the corresponding interrupt status bits for those axes are set ("High Int X", "High Int Y" and "High Int Z" in register 0x4A). This is done for each axis independently. Hereby, one bit in "High Threshold" corresponds to roughly 6T (not exactly, as the raw magnetic field values DATAX, DATAY and DATAZ are not temperature compensated). The High-threshold interrupt is issued on INT pin when one or more values of the data registers DATAX, DATAY and DATAZ exceed the threshold level defined by the "High Threshold" register (0x50), and when the axis where the threshold was exceeded is enabled for interrupt generation: Result = (DATAX > "High Threshold" x 16) AND "High Int X en" is "0" OR (DATAY > "High Threshold" x 16) AND "High Int Y en" is "0" OR (DATAZ > "High Threshold" x 16) AND "High Int Z en" is "0" Note: Threshold interrupt enable bits ("High INT [XYZ] en") are active low and "1" (disabled) by default. High threshold a a measurements INT pin (non-latched) INT pin (latched) Read interrupt status register (0x4A) Figure 7: High-threshold interrupt function 4.6.6 Overflow When a measurement axis had an overflow, the corresponding data register is saturated to the most negative value. For X and Y axis, the data register is set to the value -4096. For the Z axis, the data register is set to the value -16384. The "Overflow" flag (register 0x4A bit6) indicates that the measured magnetic field raw data of one or more axes exceeded maximum range of the device. The overflow condition can be flagged on the INT pin by setting the bit "overflow int enable" (register 0x4D bit6, active high, default value "0"). The channel on which overflow occurred can by determined by assessing the DATAX/Y/Z registers. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 22 5. Register Description 5.1 General Remarks The entire communication with the device's magnetometer part is performed by reading from and writing to registers. Registers have a width of 8 bits; they are mapped to a common space of 50 addresses from (0x40) up to (0x71). Within the used range there are several registers which are marked as `reserved'. Any reserved bit is ignored when it is written and no specific value is guaranteed when read. Especially, in SPI mode the SDO pin may stay in high-Z state when reading some of these registers. Registers with addresses from (0x40) up to (0x4A) are read-only. Any attempt to write to these registers is ignored. 5.2 Register map Register Address 0x71 0x70 0x6F 0x6E 0x6D 0x6C 0x6B 0x6A 0x69 0x68 0x67 0x66 0x65 0x64 0x63 0x62 0x61 0x60 0x5F 0x5E 0x5D 0x5C 0x5B 0x5A 0x59 0x58 0x57 0x56 0x55 0x54 0x53 0x52 0x51 0x50 0x4F 0x4E 0X4D 0x4C 0x4B 0x4A 0x49 0x48 0x47 0x46 0x45 0x44 0x43 0x42 0x41 0x40 Default Value N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A 0x00 0x00 0x00 0x00 0x07 0x3F 0x06 0x01 0x00 N/A N/A N/A N/A N/A N/A N/A N/A N/A 0x32 bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0 reserved Data Ready Pin En Interrupt Pin En Overflow Int En Data Overrun En Adv. ST [1:0] Soft Reset '1' fixed '0' Data Overrun Overflow REPZ Number Of Repetitions (valid for Z) [7:0] REPXY Number Of Repetitions (valid for XY) [7:0] High Threshold [7:0] Low Threshold [7:0] Channel Z Channel Y Channel X High Int Z en High Int Y en High Int X en Data Rate [2:0] fixed '0' fixed '0' fixed '0' High Int Z High Int Y High Int X RHALL [13:6] MSB RHALL [5:0] LSB DATA Z [14:7] MSB DATA Z [6:0] LSB DATA Y [12:5] MSB DATA Y [4:0] LSB DATA X [12:5] MSB DATA X [4:0] LSB reserved Chip ID = 0x32 (can only be read if power control bit ="1") DR Polarity Interrupt Latch Low Int Z en Low Int Y en Opmode [1:0] SPI3en Soft Reset '1' Low Int Z Low Int Y Interrupt Polarity Low Int X en Self Test Power Control Bit Low Int X fixed '0' Data Ready Status fixed '0' fixed '0' Y-Self-Test fixed '0' fixed '0' X-Self-Test Z-Self-Test w/r w/r accessible in suspend mode read only reserved BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 23 5.3 Chip ID Register (0x40) Chip ID contains the magnetometer chip identification number, which is 0x32. This number can only be read if the power control bit (register 0x4B bit0) is enabled. Table 5: Chip identification number, register (0x40) Bit 7 0 Bit 6 0 Bit 5 1 Bit 4 1 Bit 3 0 Bit 2 0 Bit 1 1 Bit 0 0 Register (0x41) is reserved 5.4 Magnetic field data Register (0x42) contains the LSB part of x-axis magnetic field data and the self-test result flag for the x-axis. Table 6: LSB part of x-axis magnetic field, register (0x42) (0x42) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name DATAX_lsb <4> DATAX_lsb <3> DATAX_lsb <2> DATAX_lsb <1> DATAX_lsb <0> SelfTestX Description Bit 4 of x-axis magnetic field data Bit 3 of x-axis magnetic field data Bit 2 of x-axis magnetic field data Bit 1 of x-axis magnetic field data Bit 0 of x-axis magnetic field data = x LSB (fixed to 0) (fixed to 0) Self-test result flag for x-axis, default is "1" Register (0x43) contains the MSB part of x-axis magnetic field data. Table 7: MSB part of x-axis magnetic field, register (0x43) (0x43) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name DATAX_msb <12> DATAX_msb <11> DATAX_msb <10> DATAX_msb <9> DATAX_msb <8> DATAX_msb <7> DATAX_msb <6> DATAX_msb <5> BST-BMM150-DS001-01 | Revision 1.0 | April 2013 Description Bit 12 of x-axis magnetic field data = x MSB Bit 11 of x-axis magnetic field data Bit 10 of x-axis magnetic field data Bit 9 of x-axis magnetic field data Bit 8 of x-axis magnetic field data Bit 7 of x-axis magnetic field data Bit 6 of x-axis magnetic field data Bit 5 of x-axis magnetic field data 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 24 Register (0x44) contains the LSB part of y-axis magnetic field data and the self-test result flag for the y-axis. Table 8: LSB part of y-axis magnetic field, register (0x44) (0x44) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name DATAY_lsb <4> DATAY_lsb <3> DATAY_lsb <2> DATAY_lsb <1> DATAY_lsb <0> SelfTestY Description Bit 4 of y-axis magnetic field data Bit 3 of y-axis magnetic field data Bit 2 of y-axis magnetic field data Bit 1 of y-axis magnetic field data Bit 0 of y-axis magnetic field data = y LSB (fixed to 0) (fixed to 0) Self-test result flag for y-axis, default is "1" Register (0x45) contains the MSB part of y-axis magnetic field data. Table 9: MSB part of y-axis magnetic field, register (0x45) (0x45) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name DATAY_msb <12> DATAY_msb <11> DATAY_msb <10> DATAY_msb <9> DATAY_msb <8> DATAY_msb <7> DATAY_msb <6> DATAY_msb <5> Description Bit 12 of y-axis magnetic field data = y MSB Bit 11 of y-axis magnetic field data Bit 10 of y-axis magnetic field data Bit 9 of y-axis magnetic field data Bit 8 of y-axis magnetic field data Bit 7 of y-axis magnetic field data Bit 6 of y-axis magnetic field data Bit 5 of y-axis magnetic field data Register (0x46) contains the LSB part of z-axis magnetic field data and the self-test result flag for the z-axis. Table 10: LSB part of z-axis magnetic field, register (0x46) (0x46) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name DATAZ_lsb <6> DATAZ_lsb <5> DATAZ_lsb <4> DATAZ_lsb <3> DATAZ_lsb <2> DATAZ_lsb <1> DATAZ_lsb <0> SelfTestZ BST-BMM150-DS001-01 | Revision 1.0 | April 2013 Description Bit 6 of z-axis magnetic field data Bit 5 of z-axis magnetic field data Bit 4 of z-axis magnetic field data Bit 3 of z-axis magnetic field data Bit 2 of z-axis magnetic field data Bit 1 of z-axis magnetic field data Bit 0 of z-axis magnetic field data = z LSB Self-test result flag for z-axis, default is "1" 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 25 Register (0x47) contains the MSB part of z-axis magnetic field data. Table 11: MSB part of z-axis magnetic field, register (0x47) (0x47) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name DATAZ_msb <14> DATAZ_msb <13> DATAZ_msb <12> DATAZ_msb <11> DATAZ_msb <10> DATAZ_msb <9> DATAZ_msb <8> DATAZ_msb <7> Description Bit 14 of y-axis magnetic field data = z MSB Bit 13 of y-axis magnetic field data Bit 12 of y-axis magnetic field data Bit 11 of y-axis magnetic field data Bit 10 of y-axis magnetic field data Bit 9 of y-axis magnetic field data Bit 8 of y-axis magnetic field data Bit 7 of y-axis magnetic field data Register (0x48) contains the LSB part of hall resistance and the Data Ready (DRDY) status bit. Table 12: LSB part of hall resistance, register (0x48) (0x48) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name RHALL_lsb <5> RHALL_lsb <4> RHALL_lsb <3> RHALL_lsb <2> RHALL_lsb <1> RHALL_lsb <0> Data Ready Status Description Bit 5 of hall resistance Bit 4 of hall resistance Bit 3 of hall resistance Bit 2 of hall resistance Bit 1 of hall resistance Bit 0 of hall resistance = RHALL LSB (fixed to 0) Data ready (DRDY) status bit Register (0x49) contains the MSB part of hall resistance. Table 13: MSB part of hall resistance, register (0x49) (0x49) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name RHALL_msb <13> RHALL_msb <12> RHALL_msb <11> RHALL_msb <10> RHALL_msb <9> RHALL_msb <8> RHALL_msb <7> RHALL_msb <6> BST-BMM150-DS001-01 | Revision 1.0 | April 2013 Description Bit 13 of hall resistance = RHALL MSB Bit 12 of hall resistance Bit 11 of hall resistance Bit 10 of hall resistance Bit 9 of hall resistance Bit 8 of hall resistance Bit 7 of hall resistance Bit 6 of hall resistance 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 26 5.5 Interrupt status register Register (0x4A) contains the states of all interrupts. Table 14: Interrupt status, register (0x4A) (0x4A) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name Data overrun Overflow High Int Z High Int Y High Int X Low Int Z Low Int Y Low Int X Description Data overrun status flag Overflow status flag High-Threshold interrupt z-axis status flag High-Threshold interrupt y-axis status flag High-Threshold interrupt x-axis status flag Low-Threshold interrupt z-axis status flag Low-Threshold interrupt y-axis status flag Low-Threshold interrupt x-axis status flag 5.6 Power and operation modes, self-test and data output rate control registers Register (0x4B) contains control bits for power control, soft reset and interface SPI mode selection. This special control register is also accessible in suspend mode. Soft reset is executed when both bits (register 0x4B bit7 and bit1) are set "1". Soft reset does not execute a full POR sequence, but all registers are reset except for the "trim" registers above register 0x54 and the power control register (0x4B). Soft reset always brings the device into sleep mode. When device is in the suspend mode, soft reset is ignored and the device remains in suspend mode. The two "Soft Reset" bits are reset to "0" automatically after soft reset was completed. To perform a full POR reset, bring the device into suspend and then back into sleep mode. When SPI mode is selected, the "SPI3En" bit enables SPI 3-wire mode when set "1". When "SPI3En" is set "0" (default), 4-wire SPI mode is selected. Setting the "Power Control bit" to "1" brings the device up from Suspend mode to Sleep mode, when "Power Control bit" is set "0" the device returns to suspend mode (see chapter 4.2 for details of magnetometer power modes). Table 15: Power control, soft reset and SPI mode control register (0x4B) (0x4B) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name Soft Reset `1' SPI3en Soft Reset `1' Power Control bit BST-BMM150-DS001-01 | Revision 1.0 | April 2013 Description One of the soft reset trigger bits. (fixed to 0) (fixed to 0) (fixed to 0) (fixed to 0) Enable bit for SPI3 mode One of the soft reset trigger bits. When set to "0", suspend mode is selected 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 27 Register (0x4C) contains control bits for operation mode, output data rate and self-test. The two "Adv. ST" bits control the on-chip advanced self-test (see chapter 4.4.2 for details of the magnetometer advanced self-test). The three "Data rate" bits control the magnetometer output data rate according to below Table 17. The two "Opmode" bits control the operation mode according to below Table 18 (see chapter 4.2 for a detailed description of magnetometer power modes). Table 16: Operation mode, output data rate and self-test control register (0x4C) (0x4C) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name Adv. ST <1> Adv. ST <0> Data rate <2> Data rate <1> Data rate <0> Opmode <1> Opmode <0> Self Test Description Advanced self-test control bit 1 Advanced self-test control bit 0 Data rate control bit 2 Data rate control bit 1 Data rate control bit 0 Operation mode control bit 1 Operation mode control bit 0 Normal self-test control bit Three "Data rate" bits control the output data rate (ODR) of the BMM150 magnetometer part: Table 17: Output data rate (ODR) setting (0x4C) (0x4C) Data rate <2:0> 000b 001b 010b 011b 100b 101b 110b 111b Magnetometer output data rate (ODR) [Hz] 10 (default) 2 6 8 15 20 25 30 Two "Opmode" bits control the operation mode of the BMM150 magnetometer part: Table 18: Operation mode setting (0x4C) (0x4C) Opmode <1:0> 00b 01b 10b 11b 6 Magnetometer operation mode6 Normal mode Forced mode Reserved, do not use Sleep Mode See chapter 4.2 for a detailed description of magnetometer power modes. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 28 5.7 Interrupt and axis enable settings control registers Register (0x4D) contains control bits for interrupt settings. (Also refer to chapter 4.6 for the details of magnetometer interrupt operation). Table 19: Interrupt settings control register (0x4D) (0x4D) Bit Bit 7 Name Data Overrun En Bit 6 Overflow Int En Bit 5 High Int Z En Bit 4 High Int Y En Bit 3 High Int X En Bit 2 Low Int Z En Bit 1 Low Int Y En Bit 0 Low Int X En BST-BMM150-DS001-01 | Revision 1.0 | April 2013 Description Enables data overrun indication in the "Data Overrun" flag (active high, default is "0" disabled) Activates mapping of Overflow flag status to the INT pin (active high, default is "0" disabled) Enables the z-axis detection for High-Threshold interrupts (active low, default is "1" disabled) Enables the y-axis detection for High-Threshold interrupts (active low, default is "1" disabled) Enables the x-axis detection for High-Threshold interrupts (active low, default is "1" disabled) Enables the z-axis detection for Low-Threshold interrupts (active low, default is "1" disabled) Enables the y-axis detection for Low-Threshold interrupts (active low, default is "1" disabled) Enables the x-axis detection for Low-Threshold interrupts (active low, default is "1" disabled) 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 29 Register (0x4E) contains control bits interrupt settings and axes enable bits. (Also refer to chapter 0 for the details of magnetometer interrupt operation). If a magnetic measurement channel is disabled, its last measured magnetic output values will remain in the data registers. If the Z channel is disabled, the resistance measurement will also be disabled and the resistance output value will be set to zero. If interrupts are set to trigger on an axis that has been disabled, these interrupts will still be asserted based on the last measured value. Table 20: Interrupt settings and axes enable bits control register (0x4E) (0x4E) Bit Name Bit 7 Data Ready Pin En Bit 6 Interrupt Pin En Bit 5 Channel Z Bit 4 Channel Y Bit 3 Channel X Bit 2 DR Polarity Bit 1 Interrupt Latch Bit 0 Interrupt Polarity Description Enables data ready status mapping on DRDY pin (active high, default is "0" disabled) Enables interrupt status mapping on INT pin (active high, default is "0" disabled) Enable z-axis and resistance measurement (active low, default is "0" enabled) Enable y-axis (active low, default is "0" enabled) Enable x-axis (active low, default is "0" enabled) Data ready (DRDY) pin polarity ("0" is active low, "1" is active high, default is "1" active high) Interrupt latching ("0" means non-latched - interrupt pin is on as long as the condition is fulfilled, "1" means latched interrupt pin is on until interrupt status register 0x4A is read, default is `"1" latched) Interrupt pin INT polarity selection ("1" - is active high, "0" is active low, default is "1" active high) Register (0x4F) contains the Low-Threshold interrupt threshold setting. (Also refer to chapter 0 for the details of magnetometer interrupt operation and the threshold setting). Table 21: Low-threshold interrupt threshold setting control register (0x4F) (0x4F) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name LowThreshold <7> LowThreshold <6> LowThreshold <5> LowThreshold <4> LowThreshold <3> LowThreshold <2> LowThreshold <1> LowThreshold <0> BST-BMM150-DS001-01 | Revision 1.0 | April 2013 Description Bit 7 of Low-Threshold interrupt threshold setting Bit 6 of Low-Threshold interrupt threshold setting Bit 5 of Low-Threshold interrupt threshold setting Bit 4 of Low-Threshold interrupt threshold setting Bit 3 of Low-Threshold interrupt threshold setting Bit 2 of Low-Threshold interrupt threshold setting Bit 1 of Low-Threshold interrupt threshold setting Bit 0 of Low-Threshold interrupt threshold setting 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 30 Register (0x50) contains the High-Threshold interrupt threshold setting. (Also refer to chapter 0 for the details of magnetometer interrupt operation and the threshold setting). Table 22: High-threshold interrupt threshold setting control register (0x4F) (0x50) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name HighThreshold <7> HighThreshold <6> HighThreshold <5> HighThreshold <4> HighThreshold <3> HighThreshold <2> HighThreshold <1> HighThreshold <0> Description Bit 7 of High-Threshold interrupt threshold setting Bit 6 of High-Threshold interrupt threshold setting Bit 5 of High-Threshold interrupt threshold setting Bit 4 of High-Threshold interrupt threshold setting Bit 3 of High-Threshold interrupt threshold setting Bit 2 of High-Threshold interrupt threshold setting Bit 1 of High-Threshold interrupt threshold setting Bit 0 of High-Threshold interrupt threshold setting 5.8 Number of repetitions control registers Register (0x51) contains the number of repetitions for x/y-axis. Table 24 below shows the number of repetitions resulting out of the register configuration. The performed number of repetitions nXY can be calculated from unsigned register value as nXY = 1+2xREPXY as shown below, where b7-b0 are the bits 7 to 0 of register 0x51: nXY 1 2 (b 7 2 7 b 6 2 6 b 5 25 b 4 2 4 b 3 23 b 2 2 2 b1 21 b 0 2 0 ) 1 2 (REPXY ) Table 23: X/y-axis repetitions control register (0x51) (0x51) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name REPXY <7> REPXY <6> REPXY <5> REPXY <4> REPXY <3> REPXY <2> REPXY <1> REPXY <0> Description Bit 7 of number of repetitions (valid for XY) Bit 6 of number of repetitions (valid for XY) Bit 5 of number of repetitions (valid for XY) Bit 4 of number of repetitions (valid for XY) Bit 3 of number of repetitions (valid for XY) Bit 2 of number of repetitions (valid for XY) Bit 1 of number of repetitions (valid for XY) Bit 0 of number of repetitions (valid for XY) Table 24: Numbers of repetition for x/y-axis depending on value of register (0x51) (0x51) register value (binary) 00000000b 00000001b 00000010b 00000011b ... 11111111b (0x51) value (hex) register Number of repetitions for x- and y-axis each 0x00h 0x01h 0x02h 0x03h 0xFFh BST-BMM150-DS001-01 | Revision 1.0 | April 2013 1 3 5 7 ... 511 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 31 Register (0x52) contains the number of repetitions for z-axis. Table 26 below shows the number of repetitions resulting out of the register configuration. The performed number of repetitions nZ can be calculated from unsigned register value as nZ = 1+REPZ as shown below, where b7-b0 are the bits 7 to 0 of register 0x52: nZ 1 1 (b 7 27 b 6 26 b 5 25 b 4 24 b 3 23 b 2 22 b1 21 b 0 20 ) 1 REPZ Table 25: Z-axis repetitions control register (0x52) (0x52) Bit Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Name REPZ <7> REPZ <6> REPZ <5> REPZ <4> REPZ <3> REPZ <2> REPZ <1> REPZ <0> Description Bit 7 of number of repetitions (valid for Z) Bit 6 of number of repetitions (valid for Z) Bit 5 of number of repetitions (valid for Z) Bit 4 of number of repetitions (valid for Z) Bit 3 of number of repetitions (valid for Z) Bit 2 of number of repetitions (valid for Z) Bit 1 of number of repetitions (valid for Z) Bit 0 of number of repetitions (valid for Z) Table 26: Numbers of repetition for z-axis depending on value of register (0x52) (0x52) register value (binary) 00000000b 00000001b 00000010b 00000011b ... 11111111b (0x52) register value (hex) Number of repetitions for z-axis 0x00h 0x01h 0x02h 0x03h 1 2 3 4 ... 256 0xFFh BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 32 6. Digital interfaces The BMM150 supports SPI and IC digital interface protocols for communication as a slave with a host device. The active interface is selected by the state of the "protocol select" pin (PS): PS: "0" ("1") selects SPI (IC). By default, SPI operates in the standard 4-wire configuration. It can be re-configured by software to work in 3-wire mode instead of standard 4-wire mode. Both interfaces share the same pins. The mapping for each interface is given in the following table: Table 27: Mapping of the interface pins Pin# Name use w/ SPI use w/ IC Description C1 SDO SDO IC address selection B4 SDI SDI SDA A5 CSB CSB IC address selection SPI: Data Output (4-wire mode) IC: Used to set LSB of IC address SPI: Data Input (4-wire mode) Data Input / Output (3-wire mode) IC: Serial Data SPI: Chip Select (enable) IC: Used to set bit1 of IC address A3 SCK SCK SCL BST-BMM150-DS001-01 | Revision 1.0 | April 2013 SPI: Serial Clock IC: Serial Clock 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 33 The following table shows the electrical specifications of the interface pins: Table 28: Electrical specification of the interface pins Parameter Symbol Condition Min Typ Max Unit Pull-up Resistance CSB Rup, CSB Internal Pull-up Resistance to VDDIO; deactivated in IC mode 80 100 120 k Input Capacitance Cin 10 pF IC Bus Load Capacitance (max. drive capability) CI2C_Load 400 pF Max Unit 10 MHz 30 ns ns ns ns ns 40 ns 6.1 Serial peripheral interface (SPI) The timing specification for SPI of the BMM150 is given in the following table: Table 29: SPI timing for BMM150 Parameter Symbol Clock Frequency fSPI SCK Low Pulse SCK High Pulse SDI Setup Time SDI Hold Time tSCKL tSCKH tSDI_setup tSDI_hold SDO Output Delay tSDO_OD CSB Setup Time CSB Hold Time tCSB_setup tCSB_hold Condition Max. Load on SDI or SDO = 25pF Min 20 20 20 20 Load = 25pF Load = 250pF, VDDIO = 2.4V 20 40 ns ns The following figure shows the definition of the SPI timings given in Table 29: tCSB_setup tCSB_hold CSB SCK tSCKL tSCKH SDI SDO tSDI_setup tSDI_hold tSDO_OD Figure 8: SPI timing diagram BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 34 The SPI interface of the BMM150 is compatible with two modes, "00" and "11". The automatic selection between [CPOL = "0" and CPHA = "0"] and [CPOL = "1" and CPHA = "1"] is done based on the value of SCK after a falling edge of CSB. Two configurations of the SPI interface are supported by the BMM150: 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 (0x4B) "SPI3en" after power control bit was set. 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 BMM150 also supports multiple-byte read 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 Figure 9. During the entire write cycle SDO remains in high- impedance state. CSB SCK SDI R/W AD6 AD5 SDO AD4 AD3 AD2 AD1 AD0 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0 Z tri-state Figure 9: 4-wire basic SPI write sequence (mode "11") The basic read operation waveform for 4-wire configuration is depicted in Figure 10: BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 35 CS B SC K SD I R/W AD 6 AD5 A 4 D A 3 D A 2 D AD 1 AD 0 SD O DO 7 DO 6 DO 5 DO 4 DO 3 DO 2 Figure 10: 4-wire basic SPI read sequence (mode "11") DO 1 DO tr -stat 0 i e 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). 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 11: 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 11: 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. 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 waveform (read or write access) for 3-wire configuration is depicted in Figure 12: BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 36 CSB SCK SDI RW AD6 AD5 AD4 AD3 AD2 AD1 AD0 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0 Figure 12: 3-wire basic SPI read or write sequence (mode "11") 6.2 Inter-Integrated Circuit (IC) The IC bus uses SCL (= SCK pin, serial clock) and SDA (= SDI 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. The IC interface of the BMM150 is compatible with the IC Specification UM10204 Rev. 03 (19 June 2007), available at http://www.nxp.com. The BMM150 supports IC standard mode and fast mode, only 7-bit address mode is supported. The default IC address of the BMM150 is 0x10. The five MSB are hardwired to "00100". In order to prevent bus conflicts bit0 can be inverted by setting `1' to SDO, and the bit 1 can be inverted by setting `1' to the CSB line according to below Table: Table 30: BMM150 IC addresses CSB pin GND GND VDDIO VDDIO BST-BMM150-DS001-01 | Revision 1.0 | April 2013 SDO pin GND VDDIO GND VDDIO IC address 0x10 0x11 0x12 0x13 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 37 The timing specification for IC of the BMM150 is given in Table 31: Table 31: IC timings7. 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 7 Symbol fSCL tLOW tHIGH tSUDAT tHDDAT tSUSTA Condition Min Max 400 Unit kHz 1.3 0.6 0.1 0 0.6 s tHDSTA 0.6 tSUSTO 0.6 tBUF 1.3 fully compliant to the I2C specification"UM10204 I2C-bus specification Rev.03 - 19 June 2007" BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 38 Figure 13 the definition of the IC timings given in Table 31: S A D tBUF tf t LOW S L C tHIGH tHDDAT tr tHDSTA t SUDAT S A D tSUST A t SUSTO Figure 13: 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. ACK: 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 SCK toggling from logic "1" to logic "0") is not supported. If such a combination occurs, the STOP is not recognized by the device. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 39 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 (ACK = 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 0 0 1 0 0 Register adress (0x10) RW ACKS 0 0 0 Data byte 0 0 0 1 0 0 Data (0x09) ACKS 0 0 X X X X X ACKS Stop X X X P Figure 14: Example of an IC write access 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 (Sr). 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 (ACK = 0) to enable further data transfer. A NACKM (ACK = 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 in 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 in the BMM150. The WDT observes internal IC signals and resets the IC interface if the bus is locked-up. The activity and the timer period of the WDT is predefined with a default time period of 50 ms by factory trimming. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 40 Example of an IC multiple read accesses: Control byte dummy Slave Adress Start S 0 0 1 0 0 Register adress (0x02) RW ACKS 0 0 0 X 0 0 0 0 0 1 ACKS Stop P 0 Data byte Slave Adress Start Sr 0 0 1 0 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 Data byte X X X X X X X ... X Read Data (0x05) ACKM X X X ACKM X ... X Data byte Read Data (0x06) ... 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 15: Example of an IC multiple read access BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 41 7. Pin-out and connection diagram 7.1 Pin-out Figure 16 depicts the bump association. The arrows indicate the A1 marking. E VDD GND DRY GND CSB GND 5 SCK C GND 3 VDDIO E SDO D C 2 SCK 3 4 SDI 2 PS B 1 PS TOP VIEW (Bumps not visible) VDD GND A1 corner A VDDIO DRY INT B SDO INT 4 SDI BOTTOM VIEW (Bumps visible) D A GND CSB 5 1 A1 corner Figure 16: Pin-out bottom view, Pin-out top view Table 32: Pin description Pin Name I/O Type Description A1 D2 PS INT In Out Protocol select Interrupt output A5 CSB In Chip Select C5 E1 D4 GND GND DRDY Supply Supply Out Ground Ground Data ready C1 SDO Out SPI: Data out B4 SDI In/Out E3 GND Supply SPI: Data, IC: Data Ground E5 VDD Supply Supply voltage B2 A3 VDDIO SCK Supply In I/O voltage Serial clock BST-BMM150-DS001-01 | Revision 1.0 | April 2013 Connect to SPI 4W SPI 3W IC GND GND VDDIO INT input or DNC if unused GND for default CSB CSB address GND GND DRDY input or DNC if unused SDO / MISO DNC (float) GND for default address SDI / MOSI SDI/SDO SDA GND VDD SCK VDDIO SCK SCL 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 42 7.2 Connection diagram 4-wire SPI VDD E1 GND C1 SDO D2 INT INT E3 GND E5 VDD A1 PS B2 VDDIO TOP VIEW (balls not visible) D4 DRDY DRDY VDDIO SDO A3 SCK B4 SDI C5 GND C1 SCK SDI A5 CSB CSB C2 Figure 17: 4-wire SPI connection diagram Note: The recommended value for C1, C2 is 100 nF. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 43 7.3 Connection diagram 3-wire SPI VDD VDDIO E1 GND C1 SDO D2 INT INT E3 GND B2 VDDIO TOP VIEW (balls not visible) D4 DRDY DRDY E5 VDD A1 PS A3 SCK B4 SDI C5 GND C1 SCK SDI/SDO A5 CSB CSB C2 Figure 18: 3-wire SPI connection diagram Note: The recommended value for C1, C2 is 100 nF. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 44 7.4 Connection diagram I2C VDD IC address bit 0 GND: '0'; VDDIO: '1' E1 GND C1 SDO D2 INT INT1 E3 GND E5 VDD A1 PS B2 VDDIO TOP VIEW (balls not visible) D4 DRDY DRDY VDDIO A3 SCK SCL B4 SDI C5 GND SDA A5 CSB IC address bit 1 GND: '0'; VDDIO: '1' C2 C1 Figure 19: IC connection diagram Note: The recommended value for C1, C2 is 100 nF. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 45 8. Package Original drawing? 8.1 Outline dimensions The sensor housing is 12 pin chip scale wafer level package (1.56 x 1.56 x 0.6 mm3). Its dimensions are the following: D C GND 283 SCK E D C 283 2 283 GND SCK SDI DRY B A Bottom view (Bumps visible) 3 4 283 2 PS SDO VDDIO 283 3 283 GND 1 283 INT 283 283 VDDIO INT PS 283 283 SDO 400 283 35 283 4 1560 30 283 SDI GND A1 corner 1560 30 5 283 566 DRY A 1560 30 CSB 566 GND 283 VDD B 35 566 1560 30 12 x O250 E 566 VDD GND CSB 5 195 1 A1 corner TOP view (Bumps not visible) Side view Figure 20: Package outline dimensions in m BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 46 8.2 Sensing axes orientation The orientation of the device axes with respect to the applied field is shown in Figure 21. A remapping of the axes orientation is possible via API. N Y B X S z Figure 21: Orientation of sensing axes Please note that the planet's north pole is a magnetic south pole. This means that when the BMM150's X axis points towards the north pole, the measured field will be negative. Table 33: Output signals depending on sensor orientation upright upright 9. Sensor Orientation (magnetic vector ) Output Signal X Output Signal Y Output Signal Z BST-BMM150-DS001-01 | Revision 1.0 | April 2013 0 T -|B| T 0 T +|B| T 0 T 0 T -|B| T 0 T +|B| T 0 T 0 T 0 T 0 T 0 T 0 T 0 T +|B| T -|B| T 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 47 9.1 Android axes orientation The Android coordinate system is shown in Figure 22. The origin is in the lower-left corner with respect to the screen, with the X axis horizontal and pointing right, the Y axis vertical and pointing up and the Z axis pointing outside the front face of the screen. In this system, coordinates behind the screen have negative Z values. Figure 22: Android coordinate system Attitude terms are defined in the following way (see Figure 23): Heading / Azimuth - angle between the magnetic north direction and the Y axis, around the Z axis (0 to 360). 0 = North, 90 = East, 180 = South, 270 = West. Pitch - rotation around X axis (-180 to 180), with positive values when the z-axis moves toward the y-axis. Roll - rotation around Y axis (-90 to 90), with positive values when the x-axis moves toward the z-axis. Figure 23: Heading, pitch and roll in Android coordinate frame BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 48 9.2 Landing pattern recommendation For the design of the landing pattern, we recommend the following dimensioning: To be discussed 0.798 0.762 0.035 E1 C1 A1 B2 0.283 D2 1.56 0.762 0.283 0.4 0.4 A3 E3 B4 0.2 0.035 D4 0.798 E5 C5 0.283 A5 0.283 1.56 Figure 24: Landing patterns relative to the device pins, dimensions are in mm Note: Recommended thickness of solder paste is 100m. The land pattern depicted in Figure 24 may be used similarly for PCBs designed with NSMD as well as SMD process. For the NSMD process, landing dimensions as in Figure 24 should be defined in the metal layer while the solder mask openings should be larger than the defined metal pads. In case of SMD process, land dimensions should be defined by solder mask which openings are smaller than underlying metal pads. Land Pattern is presented as guideline; designer should always use their own experience. Choice between SMD and NSMD is determined by customer. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 49 9.3 Marking 100 XXXX 230 9.3.1 Mass production devices XXXX XXX 320 150 O180 150 30 240 150 Figure 25: WLCSP marking format Table 34: Marking of mass production samples Labeling 157 AYWW CCC Name Symbol Remark Product number 157 Last three digits of product part number Sub-Con ID A Packaging sub-contractor identifier, coded alphanumerically Date code YWW Y: year, numerically coded: 9 = 2009, 0 = 2010, 1 = 2011, ... WW: Calendar week, numerical code Lot counter CCC Numerical counter Pin 1 identifier BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 50 9.3.2 Engineering samples Table 35: Marking of engineering samples Labeling 157+ AYWW MLX Name Symbol Remark Product number 157+ BMM150 Engineering sample Sub-Con ID A Packaging sub-contractor identifier, coded alphanumerically Date code YWW Y: year, numerically coded: 9 = 2009, 0 = 2010, 1 = 2011, ... WW: Calendar week, numerical code Sample status MLX M: BMM, L: character (sample status), X = Numerical counter Pin 1 identifier BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 51 9.4 Soldering guidelines The moisture sensitivity level of the BMM150 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. Figure 26: Soldering profile BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 52 9.5 Handling instructions 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. We recommend careful handling of the WLCSP to avoid chipping from the bare silicon. Note: It is strongly recommended to mount the WLCSP device without any underfill. The specified electrical parameters might be influenced when using underfill material. Please read our HSMI document for more details. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 53 Tape and reel specification 9.5.1 Tape and reel dimensions The following picture describes the dimensions of the tape used for shipping the BMM150 sensor device. The material of the tape is made of conductive polystyrene (IV). Figure 27: Tape and reel dimensions in mm 9.5.2 Orientation within the reel Figure 28: Orientation of the BMM150 devices relative to the tape BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 54 9.6 Environmental safety The BMM150 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 8 September 2011 on the restriction of the use of certain hazardous substances in electrical and electronic equipment. 9.6.1 Halogen content The BMM150 is halogen-free. For more details on the analysis results please contact your Bosch Sensortec representative. 9.6.2 Internal package structure Within the scope of Bosch Sensortec's ambition to improve its products and secure the mass product supply, Bosch Sensortec qualifies additional sources (e.g. 2nd source) for the packaging of the BMM150. While Bosch Sensortec took care that all of the technical packages parameters are described above are 100% identical for all sources, there can be differences in the chemical content and the internal structural between the different package sources. 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 BMM150 product. BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 55 10. Legal disclaimer 10.1 Engineering samples Engineering Samples are marked with an asterisk (*) or (e) or (E) or (+). 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. 10.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. 10.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 noninfringement 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-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Datasheet BMM150 Geomagnetic Sensor Page 56 11. Document history and modification Rev. No 0.1 1.0 Chapter 12.2 12.7 6.2 Description of modification/changes Document creation New landing pattern New release date for RoHS Changed values in Table 31, tlow to 1.3 for Min; thigh to 0.6 for Min; tHDDAT to 0; tHDSTA to 0.6 for Min Date 2012-07-02 2013-03-18 2013-04-25 Bosch Sensortec GmbH Gerhard-Kindler-Strasse 8 72770 Reutlingen / Germany contact@bosch-sensortec.com www.bosch-sensortec.com Modifications reserved | Printed in Germany Specifications subject to change without notice Document number: BST-BMM150-DS001-01 Revision_1.0_042013 BST-BMM150-DS001-01 | Revision 1.0 | April 2013 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 subject to change without notice. Mouser Electronics Authorized Distributor Click to View Pricing, Inventory, Delivery & Lifecycle Information: Bosch Sensortec: BMM150 0330.SB0.157