Skip to main content
Visitor II
March 14, 2019
Question

LIS2DW12 fails to issue fifo interrupt sometimes

  • March 14, 2019
  • 1 reply
  • 919 views

I'm setting up LIS2DW12 to 100Hz, low power mode 1, fifo threshold 30 and fifo interrupt on INT2.

When interrupt is received by MCU (STM32L4 here) i readout register 0x2F to know how much samples is to retrieve, then retrieve them all by issuing read from address 0x28, length 6*<sample count> bytes. And i receive interrupt about 3 times per second and it almost works.

To be exact it works for about 30 seconds or so, then LIS2DW12 fails to raise interrupt.

By "pushing it" by manually connecting power supply wire for short time to INT2 line it again works, until some time it again fails.

Where should i seek a source of this problem? I have no idea for now.

    This topic has been closed for replies.

    1 reply

    ST Employee
    March 14, 2019

    hi, for my understanding are you in Continuous mode? I assume you configured INT2 pin by writing the INT2_FTH bit to '1' in register CTRL5_INT2_PAD_CTRL (24h). Which is the FIFO threshold flag (FIFO_FTH) when the interrupt INT2 fails?

    moreover, are there hw components on INT2 (which is an in/out line, see p.16 of the ds) the electrical track?

    just for debug, if INT1 is available in your app, you could try to read INT2 interrupt on it by setting 1 to INT2_ON_INT1 bit in CTRL7 (3Fh).

    Regards

    WPuchAuthor
    Visitor II
    March 15, 2019
    On 2019.03.14 17:25, ST Community wrote:
    right. i use continous mode. Fmode=0b110 threshold=0x1E (30), but
    different threshold doesn't change things.
    I set up CTRL4_INT1_PAD_CTRL to 0x06 - both fifo threshold and fifo full
    just for sure.
    INT2 line is directly connected to STM32L452RE G14 pin, INT1 directly to
    G9 pin. CPU is in stop2 mode normally and waken up by exti interrupt.
    Tries changing everything to use INT1. Same effect.
    When it stall tried "forcing" interrupt by touching this line with Vdd
    wire  to generate one interrupt manually. It then start again to work
    for some 15-60 seconds properly and stops.
    Of course i can get rid of this interrupts altogether and use RTC to
    wake up CPU every second or half but it isn't i think the clean solution.