cancel
Showing results for 
Search instead for 
Did you mean: 

Self test on the LIS2DE12TR

SShan.11
Associate II

Hello,

I am working on a project where I have to interface the LIS2DE12TR Accelerometer via I2C interface with TI cc2652 chip. As a start I wanted to verify the hardware functionality. In the datasheet it is mentioned of a Self-Test Mode of operation. I did not understand how the operation can be verified in the self-test. Should we just enter into self test mode and then monitor the x,y,z output values and check if they are within the specified range ? Also is there any example for this self test procedure that has been done.

Also in the datasheet there is mentioned a Slave Ack and a Master ACK. How do we know that the slave Ack has been received and how do we send a Master Ack/Nack

Regards,

SS

20 REPLIES 20
Eleon BORLINI
ST Employee

Some more questions: which is your operating Vdd / VddIO? I suppose you tried to restart the boot but... did you tried with another sample? Regards

Eleon

Thank you for your support. One question to the PNG you provided for the selftest sequence.

It states, that the 10Bit data is left aligned. The datasheet only presents OUT_X_H (29h) and no low data byte. Is there something missing in the datasheet or is the PNG not correct for LIS2DE12?

Kind regards

Chris

Hi @christian239955_stm1_st​ , it's a typo 😉 just need to use the OUT_X_H (29h) data in two's complement for the LIS2DE12TR. Regards

Dear Eleon

I follow the procedure from your picture. I read back all configurations I do (e.g. after configuring the self-test I read 0x82 from Register 0x23).

However, I always measure exactly the same no matter if the self-test is configured or not.

The results are plausible when I rotate the sensor. I read -64 (* 15.6mg = 998.4mg) in whatever axis is pointing up.

Do you have any suggestion for me?

Kind regards

Christian

Dear Eleon

Another Question regarding the Configuration in the PNG above.

It states that the CTRL_REG1 should be configured with the Value 0x47. The datasheet states:

LPen This bit must be set to '1' for the correct operation of the device. Default value: 0

Probably there should be a 0x4F in CTRL_REG1 instead, right?

Kind regards

Christian

Hi @christian239955_stm1_st​ , @Eleon BORLINI​ ,

Did you get to the bottom of this? I've also followed the steps in the self test procedure in the picture Eleon posted above, and I'm also getting the same readings regardless whether it's in self test mode or not.

The readings do change when I physically rotate the board, but not when the only difference is the self test bit setting in CTRL_REG4.

Cheers,

Kamion

Hi @Eleon BORLINI​,

Can we get your comment on the LPen bit in CTRL_REG1?

Cheers,

Kamion 

Hi @christian239955_stm1_st​, @Eleon BORLINI​,

I figured it out.

For the LIS2DE12, the BDU bit in CTRL_REG4 must be set to 0.

The description of the BDU bit states:

Block data update. Default value: 0
(0: continuous update; 1: output registers not updated until MSB and LSB have been read)

Since the LIS2DE12 do not have OUT_X_L, OUT_Y_L and OUT_Z_L registers, turning BDU on will prevent the output registers from being updated.

Cheers,

Kamion

If anyone is following this procedure for the LIS2DE12, the BDU bit in CTRL_REG4 must be set to 0 in order for the selftest to work, otherwise you will just be reading the same output value.

Also for the LIS2DE12, the LPen bit in CTRL_REG1 must be set to 1, as this device only supports 8-bit output.

See my responses further down this thread for why.

The correct answer to this is, for the LIS2DE12, the LPen bit must be 1, in order to have the correct behaviour for 8-bit output. This device only supports 8-bit output.