2021-05-11 01:34 AM
Dear Sir.
Using LSM6DSL with spi interfae works fine.
Trying to read the orientation I get no output
The configuration is
Write 60h to CTRL1_XL
Write 80h to TAP_CFG
Write 40h to TAP_THS_6D
Write 01h to CTRL8_XL
Write 04h to MD1_CFG
I read the registers LSM6DSL_WHO_AM_I followed by LSM6DSL_D6D_SRC
using polling every 1 sec.
LSM6DSL_WHO_AM_I gives output as expected.
LSM6DSL_D6D_SRC reads zero , See attached pic
Please Advise
Solved! Go to Solution.
2021-05-13 01:57 AM
Hi @Community member ,
it should be impossible to trigger two axis at once because of the thresholds.
just think with basic geometry.
to have 2 axis active at once the angles should be larger than 90° (=360°/4), while the maximum threshold is 80°.
Niccolò
2021-05-11 02:03 AM
Hi @Community member ,
maybe the timing of the read is not right.
in this case you can try to set the LIR bit in register TAP_CFG to latch the interrupt so that it remains high until you read it
let me know if this helps
Niccolò
2021-05-11 07:07 AM
Hi.
Setting LIR bit , no effect , Tilting DUT no output when reading register D6D_SRC .
2021-05-11 07:43 AM
Hi @Community member ,
the configuration seems right to me.
can you confirm that you read output data, so that we can rule out bigger problems?
also, did you solve the problems you had while reading the WHO_AM_I register?
I mean, are you sure it is not the same problem?
Niccolò
2021-05-12 02:53 AM
Hi.
It looks like some procedure erased the configuration , Now it works .
One more thing .
AN5040 section 5.4 states
6D interrupt is generated when, for two consecutive samples, only one axis exceeds a selected threshold and the acceleration values measured from the other two axes are lower than the threshold: the ZH, ZL, YH, YL, XH, XL bits of the D6D_SRC register indicate which axis has triggered the 6D event.
Thanks
2021-05-13 01:57 AM
Hi @Community member ,
it should be impossible to trigger two axis at once because of the thresholds.
just think with basic geometry.
to have 2 axis active at once the angles should be larger than 90° (=360°/4), while the maximum threshold is 80°.
Niccolò
2021-05-13 06:50 AM
Hi.
Understood
thanks.