cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DH FIFO documentation and usage questions

VIvan
Associate

Hello ST team,

In document https://www.st.com/resource/en/datasheet/lis2dh.pdf , on page 38:

  • 7.17  FIFO_CTRL_REG (2Eh) FTH[4:0] bits are not well documented, I assumed name "FIFO Threshold" which is referenced on page 21 as "FIFO_WTMK_LEVEL bits"...
  • 7.18  FIFO_SRC_REG (2Fh) FSS[4:0] bits are not documented. By reading datasheets of similar devices I suggested name "FIFO Stored Samples - 1", but I need your confirmation of this information, to be able use LIS2DH in series production.

I configured and tested FIFO to generate INT1 on FIFO watermark.

When FTH[4:0]=1 (FIFO_CTRL=0x41), after interrupt happened FSS[4:0]=2 (FIFO_SRC=0x82).

I must read 3 measurements (burst read 18 bytes from OUT_X_L (28h)) in order to get next INT1 event. If I read 2 measurements (12 bytes) than next INT1 event will never come.

What I observed in data values and INT1 timing: this last extra measurement is always duplicated as first measurement on next INT1 event:

WTMK interrupt N, FIFO_SRC=82

(x y z)1 = (05_00 e9_00 c3_00)

(x y z)2 = (05_00 e9_00 c4_00)

(x y z)3 = (04_00 eb_00 c3_00)

WTMK interrupt N+1,FIFO_SRC=82

(x y z)1 = (04_00 eb_00 c3_00)

(x y z)2 = (04_00 ea_00 c4_00)

(x y z)3 = (05_00 e9_00 c3_00)

I can understand specific HW behavior and just ignore last measurement data in FIFO mode, but overall documentation and quality of my LIS2DH driver quality in under the question.

Can you please clarify documentation questions and confirm that:

  • In LIS2DH FIFO WTMK interrupt extra measurement must be read and ignored?
  • At FIFO WTMK interrupt sequences in practice maximum 31 from 32 FIFO levels must be used because last one must be ignored?

Best regards,

Volodymyr Ivantsiv

0 REPLIES 0