Skip to main content
Visitor II
May 22, 2019
Question

My LIS3DH seems broken, and the self test results are weird

  • May 22, 2019
  • 1 reply
  • 1512 views

Hi, I'm using the LIS3DH to detect body movement, but I'm suspecting that the accelerometer is defective as the samples do not seem reasonable (for example, when testing a single axis and turning it all around, it won't go from 1 to -1 g).

I wrote a program to use the self test feature, and this is what I got from it, while leaving the LIS3DH resting horizontally with the Z axis pointing down:

OUTX_NOST 1: 0x7F80 2: 0x7F80 3: 0x7F80 4: 0x7F80 5: 0x7F80

OUTY_NOST 1: 0x7F80 2: 0x7F80 3: 0x7F80 4: 0x7F80 5: 0x7F80

OUTZ_NOST 1: 0x6240 2: 0x6100 3: 0x6300 4: 0x62C0 5: 0x6140

=========

OUTX_ST 1: 0xFFFF 2: 0xFFFF 3: 0xFFFF 4: 0xFFFF 5: 0xFFFF

OUTY_ST 1: 0xFFFF 2: 0xFFFF 3: 0xFFFF 4: 0xFFFF 5: 0xFFFF

OUTZ_ST 1: 0xFFFF 2: 0xFFFF 3: 0xFFFF 4: 0xFFFF 5: 0xFFFF

I didn't want to average the 5 samples within the program, so I sent all of them so I could analyze them. Of course, all the registers are set as the procedure states on the AN3308 document, on page 57.

I'm wondering what the samples from the ST mean. They are all FFFF; does this mean it's not working properly?

Please advice, thanks!

    This topic has been closed for replies.

    1 reply

    ST Employee
    May 22, 2019

    ​Hi Max, so the CTRL_REG1 is well configured, as I understand. Did you check the integrity of the I2C communication e.g. checking the WHO_AM_I (0Fh) reg (value read has to be 33h)? Have you the possibility to check another device? Did you get the FFFFh value only during self test or also with normal mode running? Regards

    Visitor II
    May 22, 2019

    Thanks for your answer, Eleon.

    The configuration of each register is exactly as the procedure states (50Hz, normal mode, etc). I'm using SPI and I know the comms are working, as I can read the WHO_AM_I register fine.

    The 0xFFFF values are coming after enabling the self test. The values before it are different (they are stored in the ST and NOST registers respectively, as I show above). I've been testing the accelerometer for a while but failed to get "reasonable" measurements. I could never get to measure 1g on any axis, which is why I tried the self test to see if there is something wrong with it.

    Unfortunately, I don't have another test board to try it out. I will most likely get a couple more just to be sure, but I still want to know if there results point to a defective unit, or if there might be something else going on.

    Is there something you would recommend doing to be sure if it's broken or not?

    ST Employee
    May 27, 2019

    Hi Max, for my understanding the flow was the following, right? You saw the sensor output never gave 1g on any axis (also the resultant on the 3 axis is never 1g), you tried the self test according to p.57 of the app note that went wrong and after that you re-check the sensor and it was broken, right? Or did it simply give the same results as before the self test)?

    Just for checking, which ODR did you set in reg CTRL_REG1 (20h)? You have to format the data according to this table. Regards

    0690X000008wQuMQAU.png