Skip to main content
Visitor II
May 6, 2025
Solved

LIS2DW12 INT1 Pin Goes High After Reinitialization

  • May 6, 2025
  • 1 reply
  • 469 views

Hi,

I'm working with the LIS2DW12 accelerometer in a low-power IoT application. The sensor is configured to wake the MCU via an interrupt on INT1, connected through a monostable multivibrator (Schmit trigger IC). The setup is designed so that a rising edge on INT1 triggers a reset of the MCU.

Here’s the issue:

When the MCU wakes from a previous interrupt (caused by actual motion), it starts reinitializing the LIS2DW12 — performing a soft reset and reconfiguring the registers into polling (standard) mode. Then, after some time in polling mode, if no motion is detected, the program switches the LIS2DW12 back into interrupt mode.

At this point, the INT1 pin briefly goes high, creating a glitch pulse even though the system is stationary. This unexpected edge triggers the monostable multivibrator, which in turn resets the MCU — essentially creating a loop. This behavior is not acceptable for my use case.

What I’ve tried:

  • Delaying the CTRL4 write until after all other registers are configured (CTRL1, CTRL3, WAKE_UP_THS, WAKE_UP_DUR, CTRL7).

  • Reading ALL_INT_SRC before and/or after the configuration.

  • Adding delays between configuration steps.

My Goal:

Prevent the INT1 pin from going high at all when reinitializing the sensor into interrupt mode — unless actual motion is detected.

I attached my example script to the message.

Thanks in advance!

 

    This topic has been closed for replies.
    Best answer by ahmetsafi

    I solved the issue by avoiding full sensor re-initialization. Instead of rewriting all registers, I now simply use CTRL7 to enable or disable interrupts when needed. This prevents any unwanted glitches on the INT1 pin, and everything works reliably now.

    1 reply

    ahmetsafiAuthorAnswer
    Visitor II
    May 6, 2025

    I solved the issue by avoiding full sensor re-initialization. Instead of rewriting all registers, I now simply use CTRL7 to enable or disable interrupts when needed. This prevents any unwanted glitches on the INT1 pin, and everything works reliably now.