The MMA8452Q is a smart, low-power, three-axis, capacitive, micromachined
accelerometer with 12 bits of resolution. This accelerometer is packed with
embedded functions with flexible user programmable options, configurable to two
interrupt pins. Embedded interrupt functions allow for overall power savings
relieving the host processor from continuously polling data.
The MMA8452Q has user selectable full scales of ±2g/±4g/±8g with high-pass
filter filtered data as well as non-filtered data available real-time. The device can
be configured to generate inertial wakeup interrupt signals from any combination
of the configurable embedded functions allowing the MMA8452Q to monitor
events and remain in a low power mode during periods of inactivity. The
MMA8452Q is available in a 3 mm x 3 mm x 1 mm QFN package.
Features
•1.95V to 3.6V supply voltage
•1.6V to 3.6V interface voltage
•±2g/±4g/±8g dynamically selectable full-scale
•Output Data Rates (ODR) from 1.56 Hz to 800 Hz
•99 μg/√Hz noise
•12-bit and 8-bit digital output
2
C
•I
•Two progr ammable interrupt pins for six interrupt sources
–Orientation (Portrait/Landscape) detection with set hysteresis
–Automatic ODR change for Auto-WAKE and return to SLEEP
–High-Pass Filter Data available real-time
–Self-Test
–RoHS compliant
–Current Consumption: 6 μA to 165 μA
Front position identification)
User interface (menu scrolling by orientation change, pulse detection for button replacement
Part NumberTemperature RangePackage DescriptionShipping
The MMA8452Q device features and operations are described in a variety of reference manuals, user guides, and application
notes. To find the most-current versions of these documents:
1.Go to the Freescale homepage at:
http://www.freescale.com/
2.In the Keyword search box at the top of the page, enter the device number MMA8452Q.
3.In the Refine Your Result pane on the left, click on the Documentation link.
MMA8452Q
Sensors
2Freescale Semiconductor, Inc.
1Block Diagram and Pin Description
12-bit
SDA
SCL
I2C
Embedded
DSP
Functions
C to V
Internal
OSC
Clock
GEN
ADC
Converter
VDDIO
VSS
X-axis
Transducer
Y-axis
Transducer
Z-axis
Transducer
Freefall
and Motion
Detection
Transient
Detection
(i.e., fast motion,
transient)
Orientation with
Set Hysteresis
and Z-lockout
Shake Detection
through
Motion
Threshold
Auto-WAKE/Auto-SLEEP Configurable with debounce counter and multiple motion interrupts for control
Auto-WAKE/SLEEP
ACTIVE Mode
SLEEP
VDD
INT1
INT2
ACTIVE Mode
WAKE
Single, Double
and Directional
Tap Detection
MODE Options
Low Power
Low Noise + Low Power
High Resolution
Normal
MODE Options
Low Power
Low Noise + Low Power
High Resolution
Normal
1
DIRECTION OF THE
DETECTABLE ACCELERATIONS
(BOTTOM VIEW)
5
9
13
X
Y
Z
1
(TOP VIEW)
Earth Gravity
Figure 1. Block Diagram
Figure 2. Direction of the Detectable Accelerations
Sensors
Freescale Semiconductor, Inc.3
MMA8452Q
Figure 3 shows the device configuration in the six different orientation modes. These orientations are defined as the following:
Top View
PU
Earth Gravity
Pin 1
Xout @ 0g
Yout @ -1g
Zout @ 0g
Xout @ 1g
Yout @ 0g
Zout @ 0g
Xout @ 0g
Yout @ 1g
Zout @ 0g
Xout @ -1g
Yout @ 0g
Zout @ 0g
LL
PD
LR
Side View
FRONT
Xout @ 0g
Yout @ 0g
Zout @ 1g
BACK
Xout @ 0g
Yout @ 0g
Zout @ -1g
0.1μF
1.6V-3.6V
VDDIO
VDDIO
VDDIO
4.7kΩ4.7kΩ
1
GND
VDDIO
SCL
NC
INT2
INT1
GND
GND
SDA
SA0
VDD
NC
NC
NC
BYP
NC
MMA8452Q
2
16
12
13
1415
11
10
3
4
5
6
7
8
9
4.7μF
INT1
INT2
SA0
0.1μF
1.95V - 3.6V
VDD
SCL
SDA
DNC
PU = Portrait Up, LR = Landscape Right, PD = Portrait Down, LL = Landscape Left, BACK and FRONT side views. There are
several registers to configure the orientation detection and are described in detail in the register setting section.
Figure 3. Landscape/Portrait Orientation
Figure 4. Application Diagram
MMA8452Q
4Freescale Semiconductor, Inc.
Sensors
Table 1. Pin Descriptions
Pin #Pin NameDescription
1VDDIOInternal Power Supply (1.62V - 3.6V)
2BYPBypass capacitor (0.1 μF)
3DNCDo not connect to anything, leave pin isolated and floating.
4SCL
5GNDConnect to Ground
6SDA
7SA0
8NCInternally not connected
9INT2Inertial Interrupt 2, output pin
10GNDConnect to Ground
11INT1Inertial Interrupt 1, output pin
12GNDConnect to Ground
13NCInternally not connected
14VDDPower Supply (1.95 V to 3.6 V)
15NCInternally not connected
16NCInternally not connected (can be GND or VDD)
2
C Serial Clock, open drain
I
2
C Serial Data
I
2
I
C Least Significant Bit of the Device I2C Address, I2C 7-bit address = 0x1C (SA0=0), 0x1D (SA0=1).
The device power is supplied through VDD line. Power supply decoupling capacitors (100 nF ceramic plus 4.7 µF bulk, or a
single 4.7 µF ceramic) should be placed as near as possible to the pins 1 and 14 of the device.
The control signals SCL, SDA, and SA0 are not tolerant of voltages more than VDDIO + 0.3V . If VDDIO is removed, the control
signals SCL, SDA, and SA0 will clamp any logic signals with their internal ESD protection diodes.
The functions, the threshold and the timing of the two interrupt pins (INT1 and INT2) are user programmable through the I
2
interface. The SDA and SCL I2C connections are open drain and therefore require a pullup resistor as shown in the application
diagram in Figure 4.
C
1.1Soldering Information
The QFN package is compliant with the RoHS standard. Please refer to AN4077.
MMA8452Q
Sensors
Freescale Semiconductor, Inc.5
2Mechanical and Electrical Specifications
2.1Mechanical Characteristics
Table 2. Mechanical Characteristics @ VDD = 2.5V, VDDIO = 1.8V, T = 25°C unless ot herwise noted.
ParameterTest ConditionsSymbolMinTypMaxUnit
FS[1:0] set to 00
2g Mode
Measurement Range
Sensitivity
Sensitivity Accuracy
Sensitivity Change vs. Temperature
Zero-g Level Offset Accuracy
Zero-g Level Offset Accuracy Post Board Mount
Zero-g Level Change vs. Temperature-40°C to 85°C TCOff±0.15 mg/°C
Self-Test Output Change
X
Y
Z
ODR Accuracy
2 MHz Clock±2
Output Data BandwidthBWODR/3ODR/2 Hz
Output Noise Normal Mode ODR = 400 HzNoise126 µg/√Hz
Output Noise Low-Noise Mode
Operating Temperature RangeTop-40+85 °C
1. Dynamic Range is limited to 4g when the Low-Noise bit in Register 0x2A, bit 2 is set.
2. Sensitivity remains in spec as stated, but changing Oversampling mode to Low Power causes 3% sensitivity shift. This behavior is also seen
when changing from 800 Hz to any other data rate in the Normal, Low Noise + Low Power or High Resolution mode.
3. Before board mount.
4. Post Board Mount Offset Specifications are based on an 8 Layer PCB, relative to 25°C.
Current during Boot Sequence, 0.5 mSec max
duration using recommended Bypass Cap
VDD = 2.5V Idd Boot
Value of Capacitor on BYP Pin-40°C 85°CCap
STANDBY Mode Current @ 25°C
VDD = 2.5V, VDDIO = 1.8V
STANDBY Mode
I
Stby1.85μA
dd
Digital High Level Input Voltage
SCL, SDA, SA0VIH0.7*VDDIO
Digital Low-Level Input Voltage
SCL, SDA, SA0VIL0.3*VDDIO
High Level Output Voltage
INT1, INT2I
= 500 μAVOH0.9*VDDIO
O
Low-Level Output Voltage
INT1, INT2I
= 500 μAVOL0.1*VDDIO
O
Low-Level Output Voltage
SDAI
= 500 μAVOLS0.1*VDDIO
O
Power on Ramp Time0.0011000 ms
Time from VDDIO on and
Boot time
VDD > VDD min until I
2
C is ready
Tbt350500 µs
for operation, Cbyp = 100 nF
Turn-on time
Turn-on time
(2)
Time to obtain valid data from
STANDBY mode to ACTIVE mode.
Time to obtain valid data from valid
voltage applied.
Ton1
Ton22/ODR + 2 ms
Operating Temperature RangeTop-40+85°C
1.952.5 3.6 V
(1)
1.62 1.8 3.6 V
6
6
24
24
75100470 nF
2/ODR + 1 ms
1mA
μA
μA
V
V
V
V
V
s
1. There is no requirement for power supply sequencing. The VDDIO input voltage can be higher than the VDD input voltage.
2. Note the first sample is typically not very precise. Depending on ODR/MODS setting, a minimum of three samples is recommended for full
precision.
MMA8452Q
Sensors
Freescale Semiconductor, Inc.7
2.3I2C interface characteristics
VIL = 0.3V
DD
VIH = 0.7V
DD
Table 4. I
2
C slave timing values
SCL clock frequencyf
Bus-free time between STOP and START conditiont
(Repeated) START hold timet
Repeated START setup timet
STOP condition setup timet
SDA data hold timet
SDA setup timet
SCL clock low timet
SCL clock high timet
SDA and SCL rise timet
SDA and SCL fall timet
SDA valid time
(4)
SDA valid acknowledge time
Pulse width of spikes on SDA and SCL that must be suppressed by
internal input filter
(1)
ParameterSymbol
(5)
SCL
BUF
HD;STA
SU;STA
SU;STO
HD;DAT
SU;DAT
LOW
HIGH
r
f
t
VD;DAT
t
VD;ACK
t
SP
2
C Fast Mode
I
MinMax
0400kHz
1.3μs
0.6μs
0.6μs
0.6μs
0.050.9
(2)
100ns
1.3μs
0.6μs
20 + 0.1 C
20 + 0.1 C
(3)
b
(3)
b
300ns
300ns
(2)
0.9
(2)
0.9
050ns
Capacitive load for each bus lineCb400pF
Unit
μs
μs
μs
1.All values referred to V
2.This device does not stretch the LOW period (t
(0.3VDD) and V
IH(min)
3.Cb = total capacitance of one bus line in pF.
4.t
5.t
= time for data signal from SCL LOW to SDA output (HIGH or LOW, depending on which one is worse).
VD;DAT
= time for Acknowledgement signal from SCL LOW to SDA output (HIGH or LOW, depending on which one is worse).
VD;ACK
(0.7VDD) levels.
IL(max)
) of the SCL signal.
LOW
Figure 5. I2C slave timing diagram
MMA8452Q
Sensors
8Freescale Semiconductor, Inc.
2.4Absolute Maximum Ratings
This device is sensitive to mechanical shock. Improper handling can cause permanent damage of the part or
cause the part to otherwise fail.
This device is sensitive to ESD, improper handling can cause permanent damage to the part.
Stresses above those listed as “absolute maximum ratings” may cause permanent damage to the device. Exposure to
maximum rating conditions for extended periods may affect device reliability.
Table 5. Maximum Ratings
RatingSymbolValueUnit
Maximum Acceleration (all axes, 100 μs)g
Supply VoltageVDD-0.3 to + 3.6V
Input voltage on any control pin (SA0, SCL, SDA)Vin-0.3 to VDDIO + 0.3V
Drop TestD
Operating Temperature RangeT
Storage Temperature RangeT
max
drop
OP
STG
Table 6. ESD and Latchup Protection Characteristics
RatingSymbolValueUnit
Human Body ModelHBM±2000V
Machine ModelMM±200V
Charge Device ModelCDM±500V
Latchup Current at T = 85°C
—±100mA
5,000g
1.8m
-40 to +85°C
-40 to +125 °C
3Terminology
3.1Sensitivity
The sensitivity is represented in counts/g. In 2g mode the sensitivity is 1024 counts/g. In 4g mode the sensitivity is
512 counts/g and in 8g mode the sensitivity is 256 counts/g.
3.2Zero-g Offset
Zero-g Offset (TyOff) describes th e deviation of an actual output signal from the ideal output signal if the sensor is stationary. A
sensor stationary on a horizontal surface will measure 0g in X-axis and 0g in Y-axis whereas the Z-axis will measure 1g. The output
is ideally in the middle of the dynamic range of the sensor (content of OUT Registers 0x00, data expressed as 2's complement
number). A deviation from ideal value in this case is called Zero-g offset. Offset is to some ex tent a result of stress on the MEMS
sensor and therefore the offset can slightly change aft er mo un ting the sensor onto a printed circuit board or exposin g it to
extensive mechanical stress.
3.3Self-Test
Self-Test checks the transducer functionality without external mechanical stimulus. When Self-Test is activated, an electrostatic
actuation force is applied to the sensor, simulating a small acceleration. In this case, the sensor outputs will exhibit a change in
their DC levels which are related to the selected full scale through the device sensitivity . When Self-Test is activated, the device
output level is given by the algebraic sum of th e signals produced by the acceleration acting on the se nsor and by the electrostatic
test-force.
Sensors
Freescale Semiconductor, Inc.9
MMA8452Q
4System Modes (SYSMOD)
OFF
WAKESTANDBY
OFF
ACTIVE
SYSMOD = 00
SYSMOD = 10
SYSMOD = 01
Auto SLEEP/WAKE
Condition
VDD > 1.8 V
VDD < 1.8 V
CTRL_REG1
Active bit = 1
CTRL_REG1
Active bit = 0
CTRL_REG1
Active bit = 0
Figure 6. MMA8451Q Mode Transition Diagram
Table 7. Mode of Operation Description
Mode
OFF
STANDBY
ACTIVE
(WAKE/SLEEP)
Powered Down
I2C communication is possible
I2C communication is possible
2
I
C Bus State
VDDIO Can be > VDD
VDDFunction Description
<1.8V
>1.8V
>1.8V
• The device is powered off.
• All analog and digital blocks are shutdown.
2
C bus inhibited.
•I
• Only digital blocks are enabled.
Analog subsystem is disabled.
• Internal clocks disabled.
• Registers accessible for Read/Write.
• Device is configured in STANDBY mode.
• All blocks are enabled (digital, analog).
All register contents are preserved when transitioning from ACTIVE to STANDBY mode. Some registers are reset when
transitioning from STANDBY to ACTIVE. These are all noted in the device memory map register table. The SLEEP and WAKE
modes are ACTIVE modes. For more information on how to use the SLEEP and WAKE modes and how to transition between
these modes, please refer to the functionality section of this document.
MMA8452Q
10Freescale Semiconductor, Inc.
Sensors
5Functionality
The MMA8452Q is a low-power , digital output 3-axis linear accelerometer wit h a I2C interface and embedded logic used to
detect events and notify an external microprocessor over interrupt lines. The functionality includes the following:
•8-bit or 12-bit data which includes High-Pass Filtered data
•4 different oversampling options for compromising between resolution and current consumption based on application
requirements
•Additional Low-Noise mode that functions independently of the Oversampling modes for higher resolution
•L ow Power and Auto-WAKE/SLEEP modes for conservation of current consumption
•Single-/Double-pulse with directional information 1 channel
•Motion detection with directional information or Freefall 1 channel
•Transient detection based on a high-pass filter and settable threshold for detecting the change in acceleration above a
threshold with directional information 1 channel
•Portrait/Landscape detection with trip points fixed at 30° and 60° for smooth transitions between orientations.
All functionality is available in 2g, 4g or 8g dynamic ra nges. There are many configuration settings for enabling all the different
functions. Separate application notes have been provided to help configure the device for each embedd ed functionality.
The device interface is factory calibrated for sensitivity and Zero-g offset for each axi s . 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 after power-up, changing the default offs et values. The user offset adjustments are stored in 6 volatile registers. For more
information on device calibration, refer to Freescale application note, AN4069.
5.28-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 needing only 8-bit results can use these 3 registers and ignore OUT_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 2g, the measurement range is -2g to +1.999g, and each count corresponds to 1g/1024
(1 mg) at 12-bits resolution. When the full-scale is set to 8g, the measu rement range is -8g to +7.996g, and each count
corresponds to 1g/256 (3.9 mg) at 12-bits resolu tion. The resolutio n is reduced by a factor of 16 if only the 8-bit result s are used.
For more information on the data manipulation between data formats and modes, refer to Freescale application note, AN4076.
There is a device driver available that can be used with the Sensor Toolbox demo board (LFSTBEB8451, 2, 3Q).
5.3Low-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 aware that the dynamic range is limited
to 4g 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. For more information on
how to configure the MMA8452Q in Low-Power mode or High-Resolution mode and to realize the benefits
application note, AN4075.
, refer to Freescale
5.4Auto-WAKE/SLEEP Mode
The MMA8452Q can be configured to transition between sample rates (with their respective current consumption) based on
four of the interrupt functions of the device. The advantage of using the Auto-WAKE/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-WAKE refers to the device being triggered by
one of the interrupt functions to transition to a higher sample rate. This 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: P ul s e Detection, Orientation Detection, Motion/Freefall,
and Transient Detection. Refer to AN4074, for more detailed information for configuring the Auto-WAKE/SLEEP.
5.5Freefall 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 details on the Freefall and Motion detection with specific application examples
and recommended configuration settings, refer to Freescale application note, AN4070.
5.5.1Freefall 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 amou nt of time. Norma lly, the usable th re sho ld ran ges are be tw een
±100 mg and ±500 mg.
MMA8452Q
Sensors
12Freescale Semiconductor, Inc.
5.5.2Motion Detection
Motion is often used to simply alert the main processor that the device is currently in use. When the acceleration exceeds a
set threshold the motion interrupt is asserted. A motion can be a fast moving shake or a slow moving tilt. This will depend on the
threshold and timing values configured for the ev en t. The motion detection function can analyze static acceleration changes or
faster jolts. For example, to detect that an object is spinning, all three axes would be enabled with a threshold detection of > 2g.
This condition would need to occur for a minimum of 100 ms to ensure that the event wasn't just noise. The timing value is set
by a configurable debounce counter. The debounce counter acts like a filter to determine whether the condition exists for
configurable set of time (i.e., 100 ms or longer). There is also directional data available in the source register to detect the
direction of the motion. This is useful for applications such as directional shake or flick, which assists with the algorithm for various
gesture detections.
5.6Transient Detection
The MMA8452Q has a built-in high-pass filter. Acceleration data goes through the high-pass filter, eliminating the offset (DC)
and low frequencies. The high-pass filter cutoff frequency can be set by the user to four different frequen ci es w hi c h a re
dependent on the Output Dat a Rate (ODR). A higher cutoff frequency ensures the D C dat a or slower moving da ta will be filtered
out, allowing only the higher frequencies to pass. The embedded Transient Detection function uses the high-pass filtered data
allowing the user to set the threshold and debounce counter. The Transient detection feature can be used in the same manner
as the motion detection by bypassing the high-pass filter. There is an option in the configuration register to do this. This adds
more flexibility to cover various customer use cases.
Many applications use the accelerometer’s static acceleration readings (i.e., tilt) which measure the change in acceleration
due to gravity only. These functions benefit from acceleration dat a being filt ered with a low -p ass filter w here high-freque ncy data
is considered noise. However, there are many functions where the accelerometer must analyze dynamic acceleration. Functions
such as tap, flick, shake and step counting are based on the analysis of the change in the acceleration. It is simpler to interpret
these functions dependent on dynamic acceleration data when the static component has been removed. The Transient Detection
function can be routed to either interrupt pin through bit 5 in CTRL_REG5 register (0x2E). Registers 0x1D – 0x20 are the
dedicated Transient Detection configuration registers. The source register contains directional data to determine the direction of
the acceleration, either positive or negative. For details on the benefits of the embedded Transient Detection function along with
specific application examples and recommended configuration settings, please refer to Freescale application note, AN4071.
5.7Pulse Detection
The MMA8452Q has embedded single/double and directional pulse detection. This function has various customizing timers
for setting the pulse time width and the latency time between pulses. There are programmable thresholds for all three axes. The
pulse detection can be configured to run through the high-pass filter and also through a low-pass filter, which provides more
customizing and tunable pulse-detection schemes. The status register provides updates on the axes where the event was
detected and the direction of the tap. For more information on how to configure the device for pulse detection, please refer to
Freescale application note, AN4072.
5.8Orientation Detection
The MMA8452Q has an orientation detection algorithm with the ability to detect all 6 orientations. The transition from portrait
to landscape is fixed with a 45° threshold angle and a ±14° hysteresis angle. This allows the for a smooth transition from portrait
to landscape at approximately 30° and then from landscape to portrait at approximately 60°.
The angle at which the dev ice no longer detect s the o rient ation change is r eferred to as the “Z-Lockout angle”. The device
operates down to 29° from the flat position. All angles are accurate to ±2°.
For further information on the orientation detection function refer to Freescale application note, AN4068.
Figure 8 shows the definitions of the trip angles going from Landscape to Portrait (A) and then also from Portrait to
Landscape (B).
MMA8452Q
Sensors
Freescale Semiconductor, Inc.13
Figure 7. Landscape/Portrait Orientation
Top View
PU
Earth Gravity
Pin 1
Xout @ 0g
Yout @ -1g
Zout @ 0g
Xout @ 1g
Yout @ 0g
Zout @ 0g
Xout @ 0g
Yout @ 1g
Zout @ 0g
Xout @ -1g
Yout @ 0g
Zout @ 0g
LL
PD
LR
Side View
FRONT
Xout @ 0g
Yout @ 0g
Zout @ 1g
BACK
Xout @ 0g
Yout @ 0g
Zout @ -1g
Portrait
Landscape to Portrait
90°
Trip Angle = 60°
0° Landscape
Portrait
Portrait to Landscape
90°
Trip Angle = 30°
0° Landscape
(A)(B)
Upright
NORMAL
90°
Z-LOCK = 29°
0° Flat
DETECTION
REGION
LOCKOUT
REGION
Figure 8. Illustration of Landscape to Portrait Transition (A) and Portrait to Landscape Transition (B)
Figure 9 illustrates the Z-angle lockout region. When lifting the device upright from the flat position it will be active for
orientation detection as low as 29° from flat. .
MMA8452Q
14Freescale Semiconductor, Inc.
Figure 9. Illustration of Z-Tilt Angle Lockout Transition
Sensors
5.9Interrupt Register Configurations
INTERRUPT
CONTROLLER
Data Ready
Motion/Freefall
Pulse
Orientation
Transient
Auto-SLEEP
INT ENABLEINT CFG
INT1
INT2
66
There are six configurable interrupts in the MMA8452Q: Data Ready, Motion/Freefall, Pulse, Orientation, Transient, and AutoSLEEP events. These six interrupt sources can be routed to one of two interrupt pins. The interrupt source must be enabled and
configured. If the event flag is asserted because the event condition is detected, the corresponding interrupt pin, INT1 or INT2,
will assert.
Figure 10. System Interrupt Generation Block Diagram
5.10Serial I2C Interface
Acceleration data may be accessed through an I2C interface thus making the device particularly suit abl e for direct interfaci ng
with a microcontroller. The MMA8452Q features an interrupt signal which indicates when a new set of measured acceleration
data is available thus simplifying data synchronization in the digital system that uses the device. The MMA8452Q may also be
configured to generate other interrupt signals accordingly to the programmable embedded functions of the device for Motion,
Freefall, Transient, Orient a tion, and Pulse.
2
The registers embedded inside the MMA8452Q are accessed through the I
interface, VDDIO line must be tied high (i.e., to the interface supply voltage). If VDD is not present and VDDIO is present, the
MMA8452Q is in off mode and communications on the I2C interface are ignored. The I2C interface may be used for
communications between other I
2
C devices and the MMA8452Q does not affect the I2C bus.
Table 9. Serial Interface Pin Description
Pin NamePin Description
SCLI
SDAI
SA0I
There are two signals associated with the I
2
C Serial Clock
2
C Serial Data
2
C least significant bit of the device address
2
C bus; the Serial Clock Line (SCL) and the Serial Data line (SDA). The latter is a
bidirectional line used for sending and receiving the data to/from the interface. External pullup resistor s connected to VDDIO are
expected for SDA and SCL. When the bus is free both the lines are high. The I
and Normal mode (100 kHz) I
2
C standards (Table 5).
C serial interface (Table 9). To en able the I2C
2
C interface is compliant with fast mode (400 kHz),
MMA8452Q
Sensors
Freescale Semiconductor, Inc.15
5.10.1I2C Operation
The transaction on the bus is started through a start condition (START) signal. ST AR T condition is defined as a HIGH to LOW
transition on the data line while the SCL line is held HIGH. After ST AR T has been transmitted by the Master , the bus is considered
busy. The next byte of data transmitted after START contains the slave address in the first 7 bits, and the eighth bit tells whether
the Master is receiving data from the slave or transmitting data to the slave. When an address is sent, each device in the system
compares the first seven bits after a start condition with its address. If they match, the device considers itself addressed by the
Master. The 9th clock pul se, following the slave address byte (and each subsequent byte) is the acknowledge (ACK). Th e
transmitter must release the SDA line during the ACK period . The receiver must then pull the data line low so that it remains
stable low during the high period of the acknowledge clock period.
A LOW to HIGH transition on the SDA line while the SCL line is high is defined as a stop condition (STOP). A data transfer is
always terminated by a STOP. A Master may also issue a repeated START during a data transfer. The MMA8452Q expects
repeated STARTs to be used to randomly read from specific registers.
The MMA8452Q's standard slave address is a choice between the two sequential addresses 0011100 and 0011101. The
selection is made by the high- and low-lo gic level of the SA0 (pin 7) input respectively. The slave addresses are factory
programmed and alternate addresses are available at customer request. The format is shown in Table 10.
Single Byte Read
The MMA8452Q has an internal ADC that can sample, convert and return sensor data on request. The transmission of an
8-bit command begins on the falling edge of SCL. After the eight clock cycles are used to send the command, note that the data
returned is sent with the MSB first once the data is received. Figure 1 1shows the timing diagram for the accelerometer 8- bit I2C
read operation. The Master (or MCU) transmits a start condition (ST) to the MMA8452Q, slave address ($1D), with the R/W bit
set to “0” for a write, and the MMA8452Q sends an acknowledgement. Then the Master (or MCU) transmits the address of the
register to read and the MMA8452Q sends an acknowledgement. The Master (or MCU) transmits a repeated start condition (SR)
and then addresses the MMA8452Q ($1D ) with th e R/W bi t set t o “1” for a read from the previously selected register . The Slave
then acknowledges and transmits the data from the requested register . The Master does not acknowledge (NAK) the transmitted
data, but transmits a stop condition to end the data transfer.
Multiple Byte Read
When performing a multi-byte read or “b urst read”, the MMA8452Q automatically increments the received register address
commands after a read command is received. Therefore, after following the steps of a single byte read, multiple bytes of data
can be read from sequential registers after each MMA8452Q acknowledgment (AK) is received until a no acknowledge (NAK)
occurs from the Master followed by a stop condition (SP) signaling an end of transmission.
Single Byte Write
To st art a write co mmand, the Master t ransmits a st art cond ition (ST) to the MMA8452Q, slave address ($1D) with the R/W bit
set to “0” for a write, the MMA8452Q sends an acknowledgement. Then the Master (MCU) transmits the address of the register
to write to, and the MMA8452Q sends an acknowledgement. Then the Master (or MCU) transmits the 8-bit data to write to the
designated register and the MMA8452Q sends an ackn o w led g ement that it has received the data. Since this transmi ssi o n is
complete, the Master transmits a stop condition (SP) to the data transfer. The data sent to the MMA8452Q is now stored in the
appropriate register.
MMA8452Q
Sensors
16Freescale Semiconductor, Inc.
Multiple Byte Wri t e
The MMA8452Q automatically increments the received register address commands after a write command is received.
Therefore, after following the steps of a single byte write, multiple bytes of data can be written to sequential registers after each
MMA8452Q acknowledgment (ACK) is received.
R0x000x0100000000 0x00Real time status
R0x010x020x03Output—[7:0] are 8 MSBs of 12-b it sample.
R0x020x030x00Output—[7:4] are 4 LSBs of 12-bit sample.
R0x030x040x05Output—[7:0] are 8 MSBs of 12-b it sample.
R0x040x050x00Output—[7:4] are 4 LSBs of 12-bit sample.
R0x050x060x00Output—[7:0] are 8 MSBs of 12-b it sample.
R0x060x00Output—[7:4] are 4 LSBs of 12-bit sample.
R0x1E0x1F00000000 0x00Transient event status register
R/W0x1F0x2000000000 0x00Transient event threshold
(3)(4)
R/W0x200x2100000000 0x00Transient debounce counter
R/W0x210x2200000000 0x00 ELE, Double_XYZ or Single_XYZ
R0x220x2300000000 0x00EA, Double_XYZ or Single_XYZ
R/W0x230x2400000000 0x00X pulse threshold
R/W0x240x2500000000 0x00Y pulse threshold
R/W0x250x2600000000 0x00Z pulse threshold
R/W0x260x2700000000 0x00Time limit for pulse
R/W0x270x2800000000 0x00Latency time for 2nd pulse
Hex
Value
HPF Data Out and Dynamic
Cutoff frequency is set to 16 Hz @
Landscape/Portrait orientation
Landscape/Portrait debounce
Portrait to Landscape Trip Angle is
Freefall/Motion functional block
Freefall/Motion event source
Transient functional block
Comment
Range Settings
800 Hz
status
counter
29°
configuration
register
configuration
MMA8452Q
Sensors
18Freescale Semiconductor, Inc.
Table 11. Register Address Map
(3)(4)
(3)(4)
(3)(4)
(3)(4)
(3)(4)
(3)(4)
(3)(4)
(3)(4)
(3)(4)
(3)(4)
R/W0x280x2900000000 0x00Window time for 2nd pulse
R/W0x290x2A00000000 0x00Counter setting for Auto-SLEEP
R/W0x2A0x2B00000000 0x00Data Rate, ACTIVE Mode
C burst read mode. Therefore the internal storage of the auto-increment address is cleared whenever a
Sleep Enable, OS Modes,
RST, ST
PULSE_WIND
ASLP_COUNT
CTRL_REG1
CTRL_REG2
CTRL_REG3
CTRL_REG4
CTRL_REG5
OFF_X
OFF_Y
OFF_Z
Reserved (do not modify)0x40 – 7F———Reserved. Read return 0x00.
1. Register contents are reset when transition from STANDBY to ACTIVE mode occurs.
2. This register data is only valid in ACTIVE mode.
3. Register contents are preserved when transition from ACTIVE to STANDBY mode occurs.
4. Modification of this register’s contents can only occur when device is STANDBY mode except CTRL_REG1 ACTIVE bit and CTRL_REG2
RST bit.
Note:Auto-increment addresses which are not a simple increment are highlighted in bold. The auto-increment addressing is only enabled when
device registers are read using I
STOP condition is detected.
6.1Data Registers
The following are the data registers for the MMA8452Q. For more information on data manipulation of the MMA8452Q, refer
to application note, AN4076.
0x00: STATUS Data Status Register (Read Only)
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
ZYXOWZOWYOWXOWZYXDRZDRYDRXDR
Table 12. STATUS Description
X, Y, Z-axis Data Overwrite. Default value: 0
ZYXOW
ZOW
YOW
XOW
ZYXDR
ZDR
YDR
XDR
0: No data overwrite has occurred
1: Previous X, Y, or Z data was overwritten by new X, Y, or Z data before it was read
Z-axis Data Overwrite. Default value: 0
0: No data overwrite has occurred
1: Previous Z-axis data was overwritten by new Z-axis data before it was read
Y-axis Data Overwrite. Default value: 0
0: No data overwrite has occurred
1: Previous Y-axis data was overwritten by new Y-axis data before it was read
X-axis Data Overwrite. Default value: 0
0: No data overwrite has occurred
1: Previous X-axis data was overwritten by new X-axis data before it was read
X, Y, Z-axis new Data Ready. Default value: 0
0: No new set of data ready
1: A new set of data is ready
Z-axis new Data Available. Default value: 0
0: No new Z-axis data is ready
1: A new Z-axis data is ready
Y-axis new Data Available. Default value: 0
0: No new Y-axis data ready
1: A new Y-axis data is ready
X-axis new Data Available. Default value: 0
0: No new X-axis data ready
1: A new X-axis data is ready
MMA8452Q
Sensors
Freescale Semiconductor, Inc.19
ZYXOW is set whenever a new acceleration data is produced before completing the retrieval of the previous set. This event
occurs when the content of at least one accele ration data register (i.e., OU T_X, OUT _Y, OUT_Z) has bee n overwr itte n. ZYX OW
is cleared when the high-bytes of the acceleration data (OUT_X_MSB, OUT_Y_MSB, OUT_Z_MSB) of all the active channels are
read.
ZOW is set whenever a new acceleration sample related to the Z-axis is generated before the retrieval of the previous sample.
When this occurs the previous sample is overwritten. ZOW is cleared anytime OUT_Z_MSB register is read.
YOW is set whenever a new acceleration sample related to the Y-axis is generated before the retrieval of the previous sample.
When this occurs the previous sample is overwritten. YOW is cleared anytime OUT_Y_MSB register is read.
XOW is set whenever a new acceleration sample related to the X-axis is generated before the retrieval of the previous sample.
When this occurs the previous sample is overwritten. XOW is cleared anytime OUT_X_MSB register is read.
ZYXDR signals that a new sample for any of the enabled channels is available. ZYXDR is cleared when the high-bytes of the
acceleration data (OUT_X_MSB, OUT_Y_MSB, OUT_Z_MSB) of all the enabled channels are read.
ZDR is set whenever a new acceleration sample related to the Z-axis is generated. ZDR is cleared anytime OUT_Z_MSB register
is read.
YDR is set whenever a new acceleration sample related to the Y -axis is generated. YDR is cleared anytime OUT_Y_MSB register
is read.
XDR is set whenever a new acceleration sample related to the X-axis is generated. XDR is cleared anytime OUT_X_MSB register
is read.
These registers contain the X-axis, Y-axis, and Z-axis 12-bit output sample data expressed as 2's complement numbers. The
sample data output registers store the current sample data.
0x01: OUT_X_MSB: X_MSB Register (Read Only)
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
XD11XD10XD9XD8XD7XD6XD5XD4
0x02: OUT_X_LSB: X_LSB Registe r (Read Only)
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
XD3XD2XD1XD00000
0x03: OUT_Y_MSB: Y_MSB Register (Read Only)
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
YD11YD10YD9YD8YD7YD6YD5YD4
0x04: OUT_Y_LSB: Y_LSB Register (Read Only)
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
YD3YD2XD1XD00000
0x05: OUT_Z_MSB: Z_MSB Register (Read Only)
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
ZD11ZD10ZD9ZD8ZD7ZD6ZD5ZD4
0x06: OUT_Z_LSB: Z_LSB Re gister (Read Only)
Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
ZD3ZD2ZD1ZD0 0000
OUT_X_MSB, OUT_X_LSB, OUT_Y_MSB, OUT_Y_LSB, OUT_Z_MSB, and OUT_Z_LSB are stored in the autoincrementing address range of 0x01 to 0x06 to reduce reading the status followed by 12-bit axis data to 7 bytes. If the F_READ
bit is set (0x2A bit 1), auto-increment will skip over LSB registers. This will shorten the data acquisition from
7 bytes to 4 bytes. The LSB registers can only be read immediately following the read access of the corresponding MSB register.
A random read access to the LSB registers is not possible. Reading the MSB register and then the LSB register in sequence
ensures that both bytes (LSB and MSB) belong to the same data sample, even if a new data sample arrives between reading the
MSB and the LSB byte.
0x0B: SYSMOD System Mode Register
The system mode register indicates the current device operating mode. Applications using the Auto-SLEEP/WAKE mechanism
should use this register to synchronize the application with the device operating mode transitions.
0x0B: SYSMOD: System Mode Register (Read Only)
7
Bit
000000SYSMOD1SYSMOD0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
MMA8452Q
Sensors
20Freescale Semiconductor, Inc.
Table 13. SYSMOD Description
System Mode. Default value: 00.
SYSMOD[1:0]
00: STANDBY mode
01: WAKE mode
10: SLEEP mode
0x0C: INT_SOURCE System Interrupt Status Register
In the interrupt source register the status of the various embedded features can be determined. The bits that are set (logic ‘1’)
indicate which function has asserted an interrupt and conversely the bits that are cleared (logic ‘0’) indicate which function has
not asserted or has deasserted an interrupt. The bits are set by a low to high tr ansition and are cleared by reading the appropriate interrupt source register . The SRC_DRDY bit is cleared by reading the X, Y and Z data. It is not cleared by simply
reading the Status Register (0x00).
0x0C: INT_SOURCE: System Interrupt Status Register (Read Only)
Auto-SLEEP/WAKE interrupt status bit. Default value: 0.
Logic ‘1’ indicates that an interrupt event that can cause a WAKE to SLEEP or SLEEP to WAKE system mode transition
has occurred.
Logic ‘0’ indicates that no WAKE to SLEEP or SLEEP to WAKE system mode transition interrupt event has occurred.
SRC_ASLP
SRC_TRANS
SRC_LNDPRT
SRC_PULSE
SRC_FF_MT
SRC_DRDY
WAKE to SLEEP transition occurs when no interrupt occurs for a time period that exceeds the user specified limit
(ASLP_COUNT). This causes the system to transition to a user specified low ODR setting.
SLEEP to WAKE transition occurs when the user specified interrupt event has woken the system; thus causing the
system to transition to a user specified high ODR setting.
Reading the SYSMOD register clears the SRC_ASLP bit.
Transient interrupt status bit. Default value: 0.
Logic ‘1’ indicates that an acceleration transient value greater than user specified
indicates that no transient event has occurred.
This bit is asserted whenever “EA” bit in the TRANS_SRC is asserted and
cleared by reading the TRANS_SRC register.
Landscape/Portrait Orientation interrupt status bit. Default value: 0.
Logic ‘1’ indicates that an interrupt was generated due to a change in the device orientation status. Logic ‘0’ indicates
that no change in orientation status was detected.
This bit is asserted whenever “NEWLP” bit in the PL_STATUS is asserted and the
This bit is cleared by reading the PL_STATUS register.
Pulse interrupt status bit. Default value: 0.
Logic ‘1’ indicates that an interrupt was generated due to single and/or double pulse event. Logic ‘0’ indicates that no
pulse event was detected.
This bit is asserted whenever “EA” bit in the PULSE_SRC is asserted and the interrupt has been enabled.
This bit is cleared by reading the PULSE_SRC register.
Freefall/Motion interrupt status bit. Default value: 0.
Logic ‘1’ indicates that the Freefall/Motion function interrupt is active. Logic ‘0’ indicates that no Freefall or Motion event
was detected.
This bit is asserted whenever “EA” bit in the FF_MT_SRC register is asserted and the FF_MT interrupt has been
enabled.
This bit is cleared by reading the FF_MT_SRC register.
Data Ready Interrupt bit status. Default value: 0.
Logic ‘1’ indicates that the X, Y, Z data ready interrupt is active indicating the presence of new data and/or data overrun.
Otherwise if it is a logic ‘0’ the X, Y, Z interrupt is not active.
This bit is asserted when the ZYXOW and/or ZYXDR is set and the interrupt has been enabled.
This bit is cleared by reading the X, Y, and Z data.
threshold has
the interrupt
interrupt has
occurred. Logic ‘0’
has been enabled. This bit is
been enabled.
MMA8452Q
Sensors
Freescale Semiconductor, Inc.21
0x0D: WHO_AM_I Device ID Register
The device identification register identifies the part. The default value is 0x2A. This value is factory programmed. Consult the
factory for custom alternate values.
0x0D: WHO_AM_I Device ID Register (Read Only)
7
Bit
00101 0 10
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0x0E: XYZ_DATA_CFG Register
The XYZ_DATA_CFG register sets the dynamic range and sets the high-pass filter for the output data. When the HPF_OUT
bit is set. The data registers 0x01 - 0x06 will contain high-pass filtered data when this bit is set.
0x0E: XYZ_DATA_CFG (Read/Write)
7
Bit
000HPF_OUT0 0 FS1FS0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
Table 15. XYZ Data Configuration Descriptions
HPF_OUT
FS[1:0]
Enable High-Pass output data 1 = output data high-pass filtered. Default value: 0
Output buffer data format full scale. Default value: 00 (2g).
The default full scale value range is 2g and the high-pass filter is disabled.
Table 16. Full Scale Range
FS1FS0Full Scale Range
002
014
108
11 Reserved
0
0
0x0F: HP_FILTER_CUTOFF High-Pass Filter Register
This register sets th e high -pass filter cutoff frequency for removal of the offset and slower changing acceleration data. The
output of this filter is indicated by the data registers (0x01-0x06) when bit 4 (H PF_OUT) of Reg ister 0x0E is set. The filter cutoff
options change based on the data rate selected as shown in Table 18. For details of implementation on the high-pass filter, refer
to Freescale application note, AN4071.
6.2Portrait/ Landscape Embedded Function Registers
For more details on the meaning of the different user configurable settings and for example code refer to Freescale application
note, AN4068.
0x10: PL_STATUS Portrait/Landscape Status Register
This status register can be read to get updated information on any change in orientation by reading Bit 7, or on the specifics
of the orientation by rea d ing th e ot her bits. For further understanding of Portrait Up, Portrait Down, Landscape Left, La n dsca pe
Right, Back and Front orientations please refer to Figure 3. The interrupt is cleared when reading the PL_STATUS register.
0x10: PL_STATUS Register (Read Only)
7
Bit
NEWLPLO000LAPO[1]LAPO[0]BAFRO
Table 19. PL_STATUS Register Description
NEWLP
LO
LAPO[1:0]
1. The default power up state is BAFRO = 0, LAPO = 0, and LO = 0.
(1)
BAFRO
Bit
6
Landscape/Portrait status change flag. Default value: 0.
0: No change, 1: BAFRO and/or LAPO and/or Z-Tilt lockout value has changed
Z-Tilt Angle Lockout. Default value: 0.
0: Lockout condition has not been detected.
1: Z-Tilt lockout trip angle has been exceeded. Lockout has been detected.
Landscape/Portrait orientation. Default value: 00
00: Portrait Up: Equipment standing vertically in the normal orientation
01: Portrait Down: Equipment standing vertically in the inverted orientation
10: Landscape Right: Equipment is in landscape mode to the right
11: Landscape Left: Equipment is in landscape mode to the left.
Back or Front orientation. Default value: 0
0: Front: Equipment is in the front facing orientation.
1: Back: Equipment is in the back facing orientation.
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
NEWLP is set to 1 after the first orientation detection after a STANDBY to A CTIVE transition, and whenever a change in LO,
BAFRO, or LAPO occurs. NEWLP bit is cleared anytime PL_STA TUS register is read.
The Orientation mechanism state change
is limited to a maximum 1.25g. LAPO BAFRO and LO continue to change when NEWLP is set. The current position is locked if
the absolute value of the acceleration experienced on any of the three axes is greater than 1.25g.
MMA8452Q
Sensors
Freescale Semiconductor, Inc.23
0x11: Portrait/Landscape Configuration Register
This register enables the Portrait/Landscape function and sets the behavior of the debounce counter.
0x11: PL_CFG Register (Read/Write)
7
Bit
DBCNTMPL_EN000000
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
Table 20. PL_CFG Description
Debounce counter mode selection. Default value: 1
DBCNTM
PL_EN
0: Decrements debounce whenever condition of interest is no longer valid.
1: Clears counter whenever condition of interest is no longer valid.
Portrait/Landscape Detection Enable. Default value: 0
0: Portrait/Landscape Detection is Disabled.
1: Portrait/Landscape Detection is Enabled.
0x12: Portrait/Landscape Debounce Counter
This register sets the debounce count for the orientation state transition. The minimum debounce latency is determined by the
data rate set by the product of the selected system ODR and PL_COUNT registers. Any transition from WAKE to SLEEP or vice
versa resets the internal Landscape/Portrait debounce counter. Note: The debounce counter weighting (time step) changes
based on the ODR and the Oversampling mode. Table 22 explains the time step value for all sample rates and all Oversampling
modes.
Portrait/Landscape Fixed Threshold angle = 1_0000 (45°).
This is a fixed angle added to the threshold angle for a smoother transition from Portrait to Landscape and Landscape to
Portrait. This angle is fixed at ±14°, which is 100.
Table 25. Trip Angles with Hysteresis for 45° Angle
Hysteresis
Register Value
4±1459°31°
Hysteresis
± Angle Range
Landscape to Portrait
Trip Angle
Portrait to Landscape
Trip Angle
6.3Motion and Freefall Embedded Function Registers
The freefall/motion function can be configured in either freefall or motion detection mode via the OAE configuration bit (0x15
bit 6). The freefall/motion detection block can be disabled by setting all three bits ZEFE, YEFE, and XEFE to zero.
Depending on the register bits ELE (0x15 bit 7) and OAE (0x15 bit 6), each of the freefall and motion detection block can
operate in four different modes:
Mode 1: Freefall Detection with ELE = 0, OAE = 0
In this mode, the EA bit (0x16 bit 7) indicates a freefall event after the debounce counter is complete. The ZEFE, YEFE, and
XEFE control bits determine which axes are considered for the freefall detection. Once the EA bit is set, and DBCNTM = 0, the
EA bit can get cleared only after the delay specified by FF_MT_COUNT. This is because the counter is in decrement mode. If
DBCNTM = 1, the EA bit is cleared as soon as the freefall condition disappears, and will not be set again before the delay
specified by FF_MT_COUNT has passed. Reading the FF_MT_SRC register does not clear the EA bit. The event flags (0x16)
ZHE, ZHP, YHE, YHP, XHE, and XHP reflect the motion detection status (i.e. high-g event) without any debouncing, provided
that the corresponding bits ZEFE, YEFE, and/or XEFE are set.
Mode 2: Freefall Detection with ELE = 1, OAE = 0
In this mode, the EA event bit indicates a freefall event after the debounce counter. Once the debounce counter reaches the
time value for the set threshold, the EA bit is set, and remains set until the FF_MT_SRC register is read. When the FF_MT_SRC
register is read, the EA bit and the debounce counter are cleared and a new event can only be generated after the delay specified
by FF_MT_CNT. The ZEFE, YEFE, and XEFE control bits determine which axes are considered for the freefall detection. While
EA = 0, the event flags ZHE, ZHP, YHE, YHP, XHE, and XHP reflect the motion detection status (i.e., high-g event) without any
debouncing, provided that the corresponding bits ZEFE, YEFE, and/or XEFE are set. The event flags ZHE, ZHP , YHE, YHP, XHE,
and XHP are latched when the EA event bit is set. The event flags ZHE, ZHP, YHE, YHP, XHE, and XHP will start changing only
after the FF_MT_SRC register has been read.
Mode 3: Motion Detection with ELE = 0, OAE = 1
In this mode, the EA bit indicates a motion event after the debounce counter time is reached. The ZEFE, YEFE, and XEFE
control bits determine which axes are taken into consideration for motion detection. Once the EA bit is set, and DBCNTM = 0,
the EA bit can get cleared only after the delay specified by FF_MT_COUNT . If DBCNTM = 1, the EA bit is cleared as soon as the
motion high-g condition disappears. The event flags ZHE, ZHP, YHE, YHP, XHE, and XHP reflect the motion detection status
(i.e., high-g event) without any debouncing, provided that the corresponding bits ZEFE, YEFE, and/or XEFE are set. Reading the
FF_MT_SRC does not clear any flags, nor is the debounce counter reset.
Mode 4: Motion Detection with ELE = 1, OAE = 1
In this mode, the EA bit indicates a motion event after debouncing. The ZEFE, YEFE, and XEFE control bits determine which
axes are taken into consideration for motion detection. Once the debounce counter reaches the threshold, the EA bit is set, and
remains set until the FF_MT_SRC register is read. When the FF_MT_SRC register is read, all register bits are cleared and the
debounce counter are cleared and a new event can only be generated after the delay specified by FF_MT_CNT. While the bit
EA is zero, the event flags ZHE, ZHP, YHE, YHP, XHE, and XHP reflect the motion detection status (i.e., high-g event) without
any debouncing, provided that the corresponding bits ZEFE, YEFE, and/or XEFE are set. When the EA bit is set, these bits keep
their current value until the FF_MT_SRC register is read.
This is the Freefall/Motion configuration register for setting up the conditions of the freefall or motion function.
0x15: FF_MT_CFG Register (Read/Write)
7
Bit
ELEOAEZEFEYEFEXEFE000
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
Table 26. FF_MT_CFG Description
Event Latch Enable: Event flags are latched into FF_MT_SRC register. Reading of the FF_MT_SRC register clears the event
ELE
OAE
ZEFE
YEFE
XEFE
flag EA and all FF_MT_SRC bits. Default value: 0.
0: Event flag latch disabled; 1: event flag latch enabled
Motion detect / Freefall detect flag selection. Default value: 0. (Freefall Flag)
0: Freefall Flag (Logical AND combination)
1: Motion Flag (Logical OR combination)
Event flag enable on Z Default value: 0.
0: event detection disabled; 1: raise event flag on measured acceleration value beyond preset threshold
Event flag enable on Y event. Default value: 0.
0: Event detection disabled; 1: raise event flag on measured acceleration value beyond preset threshold
Event flag enable on X event. Default value: 0.
0: event detection disabled; 1: raise event flag on measured acceleration value beyond preset threshold
OAE bit allows the selection between Motion (logical OR combination) and Freefall (logical AND combination) detection.
ELE denotes whether the enabled event flag will to be latched in the FF_MT_SRC register or the event flag status in the
FF_MT_SRC will indicate the real-time status of the event. If ELE bit is set to a logic ‘1’, then the event flags are frozen when the
EA bit gets set, and are cleared by readin g th e FF_MT_SRC source register.
ZHFE, YEFE, XEFE enable the detection of a motion or freefall event when the measured acceleration data on X, Y, Z channel
is beyond the threshold set in FF_MT_THS register. If the ELE bit is set to logic ‘1’ in the FF_MT_CFG register new event flags
are blocked from updating the FF_MT_SRC register.
FF_MT_THS is the threshold register used to detect freefall motion events. The unsigned 7-bit FF_MT_THS threshold register
holds the threshold for the freefall detection where the magnitude of the X and Y and Z acceleration values is lower or equal than
the threshold value. Conversely, the FF_MT_THS also holds the threshold for the motion detection where the magnitude of the
X or Y or Z acceleration value is higher than the threshold value.
Figure 12. FF_MT_CFG High- and Low-g Level
0x16: FF_MT_SRC Freefall/Motion Source Register
0x16: FF_MT_SRC Freefall and Motion Source Register (Read Only)
Bit
7
EA0ZHEZHPYHEYHPXHEXHP
MMA8452Q
26Freescale Semiconductor, Inc.
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
Sensors
Table 27. Freefall/Motion Source Descripti on
Event Active Flag. Default value: 0.
EA
ZHE
ZHP
YHE
YHP
XHE
XHP
0: No event flag has been asserted; 1: one or more event flag has been asserted.
See the description of the OAE bit to determine the effect of the 3-axis event flags on the EA bit.
Z Motion Flag. Default value: 0.
0: No Z Motion event detected, 1: Z Motion has been detected
This bit reads always zero if the ZEFE control bit is set to zero
Z Motion Polarity Flag. Default value: 0.
0: Z event was Positive g, 1: Z event was Negative g
This bit read always zero if the ZEFE control bit is set to zero
Y Motion Flag. Default value: 0.
0: No Y Motion event detected, 1: Y Motion has been detected
This bit read always zero if the YEFE control bit is set to zero
Y Motion Polarity Flag. Default value: 0
0: Y event detected was Positive g, 1: Y event was Negative g
This bit reads always zero if the YEFE control bit is set to zero
X Motion Flag. Default value: 0
0: No X Motion event detected, 1: X Motion has been detected
This bit reads always zero if the XEFE control bit is set to zero
X Motion Polarity Flag. Default value: 0
0: X event was Positive g, 1: X event was Negative g
This bit reads always zero if the XEFE control bit is set to zero
This register keeps track of the acceleration event which is triggering (or has triggered, in case of ELE bit in FF_MT_CFG
register being set to 1) the event flag. In particular EA is set to a logic ‘1’ when the logical combination of acceleration events
flags specified in FF_MT_CFG register is true. This bit is used in combination with the values in INT_EN_FF_MT and
INT_CFG_FF_MT register bits to generate the freefall/motion interrupts.
An X,Y, or Z motion is true when the acceleration value of the X or Y or Z channel is higher than the preset threshold value
defined in the FF_MT_THS register.
Conversely an X, Y, and Z low event is true when the acceleration value of the X and Y and Z channel is lower than or equal
to the preset threshold value defined in the FF_MT_THS register.
0x17: FF_MT_THS Freefall and Motion Th re sh old Register
The threshold resolution is 0.063g/LSB and the threshold register has a range of 0 to 127 counts. The maximum range is to
8g. Note that even when the full scale value is set to 2g or 4g the motion detects up to 8g. If the Low-Noise bit is set in Register
0x2A then the maximum threshold will be limited to 4g regardless of the full scale range.
DBCNTM bit configures the way in which the debounce counter is reset when the inertial event of interest is momentarily not
true.
When DBCNTM bit is a logic ‘1’, the debounce counter is cleared to 0 whenever the inertial event of interest is no longer true
as shown in Figure 13, (b). While the DBCNTM bit is set to logic ‘0’ the debounce counter is decremented by 1 whenever the
inertial event of interest is no longer true (Figure 13, (c)) until the debounce counter reaches 0 or the inertial event of interest
becomes active.
Decrementing the debounce counter acts as a median enabling the system to filter out irregular spurious events which might
impede the detection of inertial events.
MMA8452Q
Sensors
Freescale Semiconductor, Inc.27
0x18: FF_MT_COUNT Debounce Register
This register sets the number of debounce sample counts for the event trigger.
0x18: FF_MT_COUNT_Register (Read/Write)
Bit
7
D7D6D5D4D3D2D1D0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
Table 29. FF_MT_COUNT Description
D[7:0]
Count value. Default value: 0000_0000
This register sets the minimum number of debounce sample counts of continuously matching the detection condition user
selected for the freefall, motion event.
When the internal debounce counter reaches the FF_MT_COUNT value a Freefall/Motion event flag is set. The debounce
counter will never increase beyond the FF_MT_COUNT value. Time step used for the debounce sample count depends on the
ODR chosen and the Oversampling mode as shown in Table 30.
For more information on the uses of the transient function please review Freescale application note, AN4071. This function is
similar to the motion detection except that high-pass filtered data is compared. There is an option to disable the high-pass filter
through the function. In this case the behavior is the same as the motion detection. This allows for the device to have 2 motion
detection functions.
0x1D: Transient_CFG Register
The transient detection mechanism can be configured to raise an interrupt when the magni tude of the high-pass filtered
acceleration threshold is exceeded. The TRANSIENT_CFG register is used to enable the transient interrupt generation
mechanism for the 3 axes (X, Y, Z) of acceleration. There is also an option to bypass the high-pass filter. When the high-pass
filter is bypassed, the function behaves similar to the motion detection.
0x1D: TRANSIENT_CFG Register (Read/Write)
7
Bit
000ELEZTEFEYTEFEXTEFEHPF_BYP
Table 31. TRANSIENT_CFG Description
Transient event flags are latched into the TRANSIENT_SRC register. Reading of the TRANSIENT_SRC register clears the event
ELE
ZTEFE
YTEFE
XTEFE
HPF_BYP
flag. Default value: 0.
0: Event flag latch disabled; 1: Event flag latch enabled
Event flag enable on Z transient acceleration greater than transient threshold event. Default value: 0.
0: Event detection disabled; 1: Raise event flag on measured acceleration delta value greater than transient threshold.
Event flag enable on Y transient acceleration greater than transient threshold event. Default value: 0.
0: Event detection disabled; 1: Raise event flag on measured acceleration delta value greater than transient threshold.
Event flag enable on X transient acceleration greater than transient threshold event. Default value: 0.
0: Event detection disabled; 1: Raise event flag on measured acceleration delta value greater than transient threshold.
Bypass High-Pass filter Default value: 0.
0: Data to transient acceleration detection block is through HPF 1: Data to transient acceleration detection block is NOT through
HPF (similar to motion detection function)
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
0x1E: TRANSIENT_SRC Register
The Transient Source register provides the status of the enabled axes and the polarity (directional) information. When this
register is read it clears the interrupt for the transient detection. When new events arrive while EA = 1, additional *TRANSE bits
may get set, and the corresponding *_Trans_Pol flag become updated. However, no *TRANSE bit may get cleared before the
TRANSIENT_SRC register is read.
Event Active Flag. Default value: 0.
0: no event flag has been asserted; 1: one or more event flag has been asserted.
Z transient event. Default value: 0.
0: no interrupt, 1: Z Transient acceleration greater than the value of TRANSIENT_THS event has occurred
Polarity of Z Transient Event that triggered interrupt. Default value: 0.
0: Z event was Positive g, 1: Z event was Negative g
Y transient event. Default value: 0.
0: no interrupt, 1: Y Transient acceleration greater than the value of TRANSIENT_THS event has occurred
Polarity of Y Transient Event that triggered interrupt. Default value: 0.
0: Y event was Positive g, 1: Y event was Negative g
X transient event. Default value: 0.
0: no interrupt, 1: X Transient acceleration greater than the value of TRANSIENT_THS event has occurred
Polarity of X Transient Event that triggered interrupt. Default value: 0.
0: X event was Positive g, 1: X event was Negative g
When the EA bit gets set while ELE = 1, all other status bits get frozen at their current state. By reading the TRANSIENT_SRC
register, all bits get cleared.
MMA8452Q
Sensors
30Freescale Semiconductor, Inc.
0x1F: TRANSIENT_THS Register
The Transient Threshold register sets the threshold limit for the detection of the transient acceleration. The value in the
TRANSIENT_THS register corresponds to a g value which is compared against the values of High-Pass Filtered Data. If the HighPass Filtered acceleration value exceeds the threshold limit, an event flag is raised and the interrupt is generated if enabled.
The threshold THS[6:0] is a 7-bit unsigned number, 0.063g/LSB. The maximum threshold is 8g. Even if the part is set to full
scale at 2g or 4g this function will still operate up to 8g. If the Low-Noise bit is set in Register 0x2A, the maximum threshold to be
reached is 4g.
Note: If configuring the transient detection threshold for less than 1g, the high-pass filter will need some settling time. The settling
time will vary depending on selected ODR, high-pass frequency cutoff and threshold. For more information, please refer to
Freescale application note, AN4071.
0x20: TRANSIENT_COUNT
The TRANSIENT_COUNT sets the minimum number of debounce counts continuously matching the cond ition where the
unsigned value of high-pass filtered data is greater than the user specified value of TRANSIENT_THS.
0x20: TRANSIENT_COUNT Register (Read/Write)
Bit
7
D7D6D5D4D3D2D1D0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
Table 34. TRANSIENT_COUNT Description
D[7:0]
Count value. Default
value: 0000_0000
.
The time step for the transient detection debounce counter is set by the value of the system ODR and the Oversampling mode.
Table 35. TRANSIENT_COUNT Relationship with the ODR
6.5Single, Double and Directional Pulse-Detection Registers
For more details of how to configure the pulse detection and sample code, please refer to Freescale application note, AN4072.
The pulse-detection registers are referred to as “Pulse”.
0x21: PULSE_CFG Pulse Configuration Regi ster
This register configures the event flag for the pulse detection for enabling/disabling the detection of a single and dou ble pulse
on each of the axes.
0x21: PULSE_CFG Regist er (Read/Write)
7
Bit
DPAELEZDPEFEZSPEFEYDPEFEYSPEFEXDPEFEXSPEFE
Table 36. PULSE_CFG Description
Double Pulse Abort. Default value: 0.
DPA
ELE
ZDPEFE
ZSPEFE
YDPEFE
YSPEFE
XDPEFE
XSPEFE
0: Double Pulse detection is not aborted if the start of a pulse is detected during the time period specified by the PULSE_LTCY register.
1: Setting the DPA bit momentarily suspends the double pulse detection if the start of a pulse is detected during the time period
specified by the PULSE_LTCY register and the pulse ends before the end of the time period specified by the PULSE_LTCY register.
Pulse event flags are latched into the PULSE_SRC register. Reading of the PULSE_SRC register clears the event flag.
Default value: 0.
0: Event flag latch disabled; 1: Event flag latch enabled
Event flag enable on double pulse event on Z-axis. Default value: 0.
0: Event detection disabled; 1: Event detection enabled
Event flag enable on single pulse event on Z-axis. Default value: 0.
0: Event detection disabled; 1: Event detection enabled
Event flag enable on double pulse event on Y-axis. Default value: 0.
0: Event detection disabled; 1: Event detection enabled
Event flag enable on single pulse event on Y-axis. Default value: 0.
0: Event detection disabled; 1: Event detection enabled
Event flag enable on double pulse event on X-axis. Default value: 0.
0: Event detection disabled; 1: Event detection enabled
Event flag enable on single pulse event on X-axis. Default value: 0.
0: Event detection disabled; 1: Event detection enabled
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
0x22: PULSE_SRC Pulse Source Register
This register indicates a double or single pulse event has occurred and also which direction. The corresponding axis and event
must be enabled in Register 0x21 for the event to be seen in the source register.
0x22: PULSE_SRC Register (Read Only)
Bit
7
EAAxZAxYAxXDPEPolZPolYPolX
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
Table 37. PULSE_SRC Description
EA
AxZ
AxY
AxX
DPE
PolZ
PolY
PolX
Event Active Flag. Default value: 0.
(0: No interrupt has been generated; 1: One or more interrupt events have been generated)
Z-axis event. Default value: 0.
(0: No interrupt; 1: Z-axis event has occurred)
Y-axis event. Default value: 0.
(0: No interrupt; 1: Y-axis event has occurred)
X-axis event. Default value: 0.
(0: No interrupt; 1: X-axis event has occurred)
Double pulse on first event. Default value: 0.
(0: Single Pulse Event triggered interrupt; 1: Double Pulse event triggered interrupt)
Pulse polarity of Z-axis Event. Default value: 0.
(0: Pulse Event that triggered interrupt was Positive; 1: Pulse Event that triggered interrupt was negative)
Pulse polarity of Y-axis Event. Default value: 0.
(0: Pulse Event that triggered interrupt was Positive; 1: Pulse Event that triggered interrupt was negative)
Pulse polarity of X-axis Event. Default value: 0.
(0: Pulse Event that triggered interrupt was Positive; 1: Pulse Event that triggered interrupt was negative)
0
When the EA bit gets set while ELE = 1, all status bits (AxZ, AxY, AxZ, DPE, and PolX, PolY, PolZ) are frozen. Reading the
PULSE_SRC register clears all bits. Reading the source register will clear the interrupt.
MMA8452Q
Sensors
32Freescale Semiconductor, Inc.
0x23 - 0x25: PULSE_THSX, Y, Z Pulse Threshold for X, Y & Z Registers
The pulse threshold can be set separately for the X, Y and Z axes. The PULSE_THSX, PULSE_THSY and PULSE_THSZ
registers define the threshold which is used by the system to start the pulse detection procedure.
0x23: PULSE_THSX Register (Read/Writ e)
7
Bit
0THSX6THSX5THSX4THSX3THSX2THSX1THSX0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Table 38. PULSE_THSX Description
THSX[6:0]
0x24: PULSE_THSY Register (Read/Write )
7
Bit
0THSY6THSY5THSY4THSY3THSY2THSY1THSY0
Pulse Threshold on X-axis. Default value: 000_0000.
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Table 39. PULSE_THSY Description
THSY[6:0]
0x25: PULSE_THSZ Register (Read/Write)
7
Bit
0THSZ6THSZ5THSZ4THSZ3THSZ2THSZ1THSZ0
Pulse Threshold on Y-axis. Default value: 000_0000.
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Table 40. PULSE_THSZ Description
THSZ[6:0]
Pulse Threshold on Z-axis. Default value: 000_0000.
Bit
Bit
Bit
0
0
0
The threshold values range from 1 to 127 with steps of 0.63g/LSB at a fixed 8g acceleration range, thus the minimum
resolution is always fixed at 0.063g/LSB. If the Low-Noise bit in Register 0x2A is set then the maximum threshold will be 4g. The
PULSE_THSX, PULSE_THSY and PULSE_THSZ registers define the threshold which is used by the system to start the pulse
detection procedure. The threshold value is expressed over 7-bits as an unsigned number.
0x26: PULSE_TMLT Pulse Time Window 1 Register
0x26: PULSE_TMLT Register (Read/Write)
7
Bit
TMLT7
Bit
6
TMLT6
Bit
5
TMLT5
Bit
4
TMLT4
Bit
3
TMLT3
Bit
2
TMLT2
Bit
1
TMLT1
Bit
TMLT0
0
Table 41. PULSE_TMLT Description
TMLT[7:0]
Pulse Time Limit. Default value: 0000_0000.
The bits TMLT7 through TML T 0 define the maximum time interval that can elapse between the start of the acceleration on the
selected axis exceeding the specified threshold and the end when the acceleration on the selected axis must go below the
specified threshold to be considered a valid pulse.
The minimum time step for the pulse time limit is defined in Table 42and Table 43. Maximum time for a given ODR and
Oversampling mode is the time step pulse multiplied by 255. The time steps available are dependent on the Oversampling mode
and whether the Pulse Low-Pass Filter option is enabled or not. The Pulse Low-Pass Filter is set in Register 0x0F.
Table 42. Time Step for PULSE Time Limit (Reg 0x0F) Pulse_LPF_EN = 1
The bits LTCY7 through L TCY0 define the time interval that starts after the first pulse detection. During this time interval, all
pulses are ignored. Note: This timer must be set for single pulse and for double pulse.
The minimum time step for the pulse latency is defined in Table 45and Table 46. The maximum time is the time step at the ODR
and Oversampling mode multiplied by 255. The timing also changes when the Pulse LPF is enable d or disabled.
Table 45. Time Step for PULSE Latency @ ODR and Power Mode (Reg 0x0F) Pulse_LPF_EN = 1
0x28: PULSE_WIND Second Pulse Time Window Register
Bit
7
WIND7WIND6WIND5WIND4WIND3WIND2WIND1WIND0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
Table 47. PULSE_WIND Description
WIND[7:0]
Second Pulse Time Window. Default value: 0000_0000.
The bits WIND7 through WIND0 define the maximum interval of time that can elapse after the end of the latency interval in which
the start of the second pulse event must be detected provided the device has been configured for double pulse detection. The
detected second pulse width must be shorter than the time limit constraints specified by the PULSE_TMLT register, but the end
of the double pulse need not finish within the time specified by the PULSE_WIND register.
The minimum time step for the pulse window is defined in T able48and Table49. The maximum time is the time step at the ODR,
Oversampling mode and LPF Filter Option multiplied by 255.
Table 48. Time Step for PULSE Detection Window @ ODR and Power Mode (Reg 0x0F) Pulse_LPF_EN = 1
The ASLP_COUNT register sets the minimum time period of inactivity required to change current ODR value from the value
specified in the DR[2:0] register to ASLP_RATE register value, provided the SLPE bit is set to a logic ‘1’ in the CTRL_REG2
register. See Table 52 for functional blocks that may be monitored for inactivity in order to trigger the “return to SLEEP” event.
0x29: ASLP_COUNT Register (Read/Write)
Bit
7
D7D6D5D4D3D2D1D0
Table 50. ASLP_COUNT Description
D[7:0]
D7-D0 defines the minimum duration time to change current ODR value from DR to ASLP_RATE. Time step and maximum
value depend on the ODR chosen as shown in Table 51.
Bit
6
Duration value. Default value: 0000_0000.
Bit
5
Bit
4
Bit
3
Table 51. ASLP_COUNT Relationship with ODR
Output Data Rate
(ODR)
800 Hz0 to 81s1.25 ms320 ms
400 Hz0 to 81s2.5 ms320 ms
200 Hz0 to 81s5 ms320 ms
100 Hz0 to 81s10 ms320 ms
50 Hz0 to 81s20 ms320 ms
12.5 Hz0 to 81s80 ms320 ms
6.25 Hz0 to 81s160 ms320 ms
1.56 Hz0 to 162s640 ms640 ms
DurationODR Time StepASLP_COUNT Step
Bit
2
Bit
1
Bit
0
Table 52. SLEEP/WAKE Mode Gates and Triggers
Interrupt Source
SRC_TRANSYesYes
SRC_LNDPRTYesYes
SRC_PULSEYesYes
SRC_FF_MTYesYes
SRC_ASLPNo*No*
SRC_DRDYNoNo
Event restarts timer and
delays Return to SLEEP
Event will WAKE from SLEEP
In order to wake the device, the desired function or functions must be enabled in CTRL_REG4 and set to WAK E to SLEEP in
CTRL_REG3. All enabled functions will still function in SLEEP mode at the SLEEP ODR. Only the functions that have been
selected for WAKE from SLEEP will WAKE the device.
MMA8452Q has four functions that can be used to keep the sensor from falling aslee p; Transient, Orientation, Pulse, and
Motion/FF. One or more of these functions can be enabled. In order to WAKE the device, four functions are provided; Transient,
Orientation, Pu l se, and the Motion/Freefall. The Auto-WAKE/SLEEP interrupt does not affect the WAKE/SLEEP, nor does the data
ready interrupt. See Register 0x2C for the WAKE from SLEEP bits.
If the Auto-SLEEP bit is disabled, then the device can only toggle between STANDBY and WAKE mode. If Auto-SLEEP
interrupt is enabled, transitioning from ACTIVE mode to Auto-SLEEP mode and vice versa generates an interrupt.
MMA8452Q
Sensors
36Freescale Semiconductor, Inc.
6.7Control Registers
Note: Except for STANDBY mode selection, the device must be in STANDBY mode to change any of the fields within
CTRL_REG1 (0X2A).
0x2A: CTRL_REG1 System Control 1 Register
0x2A: CTRL_REG1 Register (Read/Write)
Bit
7
ASLP_RATE1ASLP_RATE0DR2DR1DR0LNOISEF_READACTIVE
Table 53. CTRL_REG1 Description
ASLP_RATE[1:0]
DR[2:0]
LNOISE
F_READ
ACTIVE
Bit
6
Configures the Auto-WAKE sample frequency when the device is in SLEEP Mode. Default value: 00.
See Table 54 for more information.
Data rate selection. Default value: 000.
See Table 55 for more information.
Reduced noise reduced Maximum range mode. Default value: 0.
(0: Normal mode; 1: Reduced Noise mode)
Fast Read mode: Data format limited to single Byte Default value: 0.
(0: Normal mode 1: Fast Read Mode)
Full Scale selection. Default value: 00.
(0: STANDBY mode; 1: ACTIVE mode)
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Table 54. SLEEP Mode Rate Description
ASLP_RATE1ASLP_RATE0Frequency (Hz)
0050
0112.5
106.25
111.56
Bit
0
It is important to note that when the device is Auto-SLEEP mode, the system ODR and the data rate for all the system
functional blocks are overridden by the data rate set by the ASLP_RATE field.
DR[2:0] bits select the Output Data Rate (ODR) for acceleration samples. The default value is 000 for a data rate of 800 Hz.
Table 55. System Output Data Rate Selection
DR2DR1DR0ODRPeriod
000800 Hz1.25 ms
001400 Hz2.5 ms
010200 Hz5 ms
011100 Hz10 ms
10050 Hz20 ms
10112.5 Hz80 ms
1106.25 Hz160 ms
1111.56 Hz640 ms
ACTIVE bit selects between STANDBY mode and ACTIVE mode. The default value is 0 for STANDBY mode.
Table 56. Full Scale Selection
ActiveMode
0STANDBY
1ACTIVE
LNOISE bit selects between normal full dynamic range mode and a high sensitivity, Low Noise mode. In Low Noise mode, the
maximum signal that can be measured is ±4g. Note: Any thresholds set above 4g will not be reached.
F_READ bit selects between Normal and Fast Read mode. When selected, the auto-increment counter will skip over the LSB
data bytes.
MMA8452Q
Sensors
Freescale Semiconductor, Inc.37
0x2B: CTRL_REG2 System Control 2 Register
0x2B: CTRL_REG2 Register (Read/Write)
Bit
7
STRST0SMODS1SMODS0SLPEMODS1MODS0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
Table 57. CTRL_REG2 Description
ST
RST
SMODS[1:0]
SLPE
MODS[1:0]
Self-Test Enable. Default value: 0.
0: Self-Test disabled; 1: Self-Test enabled
Software Reset. Default value: 0.
0: Device reset disabled; 1: Device reset enabled.
SLEEP mode power scheme selection. Default value: 00.
See Table 58 and Table 59
Auto-SLEEP enable. Default value: 0.
0: Auto-SLEEP is not enabled;
1: Auto-SLEEP is enabled.
ACTIVE mode power scheme selection. Default value: 00.
See Table 58 and Table 59
ST bit activates the self-test function. When ST is set, X, Y, and Z outputs will shift. RST bit is used to activate the software reset.
The reset mechanism can be enabled in STANDBY and ACTIVE mode.
When the reset bit is enabled, all registers are rest and are loaded with default values. Writing ‘1’ to the RST bit immediately
resets the device, no matter whether it is in ACTIVE/WAKE, ACTIVE/SLEEP, or STANDBY mode.
2
C communication system is reset to avoid accidental corrupted data access.
The I
At the end of the boot process the RST bit is deasserted to 0. Reading this bit will return a value of zero.
The (S)MODS[1:0] bits select which Oversampling mode is to be used shown in Table 58. The Oversampling modes are
available in both WAKE Mode MOD[1:0] and also in the SLEEP Mode SMOD[1:0].
Table 58. MODS Oversampling Modes
(S)MODS1(S)MODS0Power Mode
00 Normal
01Low Noise Low Power
10High Resolution
11Low Power
Table 59. MODS Oversampling Modes Current Consumption and Averaging Value s at each ODR
ModeNormal (00)Low Noise Low Power (01)High Resolution (10)Low Power (11)
0: Transient function is bypassed in SLEEP mode. Default value: 0.
1: Transient function interrupt can wake up system
0: Orientation function is bypassed in SLEEP mode. Default value: 0.
1: Orientation function interrupt can wake up system
0: Pulse function is bypassed in SLEEP mode. Default value: 0.
1: Pulse function interrupt can wake up system
0: Freefall/Motion function is bypassed in SLEEP mode. Default value: 0.
1: Freefall/Motion function interrupt can wake up
Interrupt polarity ACTIVE high, or ACTIVE low. Default value: 0.
0: ACTIVE low; 1: ACTIVE high
Push-Pull/Open Drain selection on interrupt pad. Default value: 0.
0: Push-Pull; 1: Open Drain
IPOL bit selects the polarity of the interrupt signal. When IPOL is ‘0’ (default value) any interrupt event will signaled with a
logical 0.
PP_OD bit configures the interrupt pin to Push-Pull or in Open Drain mode. The default value is 0 which corresponds to PushPull mode. The Open Drain configuration can be used for connecting multiple interrupt signals on the same interrupt line.
INT1/INT2 Configuration. Default value: 0.
0: Interrupt is routed to INT2 pin; 1: Interrupt is routed to INT1 pin
INT1/INT2 Configuration. Default value: 0.
0: Interrupt is routed to INT2 pin; 1: Interrupt is routed to INT1 pin
INT1/INT2 Configuration. Default value: 0.
0: Interrupt is routed to INT2 pin; 1: Interrupt is routed to INT1 pin
INT1/INT2 Configuration. Default value: 0.
0: Interrupt is routed to INT2 pin; 1: Interrupt is routed to INT1 pin
INT1/INT2 Configuration. Default value: 0.
0: Interrupt is routed to INT2 pin; 1: Interrupt is routed to INT1 pin
INT1/INT2 Configuration. Default value: 0.
0: Interrupt is routed to INT2 pin; 1: Interrupt is routed to INT1 pin
The system’s interrupt controller shown in Figure 10uses the corresponding bit field in the CTRL_REG 5 register to determine
the routing table for the INT1 and INT2 interrupt pins. If the bit value is logic ‘0’, the functional block’s interrupt is routed to INT2,
and if the bit value is logic ‘1’, then the interrupt is routed to INT1. One or more functions can assert an interrupt pin; therefore a
host application responding to an interrupt should read the INT_SOURCE (0x0C) register to determine the appropriate sources
of the interrupt.
6.8User Offset Correction Registers
For more information on how to calibrate the 0g offset, refer to application note AN4069. The 2’s complement offset correction
registers values are used to realign th e Ze ro -g position of the X, Y, and Z-axis after device board mount. The resolution of the
offset registers is 2 mg per LSB. The 2’s complement 8-bit value would result in an offset compensation range ±256 mg.
0x2F: OFF_X Offset Correction X Register
0x2F: OFF_X Register (Read/Write)
7
Bit
D7D6D5D4D3D2D1D0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
Table 63. OFF_X Description
D[7:0]
X-axis offset value. Default value: 0000_0000.
0x30: OFF_Y Offset Correction Y Register
0x30: OFF_Y Register (Read/Write)
Bit
7
D7D6D5D4D3D2D1D0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Table 64. OFF_Y Description
D[7:0]
Y-axis offset value. Default value: 0000_0000.
0x31: OFF_Z Offset Correction Z Register
0x31: OFF_Z Register (Read/Write)
Bit
7
D7D6D5D4D3D2D1D0
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Table 65. OFF_Z Description
D[7:0]
Z-axis offset value. Default value: 0000_0000.
MMA8452Q
Bit
Bit
0
0
Sensors
40Freescale Semiconductor, Inc.
Table 66. MMA8452Q Register Map
RegNameDefinitionBit 7 Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
00STATUSData Status RZYXOWZOWYOWXOWZYXDRZDRYDRXDR
01OUT_X_MSB12-bit X Data RXD11XD10XD9XD8XD7XD6XD5XD4
02OUT_X_LSB12-bit X Data RXD3XD2XD1XD00000
03OUT_Y_MSB12-bit Y Data RYD11YD10YD9YD8YD7YD6YD5YD4
04OUT_Y_LSB12-bit Y Data RYD3YD2YD1YD00000
05OUT_Z_MSB12-bit Z Data RZD11ZD10ZD9ZD8ZD7ZD6ZD5ZD4
06OUT_Z_LSB12-bit Z Data RZD3ZD2ZD1ZD00000
0BSYSMODSystem Mode R000000SYSMOD1SYSMOD0
0CINT_SOURCEInterrupt Status RSRC_ASLP0SRC_TRANSSRC_LNDPRTSRC_PULSESRC_FF_MT0SRC_DRDY
Printed Circuit Board (PCB) layout and device mounting are critical portions of the total design. The footprint for the surface
mount packages must be the correct size as a base for a proper solder connection between the PCB and the package. This,
along with the recommended soldering materials and techniques, will optimize assembly and minimize the stress on the package
after board mounting.
Freescale application note AN4530, “QFN (Quad Flat Pack No-Lead)” discusses the QFN package used by the FXAS21000.
7.1Printed Circuit Board Layout
The following recommendations are a guide to an effective PCB layout. See Figure 14 for footprint dimensions.
1.Do not solder down Exposed Pad (EP) under the package to minimize board mounting stress impact to product
performance.
2.PCB landing pad is 0.813 mm x 0.305 mm as shown in Figure 14.
3.Solder mask opening = PCB land pad edge + 0.2 mm larger all around.
4.Stencil opening size is 0.787 mm x 0.280 mm.
5.Stencil thickness is 100 or 125 μm.
6.The solder mask should not cover any of the PCB landing pads, as shown in Figure 14.
7.No additional via nor metal pattern underneath package on the top of the PCB layer.
8.Do not place any components or vias within 2 mm of the package land area. This may cause additional package stress
if it is too close to the package land area.
9.Signal traces connected to pads should be as symmetric as possible. Put dummy traces on NC pads, to have same
length of exposed trace for all pads.
10. Use a standard pick and place process and equipment. Do not use a hand soldering process.
11. Customers are advised to be cautious about the proximity of screw down holes to the sensor, and the location of any
press fit to the assembled PCB when in an enclosure. It is important that the assembled PCB remain flat after
assembly to keep electronic operation of the device optimal.
12. The PCB should be rated for the multiple lead-free reflow condition with max 260°C temperature.
13. Freescale sensors are compliant with Restrictions on Hazardous Substances (RoHS), having halide free molding
compound (green) and lead-free terminations. These terminations are compatible with tin-lead (Sn-Pb) as well as tinsilver-copper (Sn-Ag-Cu) solder paste soldering processes. Reflow profiles applicable to those processes can be used
successfully for soldering the devices.
MMA8452Q
Sensors
Freescale Semiconductor, Inc.43
3&%ODQGSDG
6ROGHUVWHQFLORSHQLQJ
6ROGHUPDVNRSHQLQJ
3DFNDJH
3DFNDJHIRRWSULQW
3DFNDJHIRRWSULQW
;
3DFNDJHIRRWSULQW
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
7.2Overview of Soldering Considerations
Information provided here is based on experiments executed on QFN devices. These experiments cannot represent exact
Figure 14. Footprint
conditions present at a customer site. Therefore, information herein should be used for guidance only. Process and design
optimizations are recommended to develop an application-specific solution. With the proper PCB footprint and solder stencil
designs, the package will self-align during the solder reflow process.
•Stencil thickness is 100 or 125 μm.
•The PCB should be rated for the multiple lead-free reflow condition with a maximum 260 °C temperature.
•Use a standard pick-and-place process and equipment. Do not use a hand soldering process.
•Do not use a screw-down or stacking to mount the PCB into an enclosure. These methods could bend the PCB, which
would put stress on the package.
7.3Halogen Content
This package is designed to be Halogen Free, exceeding most industry and customer standards. Halogen Free means that
no homogeneous material within the assembled package will contain chlorine (Cl) in excess of 700 ppm or 0.07% weight/weight
or bromine (Br) in excess of 900 ppm or 0.09% weight/weight.
MMA8452Q
Sensors
44Freescale Semiconductor, Inc.
8Package Information
Top View
263
8451
ALYW
Traceability date code
Assembly site
Lot code
Work week
Part number
Freescale code
Pin 1
The MMA8451Q device is housed in a 16-lead QFN package, case number 2077.
8.1Product identification markings
8.2Tape and reel information
Sensors
Freescale Semiconductor, Inc.45
MMA8452Q
8.3Package Description
CASE 2077-02
ISSUE A
16-LEAD QFN
MMA8452Q
Sensors
46Freescale Semiconductor, Inc.
PACKAGE DIMENSIONS
CASE 2077-02
ISSUE A
16-LEAD QFN
MMA8452Q
Sensors
Freescale Semiconductor, Inc.47
PACKAGE DIMENSIONS
CASE 2077-02
ISSUE A
16-LEAD QFN
MMA8452Q
Sensors
48Freescale Semiconductor, Inc.
9Revision History
Table 68. Revision history
Revision
number
507/2012
602/2013
703/2013
807/2013
8.110/2013
9
Revision
date
Description of changes
• Table 2. Updated Typ values for Sensitivity Accuracy from 2.5% to 2.68%; Zero-g Level Offset Accuracy from
±20 mg to ±17 mg and Zero-g Level Offset Accuracy Post Board Mount from ±30 mg to ±20 mg.
• Updated section 2.3 I
• Added Table 8. Features of the MMA845xQ devices.
• Removed FIFO paragraph at the end of Section 6.1.
• Updated Case outline.
• Replaced Section 2.3 I
• Table 66: Register Map table, corrected registers 01, 03, and 05, bits 7-1 values from xD9-xD2 to xD11-xD4;
corrected registers 02, 04, and 06, bits 02, 04, and 06 from xD1, xD0, 0, 0 to xD3, xD2, xD1, xD0 respectively.
• Table 2: Updated Self-test Output Change row; X, Y, and Z Typ values from +181, +255, and +1680 to +44, +61,
and +392 respectively.
• Table 3: Updated Parameter and Test Condition column definitions for “Time from VDDIO on...”, “Turn-on
(STANDBY)” and “Turn-on time (Power Down to STANDBY)” rows. Expanded Max value for Ton1 into Typ
column and corrected Typ and Max value for Ton2 from “2” to “2/ODR + 2 ms”.
• Global change: Updated Pin 3 naming (from NC to DNC) to clarify which pins are not connected internally, and
which pins the customer should not connect anything to.
• Table1: Updated descriptions for most pins, removed Pin Status column.
• Section 4: Changed title from Modes of Operation to System Modes (SYSMOD).
• Updated Figure 6 with more detailed graphic.
• Table 7: Removed VDDIO column, combined contents into other columns and rows.