MMA8451Q / MMA8452Q: self-test procedure

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MMA8451Q / MMA8452Q: self-test procedure

Jump to solution
1,576 Views
josch42
Contributor I

Hi,

we want to use the MMA8451Q / MMA8452Q in our product and need to implement the self-test to make sure our board work properly.

Unfortunately, I cannot find any information on how to interpret the values read after the self-test was enabled. The best I can find is https://community.nxp.com/t5/Sensors/MMA8452Q-Self-Test/m-p/300598/highlight/true#M696, where TomasVaverka says:


Sorry for not being clear enough, the procedure does not require calculating the XYZ vector, just simply compute the difference between the acceleration output of all axes with self-test enabled and disabled as follows:

 

XST = XST_ON − XST_OFF

YST = YST_ON − YST_OFF

ZST = ZST_ON − ZST_OFF

 

and if these self-test changes are higher than 50 counts at ±4g mode, the test is considered to pass.

and later in the thread

It is 100 counts at ±2g mode.

Where do these values of 50/100 counts come from?

Labels (1)
0 Kudos
1 Solution
1,542 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Johann,

Yes, the minimum threshold is +25 LSB for ±4g range. The self-test output results obviously scale with selected range.

Best regards,

Tomas

View solution in original post

0 Kudos
6 Replies
1,564 Views
josch42
Contributor I

Thank you very much for your reply. Our current implementation of the self-test looks like this:

  1. RST on CTRL_REG2​
  2. ACTIVE on CTRL_REG1
  3. Average 5 samples of x, y, z
  4. Enable Standby on CTRL_REG1
  5. Enable ST on CTRL_REG2
  6. Set ACTIVE on CTRL_REG1
  7. Read self-test values
  8. Calculate delta (ST_ON - ST_OFF)

Unfortunately, the datasheet contradicts itself at how the test values are to be interpreted. On page 6 of datasheet:

Screenshot_20210504_064504.png

From what I understand, +44, +61, +392 are the typical delta values (ST_ON - ST_OFF) to be achieved after enabling self mode. However, "FS[1:0] set to 0" means 2g mode (according to table 16 on page 23), not 4g mode. I can only get values in the range of the values listed in the typical column on page 6 if I enable 4g mode in XYZ_DATA_CFG between steps 1 and 2 above:

MMA8452Q: Baseline values: x=-507, y=8, z=24
MMA8452Q: Self-test values: x=-463, y=76, z=386
MMA8452Q: Delta: dx=44, dy=68, dz=362

but these delta values are already outside the range of 50 counts for 4g let alone 100 counts for 2g.
I'm a bit lost on where to find the correct thresholds - the datasheet doesn't say anything about them.

Best regards,

Johann

0 Kudos
1,555 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Johann,

The typical delta values specified in the datasheet are for ±4g range which corresponds to FS[1:0] = 0b01. "FS[1:0] set to 0" is definitely incorrect, sorry about that.

Your self-test procedure as well as measured delta values are correct. The minimum delta value of +50 LSB I mentioned previously is valid for ±2g range.

Best regards,

Tomas

0 Kudos
1,549 Views
josch42
Contributor I

Hi Tomas,

Your self-test procedure as well as measured delta values are correct. The minimum delta value of +50 LSB I mentioned previously is valid for ±2g range.

if the typical delta values from the datasheet and switching to 4g before reading the baseline values are indeed correct and +50 LSB is actually the value for the 2g range: what is the correct threshold for the 4g mode? Just half of it?

 

Thanks,

Johann

0 Kudos
1,543 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Johann,

Yes, the minimum threshold is +25 LSB for ±4g range. The self-test output results obviously scale with selected range.

Best regards,

Tomas

0 Kudos
1,534 Views
josch42
Contributor I

Thank you very much for the information.

0 Kudos
1,569 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi Johann,

The datasheet specifies those values in Table 2 (Self-test output change).

However, the information I got from our PE team few years ago was that the MINIMUM passing value for MMA8452 Self-Test is +50 LSB on all axes. This is the limit that the part must pass at Final Test. Just to be clear, this is the delta output from the at-rest reading when Self-Test is initiated.

Best regards,

Tomas

0 Kudos