How to do SELF TESt on MMA8451Q.

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

How to do SELF TESt on MMA8451Q.

Jump to solution
1,552 Views
harry2220
Contributor II

Hai,

                I am Using MMA8451Q, Accelerometer in my Project, I would like to do Self Test. I have enabled ST BIt In Config Reg2, But Could not get output, How could i Know My device is working.

0 Kudos
1 Solution
861 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi,

First, to activate the self-test by setting the ST bit in the CTRL_REG2 register (0x2B), the MMA8451Q must first be put into Standby mode by clearing the ACTIVE bit in the CTRL_REG1 register (0x2A). Then you can set the ST bit in the CTRL_REG2 register and put the part back into the Active mode by setting the ACTIVE bit in the CTRL_REG1 register

Then simply compute the difference between the acceleration output of all axes with self-test enabled (ST = 1) and disabled (ST = 0) as follows:

XST = XST_ON − XST_OFF

YST = YST_ON − YST_OFF

ZST = ZST_ON − ZST_OFF

Note that it is recommended to take several samples (e.g. 10) for each axis and average them.

If these self test responses are higher than the minimum values specified for each axis in the datasheet (Table 2), the MMA8451Q passed the self test.

Let me know if you have any other questions.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

View solution in original post

0 Kudos
2 Replies
862 Views
TomasVaverka
NXP TechSupport
NXP TechSupport

Hi,

First, to activate the self-test by setting the ST bit in the CTRL_REG2 register (0x2B), the MMA8451Q must first be put into Standby mode by clearing the ACTIVE bit in the CTRL_REG1 register (0x2A). Then you can set the ST bit in the CTRL_REG2 register and put the part back into the Active mode by setting the ACTIVE bit in the CTRL_REG1 register

Then simply compute the difference between the acceleration output of all axes with self-test enabled (ST = 1) and disabled (ST = 0) as follows:

XST = XST_ON − XST_OFF

YST = YST_ON − YST_OFF

ZST = ZST_ON − ZST_OFF

Note that it is recommended to take several samples (e.g. 10) for each axis and average them.

If these self test responses are higher than the minimum values specified for each axis in the datasheet (Table 2), the MMA8451Q passed the self test.

Let me know if you have any other questions.

Regards,

Tomas

PS: If my answer helps to solve your question, please mark it as "Correct". Thank you.

0 Kudos
861 Views
harry2220
Contributor II

Thank you Tomas,

              

                                    I would Test my Device as per your Procedure, If I have any query I would Ask you

Thanks for your Quick Reply.

                                  

0 Kudos