cancel
Showing results for 
Search instead for 
Did you mean: 

LIS2DE12 spurious interrupts

TGrod
Associate II

Hello.

I followed AN3308 (LIS3DH witch is similar to sensor in topic) configuration of wake-up interrupt with HP filter with some modifications (CTRL_REG1=5Fh).

My interrupt handler reads INT1_SRC, disables INT1 pin interrupts (CTRL_REG3 = 0) and sets the sensor in Power-down mode.

In main loop (after some delay) IA1 interrupt on INT1 pin is enabled (CTRL_REG3 = 40h) and sensor is configured to normal ODR (100 Hz).

After running the code and single shake of the sensor the interrupt is generated and cleared.

But after the delay and enabling the sensor again, another interrupt is generated.

This leads to infinite generation of interrupts, yet the sensor is not moved.

I noticed also that after microcontroller reset (and re-initialisation of the sensor) a single interrupt is also generated (but then my code ignores it).

If in interrupt handle I set minimum ODR instead of Power-down, it works better. After initial interrupt, the second is generated when sensor is enabled again. No more interrupts are generated until next movement of sensor.

If instead of disabling interrupts I only read INT1_SRC before entering Power-down, the INT1 pin stays high (asserted) until enabling sensor after delay.

This configuration I can use, but I would like de-assert interrupt line as soon as possible.

I want to wake up my microcontroller and put accelerometer in Power-down. After some delay I want put accelerometer in normal mode and put microcontroller in Power-down.

Maybe this can be done in other way than I try?

0 REPLIES 0