
Sensors
NXP Semiconductors 13
MMA8452Q
5.1 Device calibration
The device interface is factory calibrated for sensitivity and zero-g of fset for each axis. The trim values are stored in non- volatile
memory (NVM). On power-up, the trim parameters are read from NVM and applied to the circuitry. In normal use, further
calibration in the end application is not necessary. However, the MMA8452Q allows the user to adjust the zero-g offset for each
axis af ter p ower-up, c hanging the def ault of f set values. The user offset adjustments are stored in six volatile regi sters. Fo r more
information on device calibration, refer to application note, AN4069.
5.2 8-bit or 12-bit data
The measured acceleration data is stored in the OUT_X_MSB, OUT_X_LSB, OUT_Y_MSB, OUT_Y_LSB, OUT_Z_MSB, and
OUT_Z_LSB registers as 2’s complement 12-bit numbers. The most significant 8-bits of each axis are stored in OUT_X (Y,
Z)_MSB, so applications nee din g only 8-bit results can use these three registers and ig n ore OU T_X,Y, Z_LSB. To do this, the
F_READ bit in CTRL_REG1 must be set. When the F_READ bit is cleared, the fast-read mode is disabled.
When the full-scale is set to 2 g, the measurement range is –2 g to +1.999 g, and each count corresponds to 1 g/1024
(1 mg) at 12-b its resolution. When the full-scale is set to 8 g, the measurement range is –8 g to +7.996 g, and each count
corresponds to 1 g/256 (3.9 mg) at 12-bits reso lution. The resolu tion is reduced by a factor of 16 if on ly the 8-bit resul ts are used.
For more information on the data manipulation between data format s and modes, refer to NXP application note AN4076. There
is a device driver available that can be used with the Sensor Toolbox demo board (LFSTBEB8451, 2, 3Q).
5.3 Low-power modes vs. high-resolution modes
The MMA8452Q can be optimized for lower power modes or for higher resolution of the output data. High resolution is achieved
by setting the LNOISE bit in register 0x2A. This improves the resolution but be awar e that the dynamic range is limited to 4 g
when this bit is set. This will affect all internal functions and reduce noise. Another method for improving the resolution of the data
is by oversampling. One of the oversampling schemes of the data can activated when MODS = 10 in register 0x2B which will
improve the resolution of the output data only. The highest resolution is achieved at 1.56 Hz.
There is a trade-off between low power and high resolution. Low power can be achieved when the oversampling rate is reduced.
The lowest power is achieved when MODS = 11 or when the sample rate is set to 1.56 Hz. F or more info rmation on how to
configure the MMA8452Q in low-power mode or high-resolution mode and to realize the benefits, refer to NXP application note
AN4075.
5.4 Auto-wake/sleep mode
The MMA8452Q can be configured to transition between sample rates (with their respect ive current consumption ) based on four
of the interrupt functions of the device. The advantage of using the auto-wa ke /sleep is that the system can automatically transition
to a higher sample rate (higher current consumption) when needed but spends the majority of the time in the sleep mode (lower
current) when the device does not require higher sampling rates. Auto-w a k e refers to the device being triggered by one of the
interrupt f unctions to transition to a higher sampl e rate. T his may also interrupt the processor to transition from a sleep mode to a
higher power mode.
Sleep mode occurs after the accelerometer has not detected an interrupt for longer than the user definable time-out period. The
device will transition to the specified lower sample rate. It may also alert the processor to go into a lower power mode to save on
current during this period of inactivity.
The interrupts that can wake the device from sleep are the following: pulse detection, orientation detection, motion/freefall, and
transient detection. Refer to AN4074, for more detailed information for configuring the auto-wake/sle ep.
5.5 Freefall and motion detection
MMA8452Q has flexible interrupt architecture for detecting either a freefall or a motion. Freefall can be enabled where the set
threshold must be less than the configured threshold, or motion can be enabled where the set threshold must be greater than
the threshold. The motion configuration has the option of enabling or disabling a high-pass filter to eliminate tilt data (static offset).
The freefall does not use the high-pass filter. For det ails on the freefall and motion detection with specific application examples
and recommended configuration settings, refer to NXP application note AN4070.
5.5.1 Freefall detection
The detection of freefall involves the monitoring of the X, Y, and Z axes for the condition where the acceleration magnitude is
below a user specified threshold for a user definable amount of time. Normally, the usable threshold ranges are between
±100 mg and ±500 mg.