2024-01-31 11:50 PM
Hello,
I have implemented LIS2DW12 driver into our product and self-test procedure according to the AN5038 (as a minor difference, instead of waiting 100ms in the process, I use 5 newest samples from FIFO after FIFO gets filled with 30 samples, i.e. discard 25 first samples and then take average over 5 last).
After some testing we found that 99% of the time the self-test reports success, but there are some static positions where the self-test could fail.
From what I have found, failure happens only on the third axis (z) and only on one test polarity at once (when retesting the same position on different test polarity, then it passes). At the same time, when I place the sensor in mirrored position, then I get a pass on previously failing polarity test and at the same time get failure on other polarity (still, the same axis).
The problem is repeatable on multiple units and the output pattern is the same. The problem is repeatable with different sampling frequencies (tested 200Hz and 50Hz) and different sensitivities (tested 16g and 4g).
The output from our debug log when the device is lying flat on the table:
00> <debug> app: LIS: Self test x diff 234
00> <debug> app: LIS: Self test y diff 265
00> <debug> app: LIS: Self test z diff 501
00> <debug> app: LIS: Self test neg x diff 303
00> <debug> app: LIS: Self test neg y diff 276
00> <debug> app: LIS: Self test neg z diff 453
The output from our debug log when the device was put into the static erroneous position:
00> <debug> app: LIS: Self test x diff 270
00> <debug> app: LIS: Self test y diff 263
00> <debug> app: LIS: Self test z diff 512
00> <debug> app: LIS: Self test neg x diff 293
00> <debug> app: LIS: Self test neg y diff 283
00> <debug> app: LIS: Self test neg z diff 29
The output from our debug log when the device was put into mirrored position compared to the previous test:
00> <debug> app: LIS: Self test x diff 264
00> <debug> app: LIS: Self test y diff 270
00> <debug> app: LIS: Self test z diff 23
00> <debug> app: LIS: Self test neg x diff 264
00> <debug> app: LIS: Self test neg y diff 283
00> <debug> app: LIS: Self test neg z diff 449
How to interpret such results?
It looks like I cannot rely only on positive test or only on negative test.
Would it be enough to get a "pass" on one polarity only i.e. in case of a "failure" on positive sign test, repeat the test with negative sign test and if it gets "pass" now, then its good to go?
Solved! Go to Solution.
2024-02-01 06:52 AM
Hi @IS ,
You check only one polarity of self-test at a time but to be good the self-test has to pass in both the polarity.
2024-02-01 03:09 AM
2024-02-01 03:30 AM
No, I'm using custom-built drivers (values in the debug log snippets above are already converted into mg units) and I expect that the driver is fine, as our main application works and also the self-test usually works. There just seems to exist a specific position, where the sensor cannot detect applied actuation force (in case of self-test) in certain polarity on one axis (z in my tests, haven't been able to reproduce the error on other axises).
I checked your linked code from github and there you also check only one polarity of the self-test (I believe that it would fail as well in that specific position of the sensor).
2024-02-01 06:52 AM
Hi @IS ,
You check only one polarity of self-test at a time but to be good the self-test has to pass in both the polarity.
2024-02-01 08:03 AM
Hi,
It appears that the problem was in average calculation (extensive use of abs(), which resulted in too small diff when the applied force from the self-test changed the polarity of the output), not in the sensor configuration or sensor readout. Thank you for the support.