Sensors
NXP Semiconductors 39
MMA8452Q
6.6 Auto-wake/sleep detection
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.
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.
In order to wake the device, the desired function or functions must be enabled in CTRL_REG4 and set to wake 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 asleep; 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,
pulse, 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.
0x29: ASLP_COUNT Register (read/write)
Bit
7
Bit
6
Bit
5
Bit
4
Bit
3
Bit
2
Bit
1
Bit
0
D7 D6 D5 D4 D3 D2 D1 D0
Table 50. ASLP_COUNT description
Field Description
D[7:0]
Duration value. Default value: 0000_0000.
Table 51. ASLP_COUNT r with ODR
Output data rate (ODR) Duration ODR time step ASLP_COUNT step
800 Hz 0 to 81 s 1.25 ms 320 ms
400 Hz 0 to 81 s 2.5 ms 320 ms
200 Hz 0 to 81 s 5 ms 320 ms
100 Hz 0 to 81 s 10 ms 320 ms
50 Hz 0 to 81 s 20 ms 320 ms
12.5 Hz 0 to 81 s 80 ms 320 ms
6.25 Hz 0 to 81 s 160 ms 320 ms
1.56 Hz 0 to 162 s 640 ms 640 ms
Table 52. Sleep/wake mode gates and triggers
Interrupt source
Event restarts timer and
delays return to sleep
Event will wake from sleep
SRC_TRANS Yes Yes
SRC_LNDPRT Yes Yes
SRC_PULSE Yes Yes
SRC_FF_MT Yes Yes
SRC_ASLP No* No*
SRC_DRDY No No