Skip to main content
Visitor II
December 9, 2019
Question

I am performing the self-test for the LIS2DW12 accelerometer. For some axes, when I compare data with and without the self-test enabled, I am getting a large difference in acceleration. Do I need to account for buffer overflow?

  • December 9, 2019
  • 1 reply
  • 724 views

For example, given the following data taken from the sensor should the Y reading marked with a * account for a buffer overflow and therefore the difference be calculated as follows: 0xffff - 0xffd4 + 0x0e88 = 0x0eb3

Initial X Reading:        0x0068

Self-Test X Reading:   0x10c0

Delta:                  0x1058

Initial Y Reading:        0xffd4  

Self-Test Y Reading:    0x0e88

Delta:                  0xf14c *

Initial Z Reading: 0xb00c

Self-Test Z Reading:    0xed68

Delta:                  0x3d5c

    This topic has been closed for replies.

    1 reply

    ST Employee
    December 16, 2019

    Hi @AJohn.2439​ , did you refer to p.43 of AN5038 for the Self-test procedure? And did you take into account the two recommendations of waiting for 100ms for stable output and to discard the first sample read after the sensor has been turned on? Waiting for output stability (and a stable environment indeed) is as well important in the self test performance. Regards