MMA6222EG
Sensors
Freescale Semiconductor 25
The response to a SPI error condition is shown below.
Figure 4-16 SPI Error Response
4.1.13 Initial Response
During initialization phase one, the device does not respond to SPI access attempts. During the second initialization phase, reg-
ister operations complete normally, however the device will respond to sensor data requests with No Data (ND) status. The first
acceleration request following completion of device initialization will also result in a No Data response. This ensures that an un-
expected reset will always be detectable, even in systems which poll the device at longer intervals than required for device ini-
tialization.
4.2 ERROR CONDITIONS
A number of error conditions may be detected. If an error condition is detected, MMA62XXEG will always transmit an error indi-
cator in place of acceleration data. Error indicators are defined in the following sections.
4.2.1 Error Condition Classification
Error conditions fall into five classes, as described below.
4.2.1.1 Critical Errors
Error condition affects device operation. Critical errors are always reported regardless of other error conditions which may be
detected.
4.2.1.2 Initialization
Initialization is a special case condition which occurs after reset until internal circuitry is ready to provide accurate acceleration
results. The duration of the initialization period depends upon whether a high-pass filter has been selected or not. If no high-pass
filter has been selected, initialization requires approximately 3 ms after power-up. If a high-pass filter has been selected, an ad-
ditional 200 ms is required. During the device initialization period, this status is reported in response to any acceleration data
request, however normal register access operations may be performed.
Device initialization status is cleared automatically.
4.2.1.3 Reset
Reset is also a special case condition. Reset will occur at power-on, as the result of a temporary undervoltage condition, or in
response to explicit actions taken by the controller. Upon negation of the internal reset signal, the DEVRES flag in the device
status (DEVSTAT) register is set. Because it is critically important that the system can detect any unintended reset condition, this
flag may only be cleared by writing a logic ‘1’ to the CE bit in the device control register (DEVCTL) after device initialization has
completed.
4.2.1.4 Transient Errors
An error condition which may be the result of a condition which precludes an accurate acceleration measurement but which may
not persist. Transient errors are reported in response to acceleration data transfer requests. If a transient error condition has been
detected, a logic ‘1’ may be written to the clear error (CE) bit in the device control (DEVCTL) register to clear the associated flag.
Should the error condition still exists, the flag will only be cleared momentarily.
0
SCLK
BIT
D
OUT
CS
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
00P0111000 100 00
MMA6222EG
Sensors
26 Freescale Semiconductor
4.2.1.5 External Errors
An error condition resulting from an invalid command input or corrupted data transfer. External errors are reported only once.
Errors are prioritized as shown in the table. In the event that multiple error conditions are detected, the highest priority error will
be reported.
4.2.2 Error Definitions
4.2.2.1 Internal Data Error
Class: Critical error
A parity fault has been detected in the internal data registers. In the event of a soft error (bit-flip within the register), an internal
data error may be recoverable by resetting the device.
4.2.2.2 Internal Oscillator Fault
Class: Critical error
If an oscillator fault condition is detected, D
OUT
is driven high continuously when CS is asserted, as illustrated below.
Figure 4-17 Oscillator Failure Response
4.2.2.3 Device Initialization
Class: Reset
Following a reset condition, the device requires a period of time to complete initialization of the DSP and internal registers. If
multiple SPI transfers are attempted during this initialization period, the second and all subsequent transfers will result in this
status. The first transfer following reset, regardless of the state of initialization returns device reset status.
4.2.2.4 Temperature Fault
Class: Transient error
The internal temperature sensor value exceeds the allowable limits for the device.
4.2.2.5 Unexpected Axis Selection
Class: External error
An acceleration data request has been received with an axis specification which is not supported.
4.2.2.6 Offset Error
Class: Transient error
This condition exists if the output of the offset monitor circuit reaches 10% of the full-scale value and the OFMON bit is set in the
DSPCFG1 register.
4.2.2.7 Device Reset
Class: Reset
Following any reset operation, the device returns this status during the first acceleration data access.
4.2.2.8 SPI Clock Fault
Class: External error
A SPI clock fault may result from the following conditions:
The number of rising clock edges detected while CS
is asserted is not equal to 16
SCLK is high when CS
is asserted
4.3 ACCELERATION DATA REPRESENTATION
Acceleration values may be determined from the 10-bit digital output (DV) as follows:
SCLK
D
OUT
CS
MMA6222EG
Sensors
Freescale Semiconductor 27
a = sensitivity
×
DV (signed data representation)
Sensitivity is determined by nominal full-scale range (FSR), linear range of digital values and a scaling factor to compensate for
sensitivity error.
The linear range of digital values for MMA62XXEG is limited to accommodate overrange values produced by the DSP along with
two reserved end values. The linear range of digital values and signed values is from -509 to +508. Note that the ranges are
asymmetrical by 1 LSB.
The sensitivity error scaling factor is determined as follows:
scale_factor = (100.0 - error_tolerance) / 100.0
Finally, the nominal sensitivity in terms of acceleration per LSB is determined:
1 LSB = (FSR / scale_factor) / ((Max_Linear_Value - Min_Linear_Value) / 2.0);
For the linear ranges of digital values indicated and projected sensitivity values, the nominal value of 1 LSB for each full-scale
range is shown in the table below.
Table 4-4 Nominal Sensitivity (10-bit data)
Full-Scale
Range
(g)
Nominal
Sensitivity
(g/digit)
Sensitivity Error = 4%
100 0.2048
50 0.1024
35 0.07170
20 0.04097

MMA6222EG

Mfr. #:
Manufacturer:
NXP / Freescale
Description:
Accelerometers XY 20 / 20 DIGITAL
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union