cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DW12 Orientation (Tilt) implementation

erush
Associate II

I have followed the DT097 (design tip for 6d orientation detection). When I moved from vertical position (face up) and rotated the board around X (or Y) axis the interrupt that I got ia when it is angle-complement of what I have selected e.g. 20 degree when I have selcted 70 degree). When I rotated back then the interupt happened at the angleas was selected e.g. 20 degree.

The registers setting: CTRL2=0xA4, CTRL4=0x80, TAP_THS_X=0x20, CTRL1-0x30, BS_INT_CFG=0x20.

BTW, when I have selcted 4D it works as was expected!

8 REPLIES 8
Miroslav BATEK
ST Employee

What exactly is your question? It is not clear?

erush
Associate II
Hi, I tried to implement a tilt application i.e. I want to get an interrupt when the device changes its position from one of the positive or negative X, Y and Z axis as it is illustrated in the DT097 document (see below).

In fact the 6D interrupt happens not as expected i.e. 70° from Y axis (see the following picture). The first interrupt happens 20° from Y axis and then another interrupt happens when the device is turn back 70° from axis Y.

When I changed the setting to 4D (TAP_THS_X=0xA0) it works i.e. I’m getting interrupt when the device is less than 70°, however it happens once unless I rotated my device around different axis e.g. X axis!
Miroslav BATEK
ST Employee

It is standard behavior. The interrupt signal is asserted when the device switches from one orientation to another. The tolerance (angle of cone) of each position is the angle-complement (90°-x) of what you have selected.

E.g. if you selected 70°, the interrupt will be triggered each time the board is in position 20° far from one of the six position (landscape up, landscape down, face up, face down, portrait right portrait left).

erush
Associate II
H Miroslave,
See the following picture that describes what I did. Is it a standard behaver!? When I have selected 4D it works as expected!
Miroslav BATEK
ST Employee

Can you please try to attach the pictures, they are not visible in your last and previous post.

erush
Associate II
Hello, I have attached 2 images that show the behavior.
erush
Associate II
Hello Miroslav, I haven’t see an response from November 2019!
Miroslav BATEK
ST Employee

Hello, I still don't see the images.