2022-03-17 06:00 AM
I'm trying to configure a LIS3DH to trigger INT1 after filling FIFO, after which I want to read out everything over I2C and then repeat.
I've gotten it to work (at f=10 Hz, I get INT1 interrupts at the expected ~3 sec interval), but when I read out the data, I get 0x00 values only. When I configure without the FIFO (trigger INT1 on every sample), I get reliable data. But then I added the following:
init:
on INT1 signal:
But when I dump out the data, it's always 0x000000000000. Anyone have any idea what could be going on here?
2022-03-25 08:07 AM
Hi @BLind.3,
Are you using the Stream-to-FIFO mode mode, described in the AN3308 application note, p.50?
In Stream mode the FIFO buffer continues filling, when the buffer is full, the OVRN_FIFO bit is set high and the next samples overwrite the oldest. When a trigger occurs, two different cases can be observed:
1. If the FIFO buffer is already full (OVRN_FIFO = “1�?), it stops collecting data at the first sample after the trigger. FIFO content is composed of #30 samples collected before the trigger event, the sample that has generated the interrupt event and one sample after the trigger.
2. If FIFO isn’t yet full (initial transient), it continues filling until it is full (OVRN_FIFO = “1�?) and then, if the trigger is still present, it stops collecting data.
You should be in the first case from the above list.
Please have also a look to the C Github examples related to the FIFO multiread:
-Eleon